[Feature notification] Add EuiNotificationEvent#4531
[Feature notification] Add EuiNotificationEvent#4531elizabetdev merged 67 commits intoelastic:feature/notificationfrom
Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
…s://github.com/chandlerprall/eui into chandlerprall-notification-events-content-context-menu-items
…s-content-context-menu-items Notification events content context menu items
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
|
Based on the PR reviews:
|
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
cchaos
left a comment
There was a problem hiding this comment.
🎉 Awesome, thank you for those updates @miukimiu !
I'm just seeing a couple more nit-picky design things.
- I think because you've pulled the button out of the meta component, which established the overall min height the rest of the meta stuff aligned well vertically. Now not so much. Maybe that container just needs a min-height of
24px(the same as the size of the button).
- The only thing about showing the accordion only if there are more than 2 messages is the inconsistency of showing only 1 message when there are 3+. It's much better to have a consistent understanding that only the first message is ever shown, even if it says "+1 more".
The rest of my comments are mainly grammatical. But I really love that the event itself has all the required props at the top level now. It'll be so much easier to implement.
src-docs/src/views/notification_event/notification_event_example.js
Outdated
Show resolved
Hide resolved
src-docs/src/views/notification_event/notification_event_example.js
Outdated
Show resolved
Hide resolved
src-docs/src/views/notification_event/notification_event_example.js
Outdated
Show resolved
Hide resolved
src-docs/src/views/notification_event/notification_event_example.js
Outdated
Show resolved
Hide resolved
src-docs/src/views/notification_event/notification_event_example.js
Outdated
Show resolved
Hide resolved
src-docs/src/views/notification_event/notification_event_example.js
Outdated
Show resolved
Hide resolved
src-docs/src/views/notification_event/notification_event_example.js
Outdated
Show resolved
Hide resolved
…le.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
…le.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
…le.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
…le.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
…le.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
…le.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
…le.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4531/ |
cchaos
left a comment
There was a problem hiding this comment.
Looks great to me! Thank you for making all those changes. The docs are really helpful in explaining the correct usages of this component. 🎉
* [Feature Notification] Add EuiNotificationEventMeta (#4433) * Add notification event meta * WIP * adding i18n * Fixing axe error in docs example * Adding context menus items * contetx menu item anchor position * Adding tests * Update src/components/notification/notification_event_meta.tsx Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Improving code based on PR review * More PR review * Better description * Update src/components/notification/notification_event_meta.tsx Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_events/notification_events.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Badge 100% width * ES lint * Read and unread states * Make sure overflow menu stays in the top right * Improving a11y * Adding playground for event read button * Removing EuiNotificationEventMeta from exported on index * Add a behavior unit test, update context menu test to snapshot the menu items * Update src/components/notification/notification_event_meta.tsx Co-authored-by: Chandler Prall <chandler.prall@gmail.com> * Update src/components/notification/notification_event_read_button.tsx Co-authored-by: Chandler Prall <chandler.prall@gmail.com> Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: Chandler Prall <chandler.prall@gmail.com> * [Feature Notification] Adding animation prop to EuiHeaderSectionItemButton (#4424) * Adding animation and hasBackground props to EuiHeaderSectionItemButton * A few improvements * Docs props * Removing hasBackground prop * Using JS do hide and show on xs breakpoints * Adding a snippet * refactor animation prop into a ref method * Snapshots. Trigger animation comments. * Deleting unused css animation * triggerAnimation explanation * Cleaned up some logic and created a docs example specifically for the notifications * re-enable the animation test * Update src-docs/src/views/header/header_animate.js Co-authored-by: Chandler Prall <chandler.prall@gmail.com> * Update src-docs/src/views/header/header_example.js Co-authored-by: Chandler Prall <chandler.prall@gmail.com> * Update src-docs/src/views/header/header_alert.js Co-authored-by: Chandler Prall <chandler.prall@gmail.com> * Update src-docs/src/views/header/header_alert.js Co-authored-by: Chandler Prall <chandler.prall@gmail.com> * Update src-docs/src/views/header/header_animate.js Co-authored-by: Chandler Prall <chandler.prall@gmail.com> * Update src-docs/src/views/header/header_example.js Co-authored-by: Chandler Prall <chandler.prall@gmail.com> * renaming animate methods to euiAnimate * euiAnimate into header example * simplifying onClick closeFlyout * Update src-docs/src/views/header/header_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: Chandler Prall <chandler.prall@gmail.com> Co-authored-by: cchaos <caroline.horn@elastic.co> Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * [Feature notification] Add EuiNotificationEvent (#4531) * Notification events * Looping through EuiNotificationEvent * Adding props table and more methods * wip * Renaming event notifications to event messages * onClickNoNewsTitles * Toggle mark as read/unread * Initial documentation * Improving examples * Fixing TS error * Refactored EuiEventNotification context menu item creation * improving data * Notifications data * Primary example buttons * Reset data * More docs * snippets * Adding tests * Better messages explanation * Better snippets * Small fixes * Missing prop explanation * Adding heading level * Adding flexible comp section * More a11y * Update src/components/notification/notification_event_messages.tsx Co-authored-by: Michail Yasonik <michail@yasonik.com> * Button messages ay11 * test * Better descriptions * Tests * Adding icon arial label into notifications feed example * i18n token * i18n token * i18 token again * primaryAction description * More description * Update src/components/notification/notification_event_messages.tsx Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src/components/notification/notification_event_messages.tsx Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Addressing PR review * More improvements * Adding comment * Excluding `eventName` at top level and changing title vs aria-label on read button * Fix title * Fixing tests and removing evenName from docs usage * Fixing icon margin * More tests and small fixes * Moving read button from event meta comp to event comp * Split primaryAction and primaryActionProps * Exposing EuiPrimaryActionProps in props table * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Update src-docs/src/views/notification_event/notification_event_example.js Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * Messages length and more * Fixing data test subj * Renaming tsx examples to js Co-authored-by: Chandler Prall <chandler.prall@gmail.com> Co-authored-by: Michail Yasonik <michail@yasonik.com> Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: cchaos <caroline.horn@elastic.co> * Adding CL * Fixing CL a11y issue * Reverse logic in the ternary operator * Removed unecessary optional types in EuiNotificationEventMeta Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: Chandler Prall <chandler.prall@gmail.com> Co-authored-by: cchaos <caroline.horn@elastic.co> Co-authored-by: Michail Yasonik <michail@yasonik.com>




Summary
This PR adds a EuiNotificationEvent and all the documentation.
Notifications feed
This PR also adds a section in the docs to show how to render multiple EuiNotificationEvent.
Checklist
[ ] Checked Code Sandbox works for the any docs examples[ ] Checked for breaking changes and labeled appropriately[ ] A changelog entry exists and is marked appropriately