Skip to content
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] Success toast polish pass #103410

Merged
merged 13 commits into from Jun 28, 2021
Merged

Conversation

cee-chen
Copy link
Member

@cee-chen cee-chen commented Jun 26, 2021

Summary

This PR does the following: (follow along by commit, etc.)

  • Moves our <Toasts /> render to just after the main <App />
    • So unfortunately with the recent KibanaPageTemplate changes, our layout/FlashMessages now rerender on every page navigation. This means toasts were stuttering/rerendering/resetting their dismiss timeout (oof) between each page nav, which was frankly terrible UX. Moving the EuiGlobalToastList component outside of individual pages solves that issue and toasts go back to behaving beautifully.
    • Hilariously enough, this change also solved z-index issues we were having with toasts behaving weirdly when flyouts and modals are open 🤦‍♀️ Who woulda thought!
  • Updates the copy of all success messages to follow EUI's toast guidelines, significantly:
    • For common actions such as create, add, delete, remove, and save, include the object type, the object name if available, and the past tense of the action.
    • Use single quotation marks around the object name if it helps clarify meaning.
    • Don’t. Include "successfully."
    • In some cases with multi-sentence success messages, I split up the 2nd sentence into the toast body.
  • Updates all instances of setSuccessMessage and setQueuedSuccessMessage in App Search to flashSuccessToast. 🍞

Sorry to the WS folks, I didn't have time to take a look at your app before 7.14. It's on my list though!

Screencaps

toasts

There's too many to fully take gifs of, but definitely feel free to pull this locally and check it out!

Checklist

^ Side note - I tested toasts on VO and it works awesome and way better than our flash messages just IMO! Also of course less issues with callouts not being visible on smaller screens or getting scrolled off the page. All in all IMO toasts are excellent.

…ssues

- note: I opted to delete the `<Callouts>` component in favor of just reverting it to the old `<FlashMessages>`, now that FlashMessages is no longer responsible for toasts
- to use a toast instead of a callout
- update copy to match EUI guidelines
- to use a toast instead of a callout
- update copy to match EUI guidelines
- to use a toast instead of a callout
- update copy to match EUI guidelines
- to use a toast instead of a callout
- update copy to match EUI guidelines
- to use a toast instead of a callout
- update copy to match EUI guidelines
- to use a toast instead of a callout
- update copy to match EUI guidelines
- to use a toast instead of a callout
- update copy to match EUI guidelines
- to use a toast (+ toast message) instead of a callout
- update copy to match EUI guidelines
- to use a toast instead of a callout (+ split additional text)
- update copy to match EUI guidelines
- to use a toast instead of a callout
- update copy to match EUI guidelines
@cee-chen cee-chen added release_note:skip Skip the PR/issue when compiling release notes v7.14.0 auto-backport Deprecated: Automatically backport this PR after it's merged labels Jun 26, 2021
@cee-chen cee-chen requested review from a team as code owners June 26, 2021 03:02
- per localization team guidelines - strings that have been changed should get deleted/scheduled to be re-translated
Copy link
Contributor

@byronhulcher byronhulcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is amazing, thank you for your thoroughness. I'm glad we're swapped over to using success toasts now. And you updated copy universally 😅 Thank you @constancecchen!

* NOTE: Toasts are rendered at the highest app level (@see public/applications/index.tsx)
* so that they don't rerender/reset their timers when navigating between pages,
* and also to prevent z-index issues with flyouts and modals
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 extremely good comment

@cee-chen
Copy link
Member Author

@elasticmachine merge upstream

@cee-chen cee-chen enabled auto-merge (squash) June 28, 2021 02:27
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 2.1MB 2.1MB +261.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@cee-chen cee-chen merged commit d339479 into elastic:master Jun 28, 2021
@cee-chen cee-chen deleted the as-success-toasts branch June 28, 2021 04:30
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts

To backport manually run:
node scripts/backport --pr 103410

cee-chen pushed a commit that referenced this pull request Jun 28, 2021
* Fix toasts rerendering/resetting between page navigations + z-index issues

- note: I opted to delete the `<Callouts>` component in favor of just reverting it to the old `<FlashMessages>`, now that FlashMessages is no longer responsible for toasts

* Update engine creation success messages
- to use a toast instead of a callout
- update copy to match EUI guidelines

* Update engine deletion success message
- to use a toast instead of a callout
- update copy to match EUI guidelines

* Update source engines add/delete success messages
- to use a toast instead of a callout
- update copy to match EUI guidelines

* Update crawler domain delete message
- to use a toast instead of a callout
- update copy to match EUI guidelines

* Update API key create/update/delete sucess messages
- to use a toast instead of a callout
- update copy to match EUI guidelines

* Update curations delete success message
- to use a toast instead of a callout
- update copy to match EUI guidelines

* Update results settings success message
- to use a toast instead of a callout
- update copy to match EUI guidelines

* Update relevance tuning success/reset messages
- to use a toast (+ toast message) instead of a callout
- update copy to match EUI guidelines

* Update document deletion success message
- to use a toast instead of a callout (+ split additional text)
- update copy to match EUI guidelines

* Update role mappings create/update/delete success messages
- to use a toast instead of a callout
- update copy to match EUI guidelines

* Run i18n_check --fix

- per localization team guidelines - strings that have been changed should get deleted/scheduled to be re-translated

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_overview_logic.test.ts
#	x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/crawler_overview_logic.ts
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jun 28, 2021
…-png-pdf-report-type

* 'master' of github.com:elastic/kibana: (253 commits)
  [Enterprise Search] Test coverage pass (elastic#103406)
  [App Search] Success toast polish pass  (elastic#103410)
  Role mappings: remove deprecated reset copy (elastic#103411)
  [Fleet] Add a message when log collection is disabled on the log details page (elastic#103166)
  [Query]  Remove es query dependency on format.convert (elastic#103174)
  Home & Kibana Overview Page Template Update (elastic#103003)
  [ML] Converts management app jobs list pages to new layout (elastic#103117)
  Allow additive csp configuration (elastic#102059)
  [Lens] Document common formulas in product and add formula tutorial (elastic#103154)
  [Lens] Enable actions on Lens Embeddable (elastic#102038)
  [Osquery] Return proper indices permissions for osquery_manager package (elastic#103363)
  Dashboard locator (elastic#102854)
  Maps locators (elastic#102810)
  [Fleet] Add support for constant_keyword "value" in package field definitions (elastic#103000)
  [Maps] Add capability to delete features from layer & index (elastic#103145)
  [Security Solution] Correct linux OS lookup for Endpoint Exceptions (elastic#103038)
  [Enterprise Search] Add notices for deactivated users and SMTP callout (elastic#103285)
  [canvas] Reduce bundle size by combining SCSS imports (elastic#102822)
  [Enterprise Search] Final KibanaPageTemplate cleanup (elastic#103355)
  [docs][migrations v2] Update SO migration docs to include removal of index write block when handling corrupt SOs. (elastic#103014)
  ...
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jun 28, 2021
…-policy-2

* 'master' of github.com:elastic/kibana: (190 commits)
  [Enterprise Search] Test coverage pass (elastic#103406)
  [App Search] Success toast polish pass  (elastic#103410)
  Role mappings: remove deprecated reset copy (elastic#103411)
  [Fleet] Add a message when log collection is disabled on the log details page (elastic#103166)
  [Query]  Remove es query dependency on format.convert (elastic#103174)
  Home & Kibana Overview Page Template Update (elastic#103003)
  [ML] Converts management app jobs list pages to new layout (elastic#103117)
  Allow additive csp configuration (elastic#102059)
  [Lens] Document common formulas in product and add formula tutorial (elastic#103154)
  [Lens] Enable actions on Lens Embeddable (elastic#102038)
  [Osquery] Return proper indices permissions for osquery_manager package (elastic#103363)
  Dashboard locator (elastic#102854)
  Maps locators (elastic#102810)
  [Fleet] Add support for constant_keyword "value" in package field definitions (elastic#103000)
  [Maps] Add capability to delete features from layer & index (elastic#103145)
  [Security Solution] Correct linux OS lookup for Endpoint Exceptions (elastic#103038)
  [Enterprise Search] Add notices for deactivated users and SMTP callout (elastic#103285)
  [canvas] Reduce bundle size by combining SCSS imports (elastic#102822)
  [Enterprise Search] Final KibanaPageTemplate cleanup (elastic#103355)
  [docs][migrations v2] Update SO migration docs to include removal of index write block when handling corrupt SOs. (elastic#103014)
  ...

# Conflicts:
#	x-pack/plugins/reporting/server/lib/store/store.test.ts
#	x-pack/plugins/reporting/server/lib/store/store.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated: Automatically backport this PR after it's merged release_note:skip Skip the PR/issue when compiling release notes v7.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants