-
Notifications
You must be signed in to change notification settings - Fork 75
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
[FC-0036] Tags Sidebar #852
[FC-0036] Tags Sidebar #852
Conversation
Thanks for the pull request, @ChrisChV! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
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.
Hi @ChrisChV!
Good work here!
I only added some missing type checks and nits.
Let me know what you think!
src/course-unit/CourseUnit.jsx
Outdated
<Sidebar variant="publish" /> | ||
<Sidebar variant="tags" /> | ||
<Sidebar variant="location" /> |
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 these should be different components. As this is coming from upstream, what do you think about separating at least the TagsSideBar
?
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 also thought the same thing, but then I saw that they shared the same styles in different places, that's why I decided to integrate it CC @bradenmacdonald
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.
That seems weird to me. Why not just make <Sidebar>
into a wrapper component, so we can use
<Sidebar><PublishControls /></Sidebar>
<Sidebar><TagControls /></Sidebar>
<Sidebar><LocationInfo /></Sidebar>
or something like that? Of course you need to discuss with the other authors of the upstream PR. And maybe do that later as a follow-on. But that feels a lot cleaner to me.
const params = useParams(); | ||
let contentId = id; | ||
|
||
if (contentId === undefined) { | ||
contentId = params.contentId; | ||
} |
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 didn't like this, but I don't know a better way to do it and maintain compatibility with the iframe in the studio. Could you comment on why we use the component props and the query params?
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 this is fine for now, but I agree we should add a comment saying that once the legacy iframe is no longer used, we can remove useParams()
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.
Added here
56aefd1
to
1d505da
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #852 +/- ##
==========================================
+ Coverage 91.86% 91.93% +0.06%
==========================================
Files 561 568 +7
Lines 9725 9844 +119
Branches 2079 2098 +19
==========================================
+ Hits 8934 9050 +116
- Misses 764 767 +3
Partials 27 27 ☔ View full report in Codecov by Sentry. |
@ChrisChV Could you rebase this PR and fix the conflicts? |
845e5ed
to
7a70d81
Compare
@xitij2000 Done 👍 It's ready |
@ChrisChV Do I need a specific edx-platform PR for this? |
@xitij2000 sorry, if is about this issue, is fixed in openedx/edx-platform#34055. You need to |
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.
@ChrisChV Nice work refactoring the components! LGTM 👍
- I tested this in my local tutor dev following the PR instructions
- I read through the code
- I checked for accessibility issues
- Includes documentation
Co-authored-by: Rômulo Penido <[email protected]>
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.
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 most if not all of the styling here can be applied via paragon / bootstrap classes.
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.
Updated here 94d3f1f
I have left the styles that are applied to the internal components of the collapsible
@xitij2000 It's ready for merge |
}, | ||
tagsSidebarTitle: { | ||
id: 'course-authoring.course-unit.sidebar.tags.title', | ||
defaultMessage: 'Unit Tags', |
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 would be awesome if you could add some descriptions to these new messages. We'll be making them a requirement pretty soon. See openedx/frontend-build#517.
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.
Done c9261e4
@xitij2000 Yes, all about the drawer is part of this task: openedx/modular-learning#190 |
@ChrisChV 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Description
Adds a new tag sidebar. Important: This PR uses #832 as base, if you want to review the tag sidebar changes you can review this commits
Screenshots
Testing instructions
contentstore.new_studio_mfe.use_new_unit_page
in the CMS admin panel.ENABLE_UNIT_PAGE=true
is enabled.Support information