feat: add course info settings sidebar [FC-0123]#2955
feat: add course info settings sidebar [FC-0123]#2955ChrisChV merged 4 commits intoopenedx:masterfrom
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. 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. |
|
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. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. 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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2955 +/- ##
=======================================
Coverage 95.56% 95.56%
=======================================
Files 1350 1349 -1
Lines 31128 31154 +26
Branches 7038 7063 +25
=======================================
+ Hits 29747 29772 +25
- Misses 1319 1320 +1
Partials 62 62 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| const { | ||
| grading, | ||
| courseTeam, | ||
| advancedSettings, | ||
| scheduleAndDetails, | ||
| groupConfigurations, | ||
| } = otherLinkURLParams; | ||
| const waffleFlags = useWaffleFlags(courseId); |
There was a problem hiding this comment.
Hi @bradenmacdonald! Do we still have the "Legacy" pages of Studio, or should we clean up these references when we find them?
Asking before writing unnecessary tests here.
There was a problem hiding this comment.
@rpenido I'm not sure - I asked here: openedx/openedx-platform#36275 (comment)
There was a problem hiding this comment.
(copying in my answer from the other PR) - legacy libraries needs to work until May 1st, and the legacy unit editor needs to continue working until we resolve one blocker (hopefully before verawood). All other legacy_studio waffles are OK to delete 🪓
|
|
||
| /** | ||
| * Get course settings. | ||
| * @param {string} courseId | ||
| * @returns {Promise<Object>} | ||
| */ | ||
| export async function getCourseSettings(courseId) { | ||
| const { data } = await getAuthenticatedHttpClient() | ||
| .get(getCourseSettingsApiUrl(courseId)); | ||
| return camelCaseObject(data); | ||
| } |
There was a problem hiding this comment.
Moved to @src/data to remove duplicated code
| export const useCourseSettings = (courseId: string) => ( | ||
| useQuery({ | ||
| queryKey: ['courseSettings', courseId], | ||
| queryFn: () => getCourseSettings(courseId), | ||
| }) | ||
| ); | ||
|
|
There was a problem hiding this comment.
Moved to @src/data to remove duplicated code
|
|
||
| /** | ||
| * Get course settings. | ||
| * @param {string} courseId | ||
| * @returns {Promise<Object>} | ||
| */ | ||
| export async function getCourseSettings(courseId) { | ||
| const { data } = await getAuthenticatedHttpClient().get( | ||
| `${getCourseSettingsApiUrl(courseId)}`, | ||
| ); | ||
| return camelCaseObject(data); | ||
| } |
There was a problem hiding this comment.
Moved to @src/data to remove duplicated code
ff33a43 to
e77c8be
Compare
1dc8063 to
85e1cb2
Compare
navinkarkera
left a comment
There was a problem hiding this comment.
@rpenido Looks good. Thanks!
|
|
||
| /** | ||
| * Get course settings. | ||
| * TODO: create type for the return value |
85e1cb2 to
51707ed
Compare
ad3ee04 to
e101922
Compare
Description
This PR adds the
Settingstab to the course info sidebar, which shows links to some course settings pages.Supporting information
Testing instructions
Settingstab on the info sidebarOther information
WIP
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'Private ref: FAL-4336