-
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
[Discover] Adds an Options menu for switching between the two table modes #97120
[Discover] Adds an Options menu for switching between the two table modes #97120
Conversation
@ryankeairns I will need your valuable feedback for the UI and the texts. Right now, I am changing only the text of the link, but I could also change the explanatory text too. |
<FormattedMessage | ||
id="discover.topNav.openOptionsPopover.description" | ||
defaultMessage="The new data grid layout includes better data sorting, drag-and-drop columns, and a full | ||
screen view. Enable this option if you prefer to fall back to the legacy table." | ||
/> |
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.
thx a lot for taking care of this 🙇 , so here's my first thought while playing with this: I think also the link description should be different depending on which state is selected, FYI @gchaps & @shaunmcgough for finding the right words 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.
Perhaps: "The new data grid features faster loading, better comparison, a flyout window, enhanced options, and is going to replace the legacy table soon. Enable this option if you prefer to fall back to the legacy table."
@gchaps what say you?
Having tried this out, I have a few new thoughts:
👉 Incomplete design/reference PR: stratoula#3 |
@elasticmachine merge upstream |
Thank you @ryankeairns, I really like it! I merged your PR and adjusted the unit test. We should decide now about the text, if we want this to be different and what exactly will be |
Pinging @elastic/kibana-app (Team:KibanaApp) |
My last attempt at the wording :)
|
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.
This looks great Stratoula! Thanks for stepping in to help and for addressing the feedback.
A minor edit:
|
const mode = isLegacy | ||
? i18n.translate('discover.openOptionsPopover.dataGridText', { | ||
defaultMessage: 'Data grid', | ||
}) | ||
: i18n.translate('discover.openOptionsPopover.legacyTableText', { | ||
defaultMessage: 'Legacy table', | ||
}); |
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.
this should be inverted to like (same with tests then)
isLegacy ? 'Legacy table' : 'Data grid'
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.
You are so right Matthias 😱
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.
Done :D
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.
Code LGTM, tested locally in Chrome Firefox Safari, Mac OS. Works as expected. Thx a lot for taking care of this! This new Options would have saved me a few hours or days of navigating to switch the grid! 👍
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
…odes (elastic#97120) * [Discover] Adds an Options menu for enabling the Legacy table * Add unit test * Layout and copy tweaks * Update UI and fix unit test * Change description text * Revert legacy text mode functionality Co-authored-by: Ryan Keairns <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
…odes (#97120) (#97611) * [Discover] Adds an Options menu for enabling the Legacy table * Add unit test * Layout and copy tweaks * Update UI and fix unit test * Change description text * Revert legacy text mode functionality Co-authored-by: Ryan Keairns <[email protected]> Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Ryan Keairns <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Summary
Implements #92618 (comment)
Adds a new menu item
Options
which appears only to the users that have permissions to edit the advanced settings.The link redirects to the advanced settings section with the
use legacy table
query in order only the setting we want to be displayed.Link text depends on the switch status
Checklist
Delete any items that are not applicable to this PR.