forked from openedx/frontend-app-authoring
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: enable to select collections as components in problems picker #2
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
MaferMazu
merged 14 commits into
ednx-release/teak.ceibal
from
bc/allow-selecting-collections-ceibal
Jan 29, 2026
+484
−81
Merged
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7e79056
feat: enable to select collections as components in the problems pick…
bra-i-am c3750b0
refactor: remove unused ContentType import and simplify LibraryConten…
bra-i-am eb08ffd
feat: add block_id to collections in library search mock data
bra-i-am ee3db52
perf: enhance collection indexing and selection
bra-i-am b6908d1
fix: solve typo
bra-i-am 496c5da
test: clarify selection logic for components in collection
bra-i-am 9accc83
feat: integrate CollectionIndexProvider for optimized collection inde…
bra-i-am 2615c3c
fix: remove unnecessary nullish coalescing for collectionKeys in AddC…
bra-i-am 7c59886
fix: update import path for useSearchContext in ComponentPickerContext
bra-i-am 7d5d64e
feat: optimize filtered hits calculation using useMemo in LibraryContent
bra-i-am 9cea757
feat: implement fetchAllSearchResults for comprehensive search result…
bra-i-am d0cb659
feat: increase default limit for search results from 20 to 100
bra-i-am 315fa60
fix: remove unused getNextPageParam from useContentSearchResults
bra-i-am 60133a8
feat: enhance fetchAllSearchResults to handle pagination more robustly
bra-i-am 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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Can you add more information on why we need this change? Something simple.
I won't argue about the test change, but it could be valuable to track the why.
Uh oh!
There was an error while loading. Please reload this page.
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.
@MaferMazu, this PR allows selecting collections too, due to it, once in the test it is queried
screen.queryAllByRole('button', { name: 'Select' })which returns an array bigger than before (before contained 3 items, now it includes 9 items counting the collections) and taking into account that in thelibrary-search.jsonthe collections are before the components (and rendered before the components), the index of the components changed from 1 to 7 (with 6 collections in between)I could change the
library-search.jsonitems order and preserve the test with index 1, what do you think?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.
Yes, you can change the JSON order, or in this case, leave it as it is; at least we have it documented in some way. Another thing you could do is use a specific id instead of the index, or filter only the components (but not necessary for this PR).