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

Refactor equipment maintenance components #1418

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

axelboc
Copy link
Collaborator

@axelboc axelboc commented Sep 25, 2024

This refers to the SampleChangerMaintenance, HarvesterMaintenance and PlateManipulatorMaintenance components rendered on the Equipment page.

  • Move ActionGroup, ActionButton, ActionField into separate files and refactor them slightly (notably, ActionButton no longer takes care of sending the maintenance command; it just exposes an onClick prop).
  • Let PlateManipulatorMaintenance use those "Action" components (it was using its own duplicated "Action" components).
  • Refactor the "Maintenance" components to function components, refactor them to remove unnecessary render methods (renderActionGroup, renderActionButton, etc.)
  • Let the "Maintenance" retrieve the state they need from the Redux store instead of passing it down from EquipmentContainer.

@axelboc axelboc marked this pull request as ready for review September 25, 2024 14:48
@marcus-oscarsson
Copy link
Member

Ahh, it always feels nice with a good cleanup :) Thanks !

@marcus-oscarsson marcus-oscarsson merged commit 2e3c139 into develop Sep 26, 2024
13 checks passed
@marcus-oscarsson marcus-oscarsson deleted the ab-maintenance-refactor branch September 26, 2024 11:16
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