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: refactor schedule banner#4274

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
presleyp merged 11 commits intomainfrombump/presleyp/3566
Sep 30, 2022
Merged

chore: refactor schedule banner#4274

presleyp merged 11 commits intomainfrombump/presleyp/3566
Sep 30, 2022

Conversation

presleyp
Copy link
Contributor

@presleyppresleyp commentedSep 30, 2022
edited
Loading

  • move more logic from component to XState
  • logically, the schedule banner machine is part of the workspace page machine because it depends ondeadline, which comes fromworkspace. But the workspace page machine is huge. So instead of inlining the schedule banner machine inside the workspace page machine, Iinvoke it. This requires breaking the workspace page component into two components, because you can use a hook (to access the child machine) inside a conditional (which ensures the child machine has been invoked).
  • fix color of Auto-Stop switch to match color of Auto-Start switch and not look disabled

I notice there's a pre-existing bug where we show a success message even if you try to increase (or decrease) beyond the max (or min) and so no change takes effect; something to fix later.

@presleyppresleyp marked this pull request as ready for reviewSeptember 30, 2022 17:48
@presleyppresleyp requested a review froma team as acode ownerSeptember 30, 2022 17:48
@presleyppresleyp requested review fromBrunoQuaresma and removed request fora teamSeptember 30, 2022 17:48
return <FullScreenLoader />
} else if (!template) {
return <FullScreenLoader />
} else if (workspace && workspaceState.matches("ready")) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is not something we could use the Choose one component?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Ooh good catch!

// },
// clearScheduleBannerRef: assign({
// scheduleBannerRef: (_) => undefined
// }),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we remove these?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

yes thank you! Makes me realize - I tried both ways, spawning and invoking, and I wrote that I spawned but I really invoked! Haha, you can see why, invoking requires less code.

Copy link
Collaborator

@BrunoQuaresmaBrunoQuaresma left a comment

Choose a reason for hiding this comment

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

LGTM. Nice refactoring!

@presleyppresleyp merged commitd931b2c intomainSep 30, 2022
@presleyppresleyp deleted the bump/presleyp/3566 branchSeptember 30, 2022 21:39
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@BrunoQuaresmaBrunoQuaresmaBrunoQuaresma approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@presleyp@BrunoQuaresma

[8]ページ先頭

©2009-2025 Movatter.jp