-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Lens] (Accessibility) Added button to execute drag and drop to workspace #85960
[Lens] (Accessibility) Added button to execute drag and drop to workspace #85960
Conversation
2116e9a
to
821b695
Compare
Hey, @mbondyra! Per your request, I've made a quick design PR for your branch. Have a look here whenever you get a moment: |
…_workspace_design [Lens] "Add field to workspace" button design tweaks
@elasticmachine merge upstream |
Since we're past 7.11.0 FF, and this isn't a bug fix, should probably bump to 7.12.0. |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
…dyra/kibana into lens/accessibility/dnd_to_workspace
@mbondyra I fixed types and tests (and restructured the code a little), could you check whether everything is still working as intended from your side? |
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 tested this behavior and found that it worked consistently with what we have on master, so that part LGTM. The organization of this code makes sense too by moving this to the frame level. The only comment I have is that you've taken tests out without adding equivalent tests, and I'd like to make sure we keep those.
field, | ||
mainPalette, | ||
}); | ||
return suggestions.find((s) => s.visualizationId === activeVisualizationId) || suggestions[0]; |
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 tried to break the suggestion logic here, and it does seem to be working consistently with what we have on master, but might benefit from some extra tests. It seems like we are intentionally switching the subVisualizationId
on some chart types, like between donut -> pie when you add a second agg. Is this tested?
}} | ||
title={buttonTitle} | ||
/> | ||
</EuiFlexItem> |
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 think I would have appreciated an EuiTooltip here instead of a title
property- it seems like this button is potentially confusing for mouse users.
Thanks for the review @wylieconlon - I think the tests are all covered now, although structured differently:
About
We are picking the top suggestion of the current data source as tested in the new I also added tooltips and keep the button in a disabled state if it can't be used right now: |
Pinging @elastic/kibana-accessibility (Project:Accessibility) |
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
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.
LGTM as I wrote parts of it, waiting for design review
As discussed with @mbondyra the popover is closed now on adding it to the workspace to make it possible to see all of the resulting chart and to circumvent a focus bug in firefox |
Checked again - the bug is fixed, approved! |
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.
Two nits but works well! 🚀
x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx
Outdated
Show resolved
Hide resolved
onClick={() => { | ||
dropOntoWorkspace(field); | ||
}} | ||
title={buttonTitle} |
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.
Nit: With EuiToolTip
already in place here, I think we can get rid of this
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.
LGTM as I wrote parts of it, waiting for design review
@flash1293: A design PR from me with my suggested changes was merged into this branch earlier. This still looks good to me, with the exception of one new bug that I noticed today.
It seems that the "Add field to workspace" buttons can occasionally (and perhaps randomly) be immediately auto-focused when the field popover is opened. The button focus then causes the button's tooltip to show. It appears to only happen when opening the popover via mouse click on the field. It does not appear to happen when using the keyboard to open the popover. Is this a known issue?
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 LGTM, although I agree with @myasonik on the small tweaks
Thanks for the reviews. I addressed Michails remarks and fixed Michaels bug |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
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.
Thanks for fixing that bug, @flash1293. LGTM!
Summary
Fixes #83730
Fixes #83600
Description of functionality here.
Checklist
Delete any items that are not applicable to this PR.
For maintainers