-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[App Search] First cut of the Relevance Tuning UI #90621
Conversation
@@ -0,0 +1,23 @@ | |||
.relevanceTuningForm { | |||
.valueBadge { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daveyholler (cc @constancecchen and @byronhulcher)
I have axe failures for the follow elements:
In the image above, you can see examples of the "enabled" and "disabled" styles of this component.
I made this component up, basically. It it my take on what we had in ent-search, just translated to Kibana.
The background color (tintOrShade($euiColorVis1, 90%, 70%);
) I chose specifically to match the background of EuiToken. We show this component beside EuiToken
elements, so I thought it would make sense to match the styles a bit.
The foreground color ($euiColorVis1
) matches the color I chose for the EuiTokens. Note that in the Eui docs for EuiToken (https://elastic.github.io/eui/#/display/icons) it recommends using a "vis" color, which is why I picked this odd looking color:
For best results use one of the vis color names (or 'gray').
However, as you can see, axe complains about the color contrast.
The disabled styles are also completely made up. They also fail.
I'm looking for some advice on what colors to use here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have super strong thoughts here, if we're waiting for a total component rehaul I'm inclined to just leave this as-is with your current interpretation and let Davey handle it in the redesign :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point.
This seems pretty good so far, I left a few comments, mostly questions to ponder. I look forward to taking another look at this after it's been rebased post-Part 3 |
ae44939
to
658be0d
Compare
I rebased with master and I'm now marking this as Ready for review. I also added a commit to add coverage for a couple of missing branches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the lateness on this Jason - here's a very quick first pass of comments purely from skimming the code, I haven't pulled this down yet to examine UI/UX/DOM/QA etc. but will do another deeper dive review on Monday most likely.
...ions/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.scss
Show resolved
Hide resolved
if (optionType === 'operation') { | ||
updatedBoosts[boostIndex][optionType] = value as BoostOperation; | ||
} else { | ||
updatedBoosts[boostIndex][optionType] = value as BoostFunction; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, I legit have no idea - does updatedBoosts[boostIndex][optionType] = value as BoostOperation | BoostFunction
work or nah? No worries if not, maybe @byronhulcher might also have some ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No dice with that. Which is weird, because I can do something similar in TS Playground. Not the first time where I could do something in TS Playground but not here: https://www.typescriptlang.org/play?ssl=1&ssc=1&pln=17&pc=71#code/KYDwDg9gTgLgBMAdgVwLZwGLMQYxgSwkQEMAbAIQggGcYtcCi4BvAWACg44BxY5a6vmKI4AXjgByAOZ8BQxBIA0HLgFFwRJATJjJoSIi1DSSlXAAy+Q8Si6JpK8Bun2AXw4d90eEjRwAClAQIPio+DAAnpQ0dNh4hCJsnDyygsJ2pBAyUOEAFmE4LmoahojapHZepeVFFo42GfVQLu7sHJFgwHDRtPTxTOJ9jCQUVL1xw3AAPgFBIWGRPbEMCQDcHuykwPDEAFyYEwlkS0MJ07PBoeFRY8v9iOtt7MQZWTZ5BRJwxNQHK0THW6nJgzQKXBY3GLAh5AA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, no worries. It doesn't excessively bother me to be adding branching logic for the sake of typing but it does feel a bit weird. Leaving this uncollapsed in case anyone has any other ideas or if we come back to this in the future at some point, but no change requested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely, ty.
..._search/public/applications/app_search/components/relevance_tuning/relevance_tuning_logic.ts
Show resolved
Hide resolved
...ic/applications/app_search/components/relevance_tuning/relevance_tuning_form/value_badge.tsx
Show resolved
Hide resolved
...nents/relevance_tuning/relevance_tuning_form/relevance_tuning_item_content/weight_slider.tsx
Show resolved
Hide resolved
} | ||
paddingSize="s" | ||
> | ||
<RelevanceTuningItemContent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Not a change request, just a general sound for opinions] How do we feel about the name of this? No worries if we're just straight up porting it from ent-search and don't want to think about it, but maybe RelevanceTuningField
vs ItemContent
is both more descriptive & succinct? 🤷
...s/relevance_tuning/relevance_tuning_form/relevance_tuning_item_content/boosts/boost_item.tsx
Show resolved
Hide resolved
...nents/relevance_tuning/relevance_tuning_form/relevance_tuning_item_content/boosts/boosts.tsx
Outdated
Show resolved
Hide resolved
...nents/relevance_tuning/relevance_tuning_form/relevance_tuning_item_content/boosts/boosts.tsx
Show resolved
Hide resolved
..._tuning/relevance_tuning_form/relevance_tuning_item_content/boosts/get_boost_summary.test.ts
Show resolved
Hide resolved
...tions/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.tsx
Outdated
Show resolved
Hide resolved
...nents/relevance_tuning/relevance_tuning_form/relevance_tuning_item_content/boosts/boosts.tsx
Show resolved
Hide resolved
...uning/relevance_tuning_form/relevance_tuning_item_content/relevance_tuning_item_content.scss
Outdated
Show resolved
Hide resolved
...ions/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.scss
Outdated
Show resolved
Hide resolved
...ions/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.scss
Outdated
Show resolved
Hide resolved
...ions/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.scss
Show resolved
Hide resolved
...ions/app_search/components/relevance_tuning/relevance_tuning_form/relevance_tuning_form.scss
Show resolved
Hide resolved
...nents/relevance_tuning/relevance_tuning_form/relevance_tuning_item_content/boosts/boosts.tsx
Outdated
Show resolved
Hide resolved
...ents/relevance_tuning/relevance_tuning_form/relevance_tuning_item_content/boosts/boosts.scss
Outdated
Show resolved
Hide resolved
...ents/relevance_tuning/relevance_tuning_form/relevance_tuning_item_content/boosts/boosts.scss
Outdated
Show resolved
Hide resolved
...ents/relevance_tuning/relevance_tuning_form/relevance_tuning_item_content/boosts/boosts.scss
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes and QA look great - thanks Jason for the awesome UI/UX work here and for super thorough unit tests as always!
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
💔 Backport failed❌ 7.13: The branch "7.13" is invalid or doesn't exist To backport manually, check out the target branch and run: |
Summary
This is Part 4 of Relevance Tuning.
This PR migrates the UI for the Relevance Tuning page from ent-search to Kibana. It migrates the entire form excluding the individual forms for boosts. Those will come in a follow up PR.
Kibana:
ent-search:
Responsive:
Checklist
Delete any items that are not applicable to this PR.