Repository navigation
fix: Rename optimistic update in children containers #2141
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
Merged
ChrisChV
merged 14 commits into
openedx:master
from
open-craft:chris/FAL-4165-fix-name-update
Jun 19, 2025
Merged
Changes from 6 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
db9524e
fix: Rename optimistic update in children containers
ChrisChV 87802d5
style: Fix broken lint
ChrisChV 948b711
test: Fix test for optimistic rename
ChrisChV c5b1dd3
fix: broken tests
ChrisChV cb33e4e
fix: Cycle import
ChrisChV bb1f621
Merge branch 'master' into chris/FAL-4165-fix-name-update
ChrisChV 78dc044
fix: Avoid open the container page when click renam text
ChrisChV 14ce8fb
fix: Broken lint
ChrisChV ca2ed2c
fix: Broken test
ChrisChV 5cc7e96
refactor: Optimistic update of container children
ChrisChV d5353db
style: nits on the code
ChrisChV e941ede
style: nits on the code
ChrisChV b48b880
Merge branch 'master' into chris/FAL-4165-fix-name-update
ChrisChV 4b51703
fix: Unnecessary setQuery if is not called yet
ChrisChV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't really understand why we need this.
When I removed it in 8576925 and tested, it's still working fine (the optimistic update works without it).
Where is that happening? Before you added this
placeHolderText, the only place I see this component getting the title from isuseContainer(containerId)which is not a list of containers. Maybe we should be getting it from a list though, as it may be a little inefficient loading each container separately if there's a lot in the parent.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.
In
LibraryContainerChildren, you get the containers in a list usinguseContainerChildrenThe optimistic update is implemented by overwriting the data of the
useContainerquery. I feel like doing the same for theuseContainerChildrenquery is going to be more complicated.This is seen visually if we do not use the
placeHolderText:https://www.loom.com/share/0090987109b44902809f55b15271090d?sid=3666ee1c-02e1-4655-8713-d3aca877454e
If you'd like, I can try implementing an optimistic update overriding
useContainerChildren. This problem also exists in the component listing on the unit page, it is a separate implementation, but follows the same logic.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.
I think that would be better if you don't mind giving it a try!
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.
It works! It's ready for a review