-
Notifications
You must be signed in to change notification settings - Fork 172
feat: add collections support for containers [FC-0083] #1797
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
feat: add collections support for containers [FC-0083] #1797
Conversation
|
Thanks for the pull request, @rpenido! 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. |
5264613 to
cb3f628
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1797 +/- ##
==========================================
+ Coverage 93.55% 93.56% +0.01%
==========================================
Files 1136 1139 +3
Lines 23245 23308 +63
Branches 5013 5022 +9
==========================================
+ Hits 21746 21808 +62
- Misses 1423 1424 +1
Partials 76 76 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d21f870 to
551b2b5
Compare
aa698ea to
955e7ba
Compare
955e7ba to
f9efda9
Compare
f9efda9 to
604d19f
Compare
pomegranited
left a comment
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.
👍 This is working beautifully @rpenido !
- I tested this by adding/removing Units and Components to/from Collections using the "Organize" tab and the "add existing content" component picker.
- I read through the code
- I checked for accessibility issues by using my keyboard to navigate
- Includes documentation
- User-facing strings are extracted for translation
| > | ||
| <ComponentPicker | ||
| showOnlyPublished | ||
| extraFilter={['NOT block_type = "unit"']} |
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.
Oo good catches!
bradenmacdonald
left a comment
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.
LGTM! If you can fix the conflicts and get the coverage tests passing, I'll merge it for you.
| export interface SelectedComponent { | ||
| usageKey: string; | ||
| blockType: string; | ||
| blockType?: string; |
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.
How does a Component ever have a usageKey but not a blockType ? Or is this really an ItemPicker that can select non-components?
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 was planning not to pass blockType when selecting 'Units', but I ended up passing it as the containerType has a similar meaning. Reverted 0962eab
| @@ -0,0 +1,51 @@ | |||
| import { defineMessages } from '@edx/frontend-platform/i18n'; | |||
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: this file can be .ts not .tsx.
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.
Fixed: 0962eab
1896819 to
caedcba
Compare
4abb90f to
073d1f4
Compare
Thanks for the review @bradenmacdonald! |
dcc5036 to
3991b70
Compare
3991b70 to
bbdf3d4
Compare
Description
This PR adds support to add Units to Collections.

Supporting information
Testing Instructions
Using the sidebar
Using the card menu
Using the component picker
Creating a unit directly inside a collection
Check if you can NOT add a unit in the Unit Outline
Private ref: FAL-4068