Skip to content

Conversation

@ChrisChV
Copy link
Contributor

@ChrisChV ChrisChV commented Jan 8, 2026

Description

image image

Supporting information

Testing instructions

  • Use this branch of edx-platform: feat: ObjectTag.is_copied field added to serializer [FC-0114] edx-platform#37855
  • In the course outline, verify that you can open the align sidebar of the course using the navigation toolbar on the right of the sidebar.
  • Open the align sidebar of Section/Subsection/Unit using the Manage tags in the Card menu.
  • Import a Section with tags from a library:
    • Open the align sidebar.
    • Click in the Manage tags.
    • Verify that the imported tags have the new lock icon.

Other information

N/A

Best Practices Checklist

We're trying to move away from some deprecated patterns in this codebase. Please
check if your PR meets these recommendations before asking for a review:

  • Any new files are using TypeScript (.ts, .tsx).
  • Avoid propTypes and defaultProps in any new or modified code.
  • Tests should use the helpers in src/testUtils.tsx (specifically initializeMocks)
  • Do not add new fields to the Redux state/store. Use React Context to share state among multiple components.
  • Use React Query to load data from REST APIs. See any apiHooks.ts in this repo for examples.
  • All new i18n messages in messages.ts files have a description for translators to use.
  • Avoid using ../ in import paths. To import from parent folders, use @src, e.g. import { initializeMocks } from '@src/testUtils'; instead of from '../../../../testUtils'

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jan 8, 2026
@openedx-webhooks
Copy link

Thanks for the pull request, @ChrisChV!

This repository is currently maintained by @bradenmacdonald.

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Jan 8, 2026
@ChrisChV ChrisChV changed the title feat: New align sidebar for Course Outline feat: New align sidebar for Course Outline [FC-0114] Jan 8, 2026
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 85.93750% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.96%. Comparing base (2209242) to head (9ba3f1f).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
...se-outline/outline-sidebar/OutlineAlignSidebar.tsx 46.66% 8 Missing ⚠️
src/content-tags-drawer/TagsTree.tsx 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2812      +/-   ##
==========================================
- Coverage   94.99%   94.96%   -0.03%     
==========================================
  Files        1256     1257       +1     
  Lines       28800    28841      +41     
  Branches     6538     6353     -185     
==========================================
+ Hits        27358    27390      +32     
- Misses       1384     1393       +9     
  Partials       58       58              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@rpenido rpenido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
Thank you for your work, @ChrisChV!

  • I tested this using the instructions from the PR
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation

Left some non-blocking comments.
Also, we need to fix the conflicts and improve the coverage.
Let me know if you want me to test/review it again after that!

Comment on lines +121 to +122
queryFn: () => getContentData(contentId!),
enabled: enabled || !!contentId,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to use the react-query skipToken here.

Also, this condition should be and &&, right?

Suggested change
queryFn: () => getContentData(contentId!),
enabled: enabled || !!contentId,
queryFn: (enabled && contentId) ? () => getContentData(contentId) : skipToken,

Comment on lines +121 to +136
* @param props - The component props.
* @param props.tags - Array of taxonomy tags that are applied to the content.
* @param props.rootDepth - Depth of the parent tag (root), used to render tabs for the tree.
* @param props.parentKey - Key of the parent tag.
* @param props.lineage - Lineage of the tag.
* @param props.removeTagHandler - Function that is called when removing tags from the tree.
* @param props.afterTagsComponent - Optional component to render after the tags components.
*/
const TagsTree = ({
tags,
rootDepth,
rootDepth = 0,
parentKey,
lineage,
lineage = [],
removeTagHandler,
}) => {
afterTagsComponent,
}: TagsTreeProps) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can move the JSDoc annotations to the destructured parameters to get a more compact view.

Suggested change
* @param props - The component props.
* @param props.tags - Array of taxonomy tags that are applied to the content.
* @param props.rootDepth - Depth of the parent tag (root), used to render tabs for the tree.
* @param props.parentKey - Key of the parent tag.
* @param props.lineage - Lineage of the tag.
* @param props.removeTagHandler - Function that is called when removing tags from the tree.
* @param props.afterTagsComponent - Optional component to render after the tags components.
*/
const TagsTree = ({
tags,
rootDepth,
rootDepth = 0,
parentKey,
lineage,
lineage = [],
removeTagHandler,
}) => {
afterTagsComponent,
}: TagsTreeProps) => {
*/
const TagsTree = ({
/** Array of taxonomy tags that are applied to the content. */
tags,
/** Depth of the parent tag (root), used to render tabs for the tree. */
rootDepth = 0,
/** Key of the parent tag. */
parentKey,
/** Lineage of the tag. */
lineage = [],
/** Function that is called when removing tags from the tree. */
removeTagHandler,
/** Optional component to render after the tags components. */
afterTagsComponent,
}: TagsTreeProps) => {

import { useCourseDetails } from '@src/data/apiHooks';
import { SidebarTitle } from '@src/generic/sidebar';

export const OutlineAlignSidebar = ({ contentId }: { contentId?: string }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move the contentId to the OutlineSidebarContext? I think we would need the selected content in other components, and keeping it in context would avoid passing it all down the chain with props.


const {
data: contentData,
} = useContentData(contentId, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
} = useContentData(contentId, true);
} = useContentData(contentId);

@mphilbrick211 mphilbrick211 added the FC Relates to an Axim Funded Contribution project label Jan 9, 2026
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FC Relates to an Axim Funded Contribution project open-source-contribution PR author is not from Axim or 2U

Projects

Status: Waiting on Author

Development

Successfully merging this pull request may close these issues.

4 participants