-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[ML] Fix modal titles #147855
[ML] Fix modal titles #147855
Conversation
Pinging @elastic/ml-ui (:ml) |
@jgowdyelastic I reckon it's semantically incorrect putting the |
The EUI examples use |
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
These changes look good, but it looks like titles aren't being styled correct for any For example: Compared to one which hasn't been opened from a flyout: @elastic/kibana-design is this a known issue for |
@peteharverson Thank you for the ping on our Slack channel. If you pass a bare string or HTML tag as the The EUI team is working on a documentation update to spell out using H1 for modal titles today. After some discussion and reviews, we're recommending modals use H1 because it's a significant shift in user context. We want to visually and semantically convey this is a break in the previous flow, and we need your (user's) attention on this window for a moment. |
@1Copenut Are you sure this is the case now? this is how it used to work, but after a recent eui change it no longer seems to do this, hence the reason we've created this PR. |
@jgowdyelastic I took a second look and found the root cause. EUI PR #6321 removed a containing
If there's time for another round of changes, I'd recommend swapping H2 for H1 to give semantic parity to the default EUI modal. Or if this patch needs to land quickly, can we add an improvement ticket to the backlog? |
Without seeing the source React code, I'm speculating a bit, but... The |
Yes, looks like the ones where we have the small text is because we are passing
Trying this out now leads me to a design question - this looks a bit odd where there is just a title and no child component: compared to this, where I added a child @elastic/kibana-design what do you think? Should we add a child component for all our |
@peteharverson I don't think we need to force adding in text here unless it adds more value for the user. (See EUI Modal Guidelines). We also try to avoid saying 'Are you sure' (Writing guidelines) . |
@peteharverson updated |
💚 Build Succeeded
Metrics [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.
Tested latest changes and LGTM
commit fc3b886 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Jan 10 14:02:01 2023 +0000 replace alerts by severity table with lens commit a1464c2 Merge: e0bdf32 076d60d Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Jan 10 12:41:36 2023 +0000 Merge branch 'histogram-with-lens' of github.com:angorayc/kibana into histogram-with-lens commit e0bdf32 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Jan 10 12:40:45 2023 +0000 replace donut on alerts page commit 076d60d Merge: f5cb4e0 09e10b8 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Jan 10 11:53:38 2023 +0000 Merge branch 'main' of github.com:elastic/kibana into histogram-with-lens commit f5cb4e0 Merge: 119dbe7 010f93b Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Jan 10 11:15:40 2023 +0000 Merge branch 'histogram-with-lens' of github.com:angorayc/kibana into histogram-with-lens commit 09e10b8 Author: Angela Chuang <6295984+angorayc@users.noreply.github.com> Date: Tue Jan 10 11:13:21 2023 +0000 [SecuritySolution] Replace donuts with Lens (elastic#148519) ## Summary This pr is a part of elastic#147261: Replace donut charts with Lens: This is behind feature flag `chartEmbeddablesEnabled ` Items to verify: 1. If the queries and filters from the global search box are applied. 2. If the correct alert index is applied by different spaced. 3. Visualization actions working correctly. Detection and Response dashboard: <img width="1662" alt="Screenshot 2023-01-09 at 09 21 56" src="https://user-images.githubusercontent.com/6295984/211275765-8177e9bd-3623-4bb2-b1d9-8a3044d523a0.png"> Host details: <img width="1666" alt="Screenshot 2023-01-09 at 09 21 38" src="https://user-images.githubusercontent.com/6295984/211275770-be95353f-4d1b-410a-b7bf-b232692af1ab.png"> User details: <img width="1662" alt="Screenshot 2023-01-09 at 09 21 19" src="https://user-images.githubusercontent.com/6295984/211275773-dd0bcaaf-58e6-404b-b010-d1c464cbd101.png"> Network details: <img width="1663" alt="Screenshot 2023-01-09 at 09 20 47" src="https://user-images.githubusercontent.com/6295984/211275775-0fd39ac3-e977-44bd-bd40-304463dce613.png"> Known issues: 1. Not showing legend for alerts donut charts at the moment: There is a logic in Lens that it doesn't show the legend item if its value is zero. 4. JS warnings triggered by incorrect state changed. Fixed by elastic#148552 5. No label in the donut by default when open in Lens - Lens doesn't support displaying a label in the middle of the donut chart by default, so it is currently available in Security Solution. 6. Applying filters or extra action while clicking the donut is not available atm ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> commit ef2faad Author: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com> Date: Tue Jan 10 10:39:50 2023 +0100 [Infrastructure UI]: Add feedback button for hosts page (elastic#148555) ## 📓 Summary Closes elastic#148379 This PR replaces the existing link to get feedback on the forum with a button that brings on a form with predefined questions on the Hosts page. ## 🧪 Testing Navigate to the `Hosts`view and click the top-right button saying "_Tell us what you think!_". <img width="1502" alt="solution" src="https://user-images.githubusercontent.com/34506779/211347429-c8f338c3-8bb0-4304-8b58-6d140e301554.png"> Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> commit 5c8b6f2 Author: James Gowdy <jgowdy@elastic.co> Date: Tue Jan 10 09:33:56 2023 +0000 [ML] Fix modal titles (elastic#147855) An EUI change has caused modal titles to no longer be implicitly wrapped in a header tag. This change adds a `h2` to all modal titles. **Old** <img width="824" alt="image" src="https://user-images.githubusercontent.com/22172091/208673148-3da918c4-f1d7-48c5-8afd-022b912b49fc.png"> **New** <img width="857" alt="image" src="https://user-images.githubusercontent.com/22172091/208673087-1b8cba03-504b-4505-ac65-0fcfcce4b99b.png"> commit 010f93b Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Dec 8 15:15:43 2022 +0000 render histogram with lens commit 119dbe7 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Sun Jan 8 10:02:57 2023 +0000 fix types commit 0891f07 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Sat Jan 7 23:39:27 2023 +0000 unit test commit d2023fa Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Sat Jan 7 23:32:23 2023 +0000 fetch session id only when vis inabled commit 82b4ddb Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Sat Jan 7 22:38:44 2023 +0000 refetch commit d896cb0 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Sat Jan 7 19:47:18 2023 +0000 remove eslint comment commit d619b30 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Sat Jan 7 19:19:41 2023 +0000 unit tests commit 075ef5f Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Jan 5 15:46:55 2023 +0000 styling commit 4d4a5cf Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Jan 5 15:16:54 2023 +0000 update snapshot commit aead88e Merge: a91bf4f 1c5febb Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Jan 5 14:51:07 2023 +0000 Merge branch 'histogram-with-lens' of github.com:angorayc/kibana into histogram-with-lens commit a91bf4f Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Jan 5 14:50:39 2023 +0000 update snapshot commit 29da009 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Jan 5 14:42:32 2023 +0000 fix types commit 1c18042 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Jan 5 12:47:56 2023 +0000 styling commit 1c5febb Author: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Tue Jan 3 17:43:29 2023 +0000 [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' commit 73e17de Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Jan 3 17:38:29 2023 +0000 pass extra filters to Lens commit 789c0c8 Merge: dfb9e8f 0c8c4d7 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Jan 3 17:14:34 2023 +0000 Merge branch 'main' of github.com:elastic/kibana into histogram-with-lens commit dfb9e8f Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Jan 3 15:48:36 2023 +0000 render rule preview with lens commit c753bd8 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Fri Dec 30 16:02:53 2022 +0000 add total alerts count commit 785712e Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Dec 29 18:26:50 2022 +0000 replace alerts donut charts commit c31b77d Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Wed Dec 28 11:08:34 2022 +0000 fix unit tests commit 7dbc50d Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Fri Dec 23 14:02:52 2022 +0000 add unit tests commit 1b50b16 Merge: 55f0cf2 03ddae8 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Dec 22 14:15:02 2022 +0000 Merge branch 'main' of github.com:elastic/kibana into histogram-with-lens commit 55f0cf2 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Dec 22 14:14:45 2022 +0000 update snapshots commit 153f139 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Dec 22 12:46:22 2022 +0000 add unit tests commit da58b26 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Dec 22 12:13:17 2022 +0000 rename props commit 26da70b Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Dec 22 12:12:53 2022 +0000 update events chart commit 445cb99 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Dec 22 11:44:13 2022 +0000 clean up commit 761998f Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Dec 22 11:05:57 2022 +0000 fix unit tests commit 5fc4ece Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Wed Dec 21 17:36:39 2022 +0000 fix types commit 73424d7 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Wed Dec 21 17:01:40 2022 +0000 add no data prompt commit 0b18236 Merge: a07eefe 5f5291d Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Dec 20 17:07:17 2022 +0000 Merge branch 'histogram-with-lens' of github.com:angorayc/kibana into histogram-with-lens commit a07eefe Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Dec 20 17:06:32 2022 +0000 extra actions commit 84dce3f Merge: b68afd1 53e42eb Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Dec 20 16:12:24 2022 +0000 Merge branch 'main' of github.com:elastic/kibana into histogram-with-lens commit 5f5291d Author: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Tue Dec 20 15:21:19 2022 +0000 [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' commit b68afd1 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Tue Dec 20 15:15:31 2022 +0000 replace alerts histograms with Lens commit 7b39762 Merge: 6376733 3192372 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Fri Dec 16 09:58:19 2022 +0000 Merge branch 'main' of github.com:elastic/kibana into histogram-with-lens commit 6376733 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Fri Dec 16 09:58:15 2022 +0000 replace alert histograms with lens commit 62bd659 Author: Angela Chuang <yi-chun.chuang@elastic.co> Date: Thu Dec 8 15:15:43 2022 +0000 render histogram with lens
An EUI change has caused modal titles to no longer be implicitly wrapped in a header tag. This change adds a `h2` to all modal titles. **Old** <img width="824" alt="image" src="https://user-images.githubusercontent.com/22172091/208673148-3da918c4-f1d7-48c5-8afd-022b912b49fc.png"> **New** <img width="857" alt="image" src="https://user-images.githubusercontent.com/22172091/208673087-1b8cba03-504b-4505-ac65-0fcfcce4b99b.png">
An EUI change has caused modal titles to no longer be implicitly wrapped in a header tag.
This change adds a
h2
to all modal titles.Old
New