-
Notifications
You must be signed in to change notification settings - Fork 76
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: remove unnecessary toast notification on adding component #1490
fix: remove unnecessary toast notification on adding component #1490
Conversation
Thanks for the pull request, @navinkarkera! What's next?Please work through the following steps to get your changes 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. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by 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. |
It seems like many of library tests are failing after merge of this commit:f9ef00e |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1490 +/- ##
=======================================
Coverage 93.01% 93.02%
=======================================
Files 1048 1048
Lines 20480 20479 -1
Branches 4402 4401 -1
=======================================
+ Hits 19049 19050 +1
+ Misses 1361 1359 -2
Partials 70 70 ☔ View full report in Codecov by Sentry. |
@navinkarkera That fixed the bug, but now I am seeing weird behavior where a blank editor opens up after I save the new component. New.Bug.movAlso, the changes I made ("This is the new text") don't seem to have been saved. |
Hmm, I cleared my cache and the bug is slightly different - now it does save changes and the second editor only flickers briefly on the screen. But still definitely a bug with the editor appearing again: New.bug.2.mov |
@bradenmacdonald I think it is the same issue that I posted here. I'll investigate and see if I can fix it here. Update: The |
13eec2a
to
3f95ab6
Compare
It is fixed now, had to link component after editor closing. I believe it will also help when we work on #1482 as we can trigger creation of new block on editor close using the same function. |
1f0761c
to
1f7c6ce
Compare
Link component to collection after closing editor fix re-render of editor in collections page on link mutation.
efbad92
to
816dd4d
Compare
816dd4d
to
2734338
Compare
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.
👍 Thank you for this fix, and for cleaning up and improving tests @navinkarkera !
- I tested this by ensuring that no toast is shown with the editor modal when adding new components to a library or collection. Also tested that the toast is still shown when pasting components into a library or collection, and that the "Content linked successfully" toast and message have been removed.
- I read through the code
- I checked for accessibility issues by using my keyboard to navigate
- Improves the code documentation
- User-facing strings are extracted for translation
/** If the editor is open and the user is editing some component, this is its usageKey | ||
and the callback function that should be called on closing the editor. | ||
*/ |
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.
nit: componentBeingEdited
isn't a usageKey anymore:
/** If the editor is open and the user is editing some component, this is its usageKey | |
and the callback function that should be called on closing the editor. | |
*/ | |
// If the editor is open and the user is editing some component, this is the component being edited. |
and the callback function that should be called on closing the editor. | ||
*/ | ||
componentBeingEdited: ComponentEditorInfo | undefined; | ||
openComponentEditor: (usageKey: string, onClose?: () => void) => void; |
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.
nit (continued): ...and the rest of this comment can go here:
openComponentEditor: (usageKey: string, onClose?: () => void) => void; | |
// If an onClose callback is provided, it will be called when the editor is closed. | |
openComponentEditor: (usageKey: string, onClose?: () => void) => void; |
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.
@navinkarkera is this ready to merge?
@ChrisChV Yes, thank you! |
Fix for: #1489
Private-ref
: FAL-3922