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

MBS-13558 (II): Migrate React report components to Flow component syntax #3226

Merged

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 report 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 #3225

@reosarevok reosarevok added the Refactoring Refactoring-only PRs (eslint fixes etc) label Apr 5, 2024
@reosarevok reosarevok force-pushed the flow-component-syntax-reports branch from 3645908 to 9a43c68 Compare April 16, 2024 09:06
@reosarevok reosarevok changed the title Migrate React report components to Flow component syntax MBS-13558 (II): Migrate React report components to Flow component syntax Apr 26, 2024
@reosarevok reosarevok force-pushed the flow-component-syntax-reports branch from 9a43c68 to 85d8229 Compare April 26, 2024 12:54
@reosarevok reosarevok marked this pull request as ready for review April 26, 2024 12:54
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.

LGTM but would like to know more about the three-dot ellipsis, see comment.

root/report/AnnotationsArtists.js Show resolved Hide resolved
See the component syntax docs, and especially
https://flow.org/en/docs/react/component-syntax/#destructuring-parameters
which we use so we can still use the existing shared types more easily
rather than adding the typing specifically in each component declaration.
@reosarevok reosarevok force-pushed the flow-component-syntax-reports branch from 85d8229 to 387d8b7 Compare May 15, 2024 18:53
@reosarevok reosarevok merged commit e24483e into metabrainz:master May 16, 2024
1 of 2 checks passed
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