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(app): Center app and robot update modals #14541

Merged
merged 4 commits into from
Feb 26, 2024

Conversation

mjhuff
Copy link
Contributor

@mjhuff mjhuff commented Feb 22, 2024

Closes RQA-2349

Overview

This PR fixes an issue in which the app and robot update modals are not properly centered (as a bonus, the module setup modal is also properly centered).

There's a lot we can do to make this issue less likely to occur in the future, and I've added a note to revisit this topic in the tech debt paydown doc. Because we don't have standardized modal sizing, custom modal widths require a custom left margin offset in order to be properly centered.

At a bare minimum, adding testing to custom width/left-margin modals is a good idea. This at least shows we've gone out of the way to center the modal properly, and anyone who tries to adjust width only will fail a test and have to re-center the modal.

A better, longer-term solution off the top of my head would be to standardize modal sizes (convo w/ design).

Test Plan

  • Downloaded this build of the app.
  • Verified that the app update modal is centered (select the alpha channel if you aren't already on it).
  • Opened up a robot update modal and verify the robot update modal is centered.
  • Verified that no other modals were negatively impacted by this change.
  • If you'd like to try this yourself and you don't have a robot, you may have to finagle the code a bit to get the banners to show, but it is possible!

Changelog

  • Desktop app update modals are now properly centered.

Risk assessment

low

@mjhuff mjhuff requested review from ecormany and a team February 22, 2024 16:48
@mjhuff mjhuff requested a review from a team as a code owner February 22, 2024 16:48
@mjhuff mjhuff requested review from b-cooper and removed request for a team and b-cooper February 22, 2024 16:48
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (78c85fc) 67.74% compared to head (bd5a042) 67.74%.
Report is 2 commits behind head on chore_release-7.2.0.

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##           chore_release-7.2.0   #14541      +/-   ##
=======================================================
- Coverage                67.74%   67.74%   -0.01%     
=======================================================
  Files                     2517     2517              
  Lines                    72087    72150      +63     
  Branches                  9284     9330      +46     
=======================================================
+ Hits                     48834    48876      +42     
- Misses                   21035    21051      +16     
- Partials                  2218     2223       +5     
Flag Coverage Δ
app 64.64% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
app/src/molecules/LegacyModal/index.tsx 100.00% <100.00%> (ø)
...RobotSettings/UpdateBuildroot/UpdateRobotModal.tsx 81.25% <ø> (ø)
...RobotSettingsDashboard/RobotSystemVersionModal.tsx 100.00% <ø> (ø)
app/src/organisms/UpdateAppModal/index.tsx 89.47% <ø> (ø)

... and 4 files with indirect coverage changes

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.

LGTM!

@mjhuff mjhuff merged commit 76a4b03 into chore_release-7.2.0 Feb 26, 2024
30 checks passed
@mjhuff mjhuff deleted the app_fix-modal-alignment branch February 26, 2024 15:20
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