feat(skeleton): forward a loadingLabel through the composed skeletons - #4
Merged
Conversation
`Skeleton` takes its accessible name as a prop with an English default, which is how a translated consumer supplies its own. `SkeletonCard`, `SkeletonText` and `SkeletonRow` render Skeletons themselves and had no way to pass one through, so a card's nine nested skeletons announced "Loading" however well the consumer was translated, with nothing in its code able to change that. Each now takes `loadingLabel` and forwards it. Left undefined, the inner Skeleton falls back to its own default, so nothing changes for a consumer that does not pass one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
SkeletonCard,SkeletonTextandSkeletonRowtake aloadingLabeland forward it to everySkeletonthey render.Skeletonhas always taken its accessible name as a prop with an English default, which is how a translated consumer supplies its own. The composed skeletons render Skeletons themselves and offered no way to pass one through, so a card's nine nested skeletons announced "Loading" however well the consumer was translated, and nothing in the consumer's code could change it.Left undefined, the inner
Skeletonfalls back to its own default, so a consumer that does not pass one sees no change.How it surfaced
The same way the stylesheets and the illustrations did: a consumer's migration reached the boundary and found there was no way across. The product being migrated resolves this label from its locale bundle today, and moving to the package would have quietly dropped it for every nested skeleton.
Verification
pnpm run verifygreen. Release as0.1.0-alpha.4.