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: migrate off paragon modal deprecated migration #872

Merged
merged 10 commits into from
Feb 8, 2024

Conversation

Mashal-m
Copy link
Contributor

Ticket

Migrate off deprecated Paragon components

What has Changed?

Migrate off paragon modal deprecation in

  • CodeAssignmentModal/index.jsx
  • CodeReminderModal/index.jsx
  • CodeRevokeModal/index.jsx
  • InviteLearnersModal/index.jsx

@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (2193013) 85.43% compared to head (42b9c4c) 83.02%.

❗ Current head 42b9c4c differs from pull request most recent head 37a8719. Consider uploading reports for the commit 37a8719 to get more accurate results

Files Patch % Lines
src/components/CodeRevokeModal/index.jsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #872      +/-   ##
==========================================
- Coverage   85.43%   83.02%   -2.41%     
==========================================
  Files         497      412      -85     
  Lines       10777     8830    -1947     
  Branches     2262     1816     -446     
==========================================
- Hits         9207     7331    -1876     
+ Misses       1527     1460      -67     
+ Partials       43       39       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arbrandes
Copy link

@adamstankiewicz, not sure who to direct the review request for this one, but something tells me you might know.

src/components/CodeAssignmentModal/index.jsx Outdated Show resolved Hide resolved
src/components/CodeAssignmentModal/index.jsx Outdated Show resolved Hide resolved
/>
<div ref={this.modalRef}>
<ModalDialog
isOpen
Copy link
Member

Choose a reason for hiding this comment

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

nit: technically, we should be rendering this component with isOpen={false} instead of only rendering CodeAssignmentModal itself when isOpen=true already. I defer to you if you'd like to tackle this refactoring through this PR as this is an existing problem and a bit out of scope of just moving Modal -> ModalDialog here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I get it, I guess there are already many changes in this PR, a separate PR for this work would be better.

src/components/CodeAssignmentModal/index.jsx Outdated Show resolved Hide resolved
src/components/CodeAssignmentModal/index.jsx Outdated Show resolved Hide resolved
>
<>
{mode === MODAL_TYPES.assign && submitting && <Icon className="fa fa-spinner fa-spin mr-2" />}
{`Assign ${isBulkAssign ? 'Codes' : 'Code'}`}
Copy link
Member

Choose a reason for hiding this comment

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

nit: the convention for our CTA buttons is to have sentence case (e.g., "Assign codes", "Assign code", "Save template")

<ModalDialog.CloseButton variant="link">
Cancel
</ModalDialog.CloseButton>
<Button
Copy link
Member

Choose a reason for hiding this comment

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

nit: This Button could be replaced with a StatefulButton (docs), but may be out of scope of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, there are already many changes in this PR, a separate PR for this work would be better.

src/components/CodeReminderModal/index.jsx Show resolved Hide resolved
src/components/InviteLearnersModal/index.jsx Outdated Show resolved Hide resolved
@Mashal-m Mashal-m force-pushed the mashal-m/paragon-modal-deprecation branch from 3084981 to e89f772 Compare June 2, 2023 08:24
@Mashal-m Mashal-m force-pushed the mashal-m/paragon-modal-deprecation branch from 1138dd7 to 473c88d Compare July 27, 2023 14:44
@feanil
Copy link
Contributor

feanil commented Feb 8, 2024

This has stagnated for 6 months, given that the only issues are nits I'm gonna merge this as is, and assume a follow-up PR will fix those nits if it makes sense. I'd like to unblock the deprecation work here.

@feanil feanil merged commit 1b3c6f7 into master Feb 8, 2024
4 checks passed
@feanil feanil deleted the mashal-m/paragon-modal-deprecation branch February 8, 2024 19:26
@adamstankiewicz
Copy link
Member

@feanil Just a heads up... for whatever reason this repo does not seem to be failing CI on PRs when linting throws errors. If you look at the "Files changed" on this PR, you'll see several linting annotations, one of which is throwing several JS errors in production, causing a critical user flow to break where our admins can't invite learners to their subscription plans (i.e., Spinner is not defined`).

We will fix forward.

Also worth noting, the Enterprise Quokkas team did recently pick up an epic to wrap up the Paragon deprecation work in this MFE; Enterprise Engineering was purposely holding off on reviewing/fixing/merging the Paragon deprecation PRs in this repo until we could dedicate adequate time for QA, etc., especially with the Table -> DataTable migration given that has design implications that needs verification with our design team.

@feanil
Copy link
Contributor

feanil commented Feb 14, 2024

Hey @adamstankiewicz I'm sorry that this caused issues in production. Good to know that further work for the deprecation is getting prioritized now. Is there a github issue or ticket on your side for fixing CI so that we can catch these issues before it goes to production. Also, are there automated tests that would have caught this outside of the linting that weren't run or need to be written?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants