Content-Length: 32551 | pFad | http://github.com/postgresml/postgresml/pull/1048.diff
thub.com diff --git a/pgml-dashboard/content/blog/how-to-improve-search-results-with-machine-learning.md b/pgml-dashboard/content/blog/how-to-improve-search-results-with-machine-learning.md index 2011dd3dd..e78c1b615 100644 --- a/pgml-dashboard/content/blog/how-to-improve-search-results-with-machine-learning.md +++ b/pgml-dashboard/content/blog/how-to-improve-search-results-with-machine-learning.md @@ -216,7 +216,7 @@ This is considered a Supervised Learning problem, because we have a labeled data ### Training Data -First things first, we need to record some user clicks on our search results. We'll create a new table to store our training data, which are the observed inputs and output of our new relevance function. In a real system, we'd probably have separate tables to record **sessions**, **searches**, **results**, **clicks** and other events, but for simplicity in this example, we'll just record the exact information we need to train our model in a single table. Everytime we perform a search, we'll record the `ts_rank` for the both the **title** and **body**, and whether the user **clicked** on the result. +First things first, we need to record some user clicks on our search results. We'll create a new table to store our training data, which are the observed inputs and output of our new relevance function. In a real system, we'd probably have separate tables to record **sessions**, **searches**, **results**, **clicks** and other events, but for simplicity in this example, we'll just record the exact information we need to train our model in a single table. Everytime we perform a search, we'll record the `ts_rank` for both the **title** and **body**, and whether the user **clicked** on the result. !!! generic diff --git a/pgml-dashboard/src/components/dropdown/dropdown.scss b/pgml-dashboard/src/components/dropdown/dropdown.scss index 79c0d89ba..938595b94 100644 --- a/pgml-dashboard/src/components/dropdown/dropdown.scss +++ b/pgml-dashboard/src/components/dropdown/dropdown.scss @@ -39,6 +39,7 @@ display: flex; justify-content: space-between; font-weight: $font-weight-normal; + padding: 16px 20px; --bs-btn-border-color: transparent; --bs-btn-border-width: 1px; @@ -48,6 +49,10 @@ --bs-btn-active-color: #{$gray-100}; --bs-btn-hover-color: #{$gray-100}; + &.error { + border-color: #{$error}; + } + .material-symbols-outlined { color: #{$neon-shade-100}; } @@ -73,7 +78,7 @@ } .menu-item { - a { + a, div { padding: 8px 12px; overflow: hidden; text-overflow: ellipsis; diff --git a/pgml-dashboard/src/components/dropdown/mod.rs b/pgml-dashboard/src/components/dropdown/mod.rs index a53394e1b..77f71b1ce 100644 --- a/pgml-dashboard/src/components/dropdown/mod.rs +++ b/pgml-dashboard/src/components/dropdown/mod.rs @@ -1,3 +1,5 @@ +use crate::components::navigation::dropdown_link::DropdownLink; +use crate::components::stimulus::stimulus_target::StimulusTarget; use pgml_components::component; use pgml_components::Component; use sailfish::TemplateOnce; @@ -21,35 +23,57 @@ pub struct Dropdown { //github.com/ The currently selected value. value: DropdownValue, - //github.com/ The list of dropdown links to render. - links: Vec