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

chore: fix storybook flakes#19366

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 5 commits intomainfrombq/fix-storybook-flakes-2
Aug 15, 2025
Merged

Conversation

BrunoQuaresma
Copy link
Collaborator

Close#19365

Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

I'm not so sure what thereactRouterOutlet change does, but the removal of random data inputs and randomized workspace names both seem reasonable to me 👍

I'd like a +1 from@aslilac before merge.

BrunoQuaresma reacted with thumbs up emoji
@aslilac
Copy link
Member

taking a look now

BrunoQuaresma reacted with thumbs up emoji

Comment on lines -34 to -40
data:Array.from({length:30}).map((_,i)=>{
constdate=newDate(2024,0,i+1);
return{
date:date.toISOString().split("T")[0],
amount:5+Math.floor(Math.random()*15),
};
}),
Copy link
Member

Choose a reason for hiding this comment

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

thank you for just unrolling this loop. 😄 this implementation was clever but is far less understandable at a glance, despite being like 1/3rd the lines of code.

BrunoQuaresma reacted with thumbs up emoji

exportconstgenerateWorkspaceName=()=>{
if(isChromatic()){
return"chromatic-workspace";
Copy link
Member

Choose a reason for hiding this comment

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

I like the idea of just returning a constant here, but could it still be one of our actual random names just for fun?

I just got "yellow-bird-23" as a suggestion which is pretty cute 😌

BrunoQuaresma reacted with thumbs up emoji
constmeta={
title:"pages/WorkspaceSchedulePage",
component:WorkspaceSchedulePage,
component:WorkspaceSettingsLayout,
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer that thiscomponent stay "correct", but the way the react-router storybook addon works really confuses me, so I don't really have a better idea.

Copy link
CollaboratorAuthor

@BrunoQuaresmaBrunoQuaresmaAug 15, 2025
edited
Loading

Choose a reason for hiding this comment

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

Me too. The issue was, when using the nested layout function, the react-router decorator was load before any other local decorators, because of how we set it in the preview config, injecting the workspace settings layout before the dashboard provider that is required to make the it work.

IMO, we should simplify the global decorators and let the stories define what they want to use. Improving performance and make easier to identify the story dependencies.

@BrunoQuaresmaBrunoQuaresma merged commitbed4e12 intomainAug 15, 2025
27 checks passed
@BrunoQuaresmaBrunoQuaresma deleted the bq/fix-storybook-flakes-2 branchAugust 15, 2025 19:07
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 15, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@aslilacaslilacaslilac approved these changes

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@BrunoQuaresmaBrunoQuaresma

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Fix storybook flakes

3 participants

@BrunoQuaresma@aslilac@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp