Skip to content

Reduce repetition in MultipleModeledMethodsPanel.spec.tsx#3402

Merged
koesie10 merged 1 commit intomainfrom
koesie10/simplify-multiple-modeled-methods-panel-spec
Feb 23, 2024
Merged

Reduce repetition in MultipleModeledMethodsPanel.spec.tsx#3402
koesie10 merged 1 commit intomainfrom
koesie10/simplify-multiple-modeled-methods-panel-spec

Conversation

@koesie10
Copy link
Copy Markdown
Member

Adding or removing a prop from the MultipleModeledMethodsPanel component required adding/removing that prop from almost 40 separate places in this file (29 tests + 9 rerender calls = 38). This moves all of this to a simple render function that doesn't require any props, so now you only need to change it in 1 place (baseProps).

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 February 23, 2024 14:53
@koesie10 koesie10 requested a review from a team as a code owner February 23, 2024 14:53
Copy link
Copy Markdown
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.

Nice!

@koesie10 koesie10 merged commit 8063d6c into main Feb 23, 2024
@koesie10 koesie10 deleted the koesie10/simplify-multiple-modeled-methods-panel-spec branch February 23, 2024 15:32
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.

2 participants