Skip to content

Conversation

lindapaiste
Copy link
Collaborator

Fixes #2821

This does not change any UI anywhere in the app. It removes some unused code and enables us to use the <Button> component inline in the future. There is more that could be refactored and cleaned up but I'm keeping this PR minimal.

Changes:

  • Modify the core StyledButton component to use either display: inline-flex or display: flex, depending on the value of the display prop.
  • Deleted the StyledIconButton component which was not used anywhere. Confusingly, the existing IconButton component which we use on mobile is an extension of the StyledInlineButton rather than the StyledIconButton.
  • Maintain the styles of the current IconButton component by passing down the prop iconOnly and using this prop to switch components rather than switching based on the display prop.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

@lindapaiste lindapaiste added the Area: Code Quality For refactoring, cleanup, or improvements to maintainability label Jan 1, 2024
@lindapaiste lindapaiste requested a review from raclim January 1, 2024 22:04
Copy link
Contributor

@PiyushChandra17 PiyushChandra17 left a comment

Choose a reason for hiding this comment

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

Nicely Done 👍

@raclim raclim added this to the MINOR Release for 2.11.0 milestone Jan 8, 2024
Copy link
Collaborator

@raclim raclim left a comment

Choose a reason for hiding this comment

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

I think this looks good to me! Thanks for working on this!

@raclim raclim merged commit 3cbf4c5 into processing:develop Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Code Quality For refactoring, cleanup, or improvements to maintainability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Button component has a different set of styles with prop display="inline"

3 participants