feat(loading-spinner): support loading text below spinner#1957
feat(loading-spinner): support loading text below spinner#1957chintankavathia wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces an optional loadingText input to the SiLoadingSpinnerComponent and SiLoadingSpinnerDirective, allowing translatable text to be displayed below the spinner. The changes include styling updates to support a vertical layout, logic to pass the text through the directive's portal, and a new example page. Review feedback focused on aligning user-facing strings in tests and examples with UX writing guidelines, specifically regarding the use of the ellipsis character, sentence casing, and avoiding polite fillers like "please".
8e6aaad to
94a1146
Compare
spliffone
left a comment
There was a problem hiding this comment.
Could we adjust the the existing si-loading-spinner and si-loading-spinner-directive examples instead of a new example?
Summary
Adds a
loadingTextinput toSiLoadingSpinnerDirectiveandSiLoadingSpinnerComponentthat displays an optional translatable text label below the spinner animation.Motivation
Our Loading pattern already documents and visually shows a spinner with accompanying text, and the best practices explicitly recommend:
However, until now there was no built-in way to render that text — consumers had to implement custom overlays or workarounds to achieve what the pattern already prescribes. This gap between documented guidance and available API caused inconsistent implementations across teams.
What's included
loadingTextinput on both the directive ([siLoading]) and the component (si-loading-spinner), accepting aTranslatableStringfor i18n support.flex-direction: columnso text renders centered below the SVG.loadingTextwhile the spinner is active updates the displayed text immediately viasetInput.si-loading-spinner-text) demonstrating a realistic full-page loading state with contextual text ("Loading Dashboard…").Usage
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: