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

Use transient props for all styled components #3049

Merged
merged 8 commits into from
Nov 3, 2023

Conversation

koesie10
Copy link
Member

@koesie10 koesie10 commented Nov 2, 2023

This switches all styled components I could find with custom props to using transient props. It's easiest to review this commit-by-commit; each commit changes 1 component.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@koesie10 koesie10 marked this pull request as ready for review November 2, 2023 14:07
@koesie10 koesie10 requested review from a team as code owners November 2, 2023 14:07
Copy link
Contributor

@robertbrignull robertbrignull left a comment

Choose a reason for hiding this comment

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

Changes to transient props look good, though possibly with one unintended change.

@@ -68,7 +68,7 @@ export const VariantAnalysisRepositoriesStats = ({
if (variantAnalysisStatus === VariantAnalysisStatus.Failed) {
return (
<>
0<HorizontalSpace size={2} />
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure the 0 was a bug. Or if we do want to remove it, do we need to also remove some whitespace before the icon?

It might be simpler regardless to leave it for this PR and address as a separate PR. What do you think?

Screenshot before:
Screenshot 2023-11-02 at 16 10 34

Screenshot after:
Screenshot 2023-11-02 at 16 10 48

Copy link
Member Author

Choose a reason for hiding this comment

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

I think you're right. This just looked like an accidental typo, but I didn't actually check whether that was the case.

In this case, I would have expected something like 0 <ErrorIcon label="Variant analysis failed" /> rather than a separate element for the spacing.

Copy link
Contributor

@charisk charisk left a comment

Choose a reason for hiding this comment

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

LGTM!

@koesie10 koesie10 merged commit 146732f into main Nov 3, 2023
@koesie10 koesie10 deleted the koesie10/styled-transient-props branch November 3, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants