-
Notifications
You must be signed in to change notification settings - Fork 179
feat: enable to select collections as components in problems picker #2824
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for the pull request, @bra-i-am! 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. DetailsWhere 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. |
|
Very cool! @edschema or @sdaitzman could you please review this draft contribution from a product perspective? (see video) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2824 +/- ##
==========================================
- Coverage 95.04% 94.98% -0.07%
==========================================
Files 1265 1265
Lines 29128 29243 +115
Branches 6630 6455 -175
==========================================
+ Hits 27686 27776 +90
- Misses 1384 1409 +25
Partials 58 58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Will review this and provide some product/UX thoughts this week! @bra-i-am this is great! |
|
Hi @bra-i-am, thank you for contributing this! From a product standpoint, it's great to add easier ways for users to reuse content from their libraries in bulk. Recommendation 1: I don't think it makes sense to include an additional problem-bank-like block that supports this, and would strongly recommend keeping this feature as an option within the existing problem bank rather than adding a special block type. Question: in the current implementation, when a collection is selected and saved, then new items are added to that collection on the library-side and published, can the new objects be "synced in" somehow? If not, I think this is a bit more like a "Bulk Add" shortcut workflow, vs. a true "Select Collection" workflow. Longer-term, I think it's worth enhancing the workflow to allow users to select a full collection, and sync in changes to the collection set going forward. We could either make collections publishable, or treat published objects added to/removed from a collection's set as available to "sync." This would require additional design investment to fill in the details (including diffs), and it's likely still worth merging a bulk-add version before that can be completed. I do want to make sure the interface doesn't suggest the collection itself is being selected. Lastly, if collections are referenced (vs. bulk add collection children): under “these are the problems in the bank" I think we should consider modifying the list to visually represent the folder and its current children. |
This pull request introduces enhanced support for bulk selection and management of collections and their components in the library authoring interface. The main changes add the ability to select entire collections, track selection status (selected/indeterminate), and ensure consistent UI feedback when interacting with collections and their components. Filtering logic has also been updated to ensure all relevant items remain available for selection workflows.
Bulk selection and collection management:
ComponentPickerContext.tsxto track selected collections and their status (selectedorindeterminate). Also introduced logic for updating collection selection status when components are added or removed, supporting both individual and bulk operations. [1] [2]AddComponentWidgetto support bulk selection of all components in a collection, including logic to build component lists and count collection membership. The widget now displays checkboxes that reflect collection selection status and supports indeterminate states. [1] [2] [3]UI integration and feedback:
CollectionCardandComponentCardto use the updatedAddComponentWidget, enabling bulk selection on collection cards and correct checkbox display for both collections and components. [1] [2] [3] [4]Filtering logic improvements:
LibraryAuthoringPage.tsxandLibraryContent.tsxto ensure all components remain available for selection, even when viewing the Collections tab. This supports workflows where components are added to xblocks by selecting an entire collection. [1] [2] [3]Context and provider updates:
selectedCollectionsstate, ensuring all components have access to the latest selection data. [1] [2]How to test
Make sure you have a collection in your Libraries ( http://apps.local.openedx.io:2001/authoring/libraries ) with questions in it
Settings > Advanced Settingsand add"examquestionbank"to the list ofAdvanced module listAdvancedin the component selector and add anExam Question BankAdd Problemsand select a collection; it should be selected and deselected properly, and once you clickAdd Selected Components, they should be displayed in the xblock as will be shown in the following screencastScreencast
Screencast.from.09-01-26.14.40.43.webm