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

feat(app): ODD protocol detail and protocol setup status for deck configuration #13855

Merged
merged 11 commits into from
Nov 7, 2023

Conversation

ncdiehl11
Copy link
Collaborator

@ncdiehl11 ncdiehl11 commented Oct 26, 2023

closes RAUT-667

Overview

The ODD ProtocolSetup page should render the correct module and deck status taking into account module calibration and connection, and now deck configuration. We need to check for the current deck configuration state to ensure the protocol doesn't require hardware where a fixture currently exists, and alert the user of a location conflict if necessary. The status will also render modules and/or fixtures are missing. This hardware status will also be rendered as the chipText on the ProtocolDetails page.

Test Plan

Testing all cases below on a physical Flex

Protocol requires neither modules nor fixtures

  • render disabled setup step with text that no hardware is needed

Screen Shot 2023-11-01 at 1 53 33 PM

Protocol requires only modules

  • connected, and calibrated: setup step is ready and renders number of modules attached
    Screen Shot 2023-11-01 at 2 13 45 PM
  • connected and not calibrated: setup step is not ready and renders 'Calibration required'
    Screen Shot 2023-11-01 at 2 00 08 PM
  • not connected: setup step is not ready and renders "Missing " or "Missing <#> modules"
    Screen Shot 2023-11-01 at 2 03 18 PM
    Screen Shot 2023-11-01 at 2 06 26 PM
  • location conflict with deck configuration: setup step is not ready and renders location conflict
    Screen Shot 2023-11-01 at 2 07 51 PM

Protocol requires only fixtures

  • properly configured: setup step is ready and renders number of fixtures attached
    Screen Shot 2023-11-01 at 2 22 43 PM
  • location conflict with deck configuration: setup step is not ready and renders location conflict
    Screen Shot 2023-11-01 at 2 25 03 PM
  • not configured: setup step is not ready and renders "Missing or "Missing <#> fixtures"
    Screen Shot 2023-11-01 at 2 27 16 PM
    Screen Shot 2023-11-01 at 2 29 55 PM

Protocol requires both modules and fixtures

  • location conflict for any modules or fixtures with deck configuration: setup step is not ready and renders location conflict
  • fixtures configured but modules missing: setup step is not ready and renders "Missing " or "<#> modules missing"
    Screen Shot 2023-11-01 at 2 35 03 PM
  • modules connected but fixtures missing: setup step is not ready and renders "Missing " or "<#> fixtures missing"
    Screen Shot 2023-11-01 at 2 49 28 PM
  • fixtures configured and modules connected but module calibrations missing: setup step is not ready and renders "Calibration required"
    Screen Shot 2023-11-01 at 2 52 02 PM
  • fixtures not configured and modules not connected: setup step is not ready and renders "Missing hardware"
    Screen Shot 2023-11-01 at 2 37 05 PM
  • fixtures configured and modules connected and calibrated: setup step is ready and renders number of fixtures and modules attached
    Screen Shot 2023-11-01 at 2 51 10 PM

Changelog

  • add hooks for missing and required protocol hardware to optionally accept a protocol analysis object instead of a protocol ID (when called from ProtocolSetup page rather than ProtocolDetails page)
  • change rendered text in Modules and deck setup step depending on conflicting, missing, or un-calibrated hardware
  • add a hook for getting the number of unready instruments to render on the instruments setup step
  • add keys to translation files
  • update tests to look for updated for setup step text

Review requests

@brenthagen as discussed in person

Risk assessment

medium. Main risk lies in the enabling/disabling of the protocol Play button based on new deck configuration considerations

…configuration

ODD: Render the correct modules and deck status taking into account location conflicts, missing
hardware, and missing calibrations. Render this status in both ProtocolDetails (chipText) and
ProtocolSetup (Modules & deck) pages. Extend hooks to look for conflicting or missing hardware
@ncdiehl11 ncdiehl11 requested a review from a team as a code owner October 26, 2023 21:13
@ncdiehl11 ncdiehl11 requested review from koji and removed request for a team October 26, 2023 21:13
@ncdiehl11 ncdiehl11 marked this pull request as draft October 26, 2023 21:14
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #13855 (da84a11) into edge (b242919) will decrease coverage by 0.14%.
Report is 22 commits behind head on edge.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #13855      +/-   ##
==========================================
- Coverage   70.86%   70.72%   -0.14%     
==========================================
  Files        2501     1624     -877     
  Lines       70338    53755   -16583     
  Branches     8600     3775    -4825     
==========================================
- Hits        49844    38020   -11824     
+ Misses      18398    15081    -3317     
+ Partials     2096      654    -1442     
Flag Coverage Δ
app 43.57% <ø> (-25.31%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 886 files with indirect coverage changes

@ncdiehl11 ncdiehl11 self-assigned this Oct 27, 2023
@ncdiehl11 ncdiehl11 marked this pull request as ready for review October 27, 2023 18:01
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.

looking good to far! The main thing I noticed in your i18n strings is you're inconsistent when you use {{count}} vs {{num}}. Since count is associated with the plural usage, it would be good to only use {{count}} when using plural.

app/src/assets/localization/en/protocol_setup.json Outdated Show resolved Hide resolved
app/src/assets/localization/en/protocol_setup.json Outdated Show resolved Hide resolved
app/src/assets/localization/en/protocol_setup.json Outdated Show resolved Hide resolved
app/src/assets/localization/en/protocol_setup.json Outdated Show resolved Hide resolved
app/src/organisms/ProtocolSetupInstruments/utils.ts Outdated Show resolved Hide resolved
app/src/organisms/ProtocolSetupInstruments/utils.ts Outdated Show resolved Hide resolved
app/src/pages/OnDeviceDisplay/ProtocolSetup/index.tsx Outdated Show resolved Hide resolved
app/src/pages/OnDeviceDisplay/ProtocolSetup/index.tsx Outdated Show resolved Hide resolved
app/src/pages/OnDeviceDisplay/ProtocolSetup/index.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@brenthagen brenthagen left a comment

Choose a reason for hiding this comment

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

left a few comments - main one is to make sure we're only making changes to protocol setup status here

Copy link
Contributor

@brenthagen brenthagen left a comment

Choose a reason for hiding this comment

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

code makes sense to me, checked a few different states but not all - let's be sure to comment out the isReadyToRun condition before merging

app/src/pages/Protocols/hooks/index.ts Outdated Show resolved Hide resolved
app/src/pages/Protocols/hooks/index.ts Outdated Show resolved Hide resolved
app/src/pages/OnDeviceDisplay/ProtocolSetup/index.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@brenthagen brenthagen left a comment

Choose a reason for hiding this comment

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

LGTM !

@ncdiehl11 ncdiehl11 merged commit 8fedef6 into edge Nov 7, 2023
20 of 22 checks passed
@ncdiehl11 ncdiehl11 deleted the feat_app-ODD-protocol-setup-deck-config branch November 7, 2023 16:18
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.

None yet

4 participants