Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate React edit components to Flow component syntax #3228

Merged
merged 4 commits into from May 17, 2024

Conversation

reosarevok
Copy link
Member

Flow now supports a specific React Component Syntax which reduces the amount of types we need to define manually, and is supposed to be better for type checking as well. I'm converting our React components to this syntax bit by bit with this PR.

This changes all stuff in the edit subfolder.

Note: To be reviewed without whitespace changes (since this adds explicit return() calls that require spacing things one more tab in many cases).

On top of #3226

@reosarevok reosarevok added the Refactoring Refactoring-only PRs (eslint fixes etc) label Apr 9, 2024
@reosarevok reosarevok force-pushed the flow-component-syntax-edits branch from aa4f488 to aaae02f Compare May 16, 2024 06:50
@reosarevok reosarevok marked this pull request as ready for review May 16, 2024 06:50
Copy link
Contributor

@yvanzo yvanzo left a comment

Choose a reason for hiding this comment

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

LGTMBDNT. Thanks for the detailed commit message. 🚢

For VoteCheckbox in Vote.js, Flow was unhappy with us passing
a generic ...props to the input, since in theory the props can
contain different name, type etc from what we're passing separately.
This just changes it to pass value specifically, which seems to be
the intention based on Flow typing.
@reosarevok reosarevok force-pushed the flow-component-syntax-edits branch from aaae02f to d508023 Compare May 17, 2024 09:20
@reosarevok reosarevok merged commit bc90903 into metabrainz:master May 17, 2024
2 checks passed
@reosarevok reosarevok deleted the flow-component-syntax-edits branch May 17, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring Refactoring-only PRs (eslint fixes etc)
Projects
None yet
2 participants