-
Notifications
You must be signed in to change notification settings - Fork 178
feat: Make sections/subsections/units selectable in course outline [FC-0114] #2732
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?
feat: Make sections/subsections/units selectable in course outline [FC-0114] #2732
Conversation
|
Thanks for the pull request, @ChrisChV! 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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2732 +/- ##
==========================================
- Coverage 94.99% 94.98% -0.01%
==========================================
Files 1256 1256
Lines 28800 28835 +35
Branches 6538 6542 +4
==========================================
+ Hits 27358 27390 +32
- Misses 1384 1387 +3
Partials 58 58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
07ca2eb to
6a639d0
Compare
6a639d0 to
e7903e9
Compare
navinkarkera
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.
@ChrisChV Nice work!
👍
- I tested this: (Verified selection conditions)
- I read through the code
- I checked for accessibility issues
- Includes documentation
| to={titleLink} | ||
| title={title} | ||
| > | ||
| <span className={`${namePrefix}-card-title mb-0 truncate-1-line text-left`}> |
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.
Is this change intentional?
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.
Sorry, I forgot to update it. I added f26179d to meet the requirement The edit icon should be aligned next to the title with small titles
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 - just some minor questions / optional suggestions.
I'm also wondering if we should be storing the selected container in the URL (instead of the React state), so people can share links? Could be useful on courses with huge outlines.
| /* This is a special case; we can skip accessibility here since the | ||
| {Container}Card handles that. This onClick allows the user to select the card |
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.
So can you "select" the card by tabbing onto it and pressing SPACE or something?
Also, this says Card handles that, but in this PR I see keyboard-related code is in SortableItem - is that what you're talking about or is that something else?
| const [selectedContainerId, setSelectedContainerId] = useState<string | undefined>(); | ||
|
|
||
| const openContainerInfoSidebar = useCallback((containerId: string) => { | ||
| if (getConfig().ENABLE_COURSE_OUTLINE_NEW_DESIGN?.toString().toLowerCase() === 'true') { |
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: Should/could we put getConfig().ENABLE_COURSE_OUTLINE_NEW_DESIGN?.toString().toLowerCase() === 'true' into a constant or a helper function somewhere? That seems complicated to write all that out every time we check this setting.
It could even be a waffle flag, then you can use useWaffleFlags and people can test it on a course-by-course basis. Not saying it needs to be though, this is fine.
Description
Supporting information
Testing instructions
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:
.ts,.tsx).propTypesanddefaultPropsin any new or modified code.src/testUtils.tsx(specificallyinitializeMocks)apiHooks.tsin this repo for examples.messages.tsfiles have adescriptionfor translators to use.../in import paths. To import from parent folders, use@src, e.g.import { initializeMocks } from '@src/testUtils';instead offrom '../../../../testUtils'