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

fix(protocol-designer): fix labware tools filtering and expand/collapse behavior #16889

Merged
merged 6 commits into from
Nov 20, 2024

Conversation

ncdiehl11
Copy link
Collaborator

@ncdiehl11 ncdiehl11 commented Nov 19, 2024

Overview

This PR addresses several functional issues with our LabwareTools component, produced when adding labware to the starting deck state. Here, I add filtering to populated expanded categories, allow independent expand/collapse toggling for multiple categories simultaneously, and auto expand/collapse all categories based on the state of the current search term.

NOTE: This component is pretty bloated as is, and I think we can address condensing filtering logic and improving performance in a followup. Also, I notice a ton of rerenders after mounting— I will address in a followup.

Closes RQA-3590
Closes RQA-3339

Screen.Recording.2024-11-19.at.12.16.52.PM.mov

Test Plan and Hands on Testing

  • navigate to starting deck and add hardware/labware to a slot
  • click labware tab
  • upload a custom definition or two and verify that custom labware category shows and is expanded
  • click around categories and verify that they can be expanded/collapsed independently
  • begin typing a search term and verify that only populated categories show, and all categories are expanded
  • verify that with search term still present, each category can be collapsed/expanded independently
  • delete the search term either by backspacing all the way or clicking the 'X' icon, and verify that all categories appear and all collapsed

Changelog

  • fix filtering for populated categories
  • add state that handles all categories expanded/collapsed state simultaneously
  • pluralize category titles

Review requests

  • see test plan

Risk assessment

medium

…se behavior

This PR addresses several functional issues with our LabwareTools component, produced when adding
labware to the starting deck state. Here, I add filtering to populated expanded categories, allow
independent expand/collapse toggling for multiple categories simultaneously, and auto
expand/collapse all categories based on the state of the current search term.

Closes RQA-3590
@ncdiehl11 ncdiehl11 self-assigned this Nov 19, 2024
@ncdiehl11 ncdiehl11 marked this pull request as ready for review November 19, 2024 17:18
@ncdiehl11 ncdiehl11 requested review from a team as code owners November 19, 2024 17:18
Copy link
Contributor

@koji koji left a comment

Choose a reason for hiding this comment

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

sandbox worked as expected

@jerader
Copy link
Collaborator

jerader commented Nov 19, 2024

| Also, I notice a ton of rerenders after mounting— I will address in a followup

@ncdiehl11 by rerendering, do you mean deck setup tools rerenders a bunch of times when you zoom into a slot? if so, that's a known issue: https://opentrons.atlassian.net/browse/AUTH-769

Copy link
Collaborator

@jerader jerader left a comment

Choose a reason for hiding this comment

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

makes sense to me. might be worth in a followup when we refactor/clean up these components to add setSeachTerm/searchTerm and areCategoriesExpanded/setAreCategoriesExpanded to redux. Thanks for fixing this!

@ncdiehl11
Copy link
Collaborator Author

| Also, I notice a ton of rerenders after mounting— I will address in a followup

@ncdiehl11 by rerendering, do you mean deck setup tools rerenders a bunch of times when you zoom into a slot? if so, that's a known issue: https://opentrons.atlassian.net/browse/AUTH-769

yes. I think it may be introduced in this component. We can get to it soon

@ncdiehl11 ncdiehl11 merged commit 71b21ae into edge Nov 20, 2024
51 checks passed
@ncdiehl11 ncdiehl11 deleted the pd_fix-labwaretools-filtering branch November 20, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants