-
Notifications
You must be signed in to change notification settings - Fork 106
refactor: Build new action buttons for cancel confirmation modal [FC-0076] #1732
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: Build new action buttons for cancel confirmation modal [FC-0076] #1732
Conversation
Thanks for the pull request, @ChrisChV! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1732 +/- ##
=======================================
Coverage 93.53% 93.53%
=======================================
Files 1132 1132
Lines 23043 23047 +4
Branches 4864 4867 +3
=======================================
+ Hits 21553 21557 +4
Misses 1422 1422
Partials 68 68 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChrisChV Looks good. Left some suggestions to simplify css.
- I tested this: Followed test instructions
- I read through the code
- I checked for accessibility issues
- Includes documentation
<div className="w-100 d-flex justify-content-between"> | ||
<Button | ||
variant="outline-brand" | ||
onClick={() => onCloseEditor?.()} | ||
> | ||
<FormattedMessage {...messages.discardChangesButtonlabel} /> | ||
</Button> | ||
<Button | ||
variant="primary" | ||
onClick={closeCancelConfirmModal} | ||
> | ||
<FormattedMessage {...messages.keepEditingButtonLabel} /> | ||
</Button> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div className="w-100 d-flex justify-content-between"> | |
<Button | |
variant="outline-brand" | |
onClick={() => onCloseEditor?.()} | |
> | |
<FormattedMessage {...messages.discardChangesButtonlabel} /> | |
</Button> | |
<Button | |
variant="primary" | |
onClick={closeCancelConfirmModal} | |
> | |
<FormattedMessage {...messages.keepEditingButtonLabel} /> | |
</Button> | |
</div> | |
<> | |
<Button | |
variant="outline-brand" | |
onClick={() => onCloseEditor?.()} | |
> | |
<FormattedMessage {...messages.discardChangesButtonlabel} /> | |
</Button> | |
<ActionRow.Spacer /> | |
<Button | |
variant="primary" | |
onClick={closeCancelConfirmModal} | |
> | |
<FormattedMessage {...messages.keepEditingButtonLabel} /> | |
</Button> | |
</> |
If we apply the previous change, this can be simplified with just a spacer in between.
Make sure to import ActionRow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated: https://github.com/openedx/frontend-app-authoring/pull/1732/files#diff-5e596e3f2bd4c8fc64c20b36264a9407df504b5cd2114991d73d5a802411593eR21
I used the footerAction
instead, so this code is refactored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much better 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look fine to me. I didn't test it. Can we get the coverage test passing?
fdb0116
to
d8e68cd
Compare
d8e68cd
to
3ab35c7
Compare
Description
Supporting information
Testing instructions
Other information
N/A