components
components copied to clipboard
feat: introduction of tooltips to trigger-buttons in AppLayout VisualRefresh
Description
- Adds logic to render tooltips for the trigger-buttons in toolbar
- Pulls the trigger-buttons for mobile and desktop into the same file with a
isMobile
prop that renders accordingly yet the tooltip logic can live in its wrapping element - when using the trigger-button, it by default has no tooltip, with when the props
hasTooltip
it will then render a tooltip if there is another prop fortooltipText
orariaLabel
as a fallback. This way the trigger-button won't create a tooltip for other uses - when the trigger-button is rendered without tooltip, there are no eventlisteners being created for it.
Will update with more with next PR
Related links, issue #, if available: n/a
How has this been tested?
- Unit tests created for the Trigger-button explicitly
- Assertions of tooltips are also added in the drawers tests
Review checklist
You can see the UI changes on this page deployment Note on both mobile and desktop:
Correctness
- Changes include appropriate documentation updates.
-
Changes are backward-compatible if not indicated, see
CONTRIBUTING.md
. -
Changes do not include unsupported browser features, see
CONTRIBUTING.md
. - Changes were manually tested for accessibility, see accessibility guidelines.
Security
-
If the code handles URLs: all URLs are validated through the
checkSafeUrl
function.
Testing
- Changes are covered with new/existing unit tests?
- Changes are covered with new/existing integration tests?
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.