Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test(site): make loading snapshots more predictable#14564

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 3 commits intomainfrombq/determinate-loading-on-storybook
Sep 4, 2024

Conversation

BrunoQuaresma
Copy link
Collaborator

@BrunoQuaresmaBrunoQuaresma commentedSep 4, 2024
edited
Loading

Abstracts the Spinner component to control the display of the CircularProgress component. This allows us to make it static during Chromatic tests, making loading tests easier to visualize.

Before:
Screenshot 2024-09-04 at 14 00 44

After:
Screenshot 2024-09-04 at 14 00 49

Abstracts the Spinner component to control the display of the CircularProgress component. This allows us to make it static during Chromatic tests, making loading tests easier to visualize.
@BrunoQuaresmaBrunoQuaresma self-assigned thisSep 4, 2024
@BrunoQuaresmaBrunoQuaresma requested review froma team andKira-Pilot and removed request fora teamSeptember 4, 2024 17:01
@@ -18,7 +18,7 @@ export const Loader: FC<LoaderProps> = ({
data-testid="loader"
{...attrs}
>
<CircularProgress size={size} />
<Spinner aria-label="Loading..." size={size} />
Copy link
Member

Choose a reason for hiding this comment

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

I might be misunderstanding but it seems we have aLoader component wrapping aSpinner component wrapping aCircularProgress component. Is there a reason to have 3 levels nesting here?

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

Good point! The purpose of the 'Loader' is to act as a container that centrally positions the loading spinner on the page or within a section, with some padding around it. Meanwhile, the 'Spinner' can be utilized in other components, such as loading buttons. Perhaps 'Loader' is not the most suitable name, but I can't think of anything better at the moment.

Copy link
Member

Choose a reason for hiding this comment

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

Ahh, makes sense!Loader works for me :)

BrunoQuaresma reacted with thumbs up emoji
@Kira-Pilot
Copy link
Member

Kira-Pilot commentedSep 4, 2024
edited
Loading

One suggestion: we could stick the aria on the actual component so theSpinner is always labeled correctly. Then consumers of the component could pass in a more specific label and override the default, e.g. "Loading the Workspaces Page".

*/
if (isChromatic()) {
props.variant = "determinate";
props.value = 75;
Copy link
Member

Choose a reason for hiding this comment

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

nice

@BrunoQuaresma
Copy link
CollaboratorAuthor

One suggestion: we could stick the aria on the actual component so theSpinner is always labeled correctly. Then consumers of the component could pass in a more specific label and override the default, e.g. "Loading the Workspaces Page".

I like the idea! 👍

@BrunoQuaresmaBrunoQuaresma merged commitc3f0db3 intomainSep 4, 2024
27 checks passed
@BrunoQuaresmaBrunoQuaresma deleted the bq/determinate-loading-on-storybook branchSeptember 4, 2024 18:20
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 4, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@Kira-PilotKira-PilotKira-Pilot approved these changes

Assignees

@BrunoQuaresmaBrunoQuaresma

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@BrunoQuaresma@Kira-Pilot

[8]ページ先頭

©2009-2025 Movatter.jp