-
Notifications
You must be signed in to change notification settings - Fork 149
feat: Enhance Course Optimizer Page with Previous Run Links and Improved UI #2356
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: Enhance Course Optimizer Page with Previous Run Links and Improved UI #2356
Conversation
36e5e52
to
33fa7c8
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2356 +/- ##
==========================================
+ Coverage 94.60% 94.62% +0.02%
==========================================
Files 1179 1179
Lines 25506 26135 +629
Branches 5449 5820 +371
==========================================
+ Hits 24129 24731 +602
- Misses 1314 1333 +19
- Partials 63 71 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/optimizer-page/scan-results/PreviousRunSectionCollapsible.tsx
Outdated
Show resolved
Hide resolved
d88d14c
to
2b44e8f
Compare
e4b049d
to
24befc9
Compare
24befc9
to
1dbf10e
Compare
2a94dac
to
f1646bb
Compare
47d69b6
to
c6fbd3d
Compare
c6fbd3d
to
5e47e9d
Compare
6e7ed57
to
2b790bc
Compare
courseId: string, | ||
) { | ||
const shouldPoll = rerunLinkUpdateInProgress === true | ||
|| (rerunLinkUpdateResult && rerunLinkUpdateResult.status && rerunLinkUpdateResult.status !== 'Succeeded'); |
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.
use RERUN_LINK_UPDATE_STATUSES.SUCCEEDED
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!
) : ( | ||
<StatefulButton | ||
className="px-4 rounded-0 update-link-btn" | ||
labels={{ default: 'Update', pending: 'Update' }} |
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.
both labels are same & translation missing?
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.
yeah, we have only 2 states for this features, update
or updated
.
And StatefulButton will have same state for default and pending state.
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.
May be we can move it to constants file.
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.
@pganesh-apphelix can we also add translation for this update
state as well.
<span | ||
className="updated-link-text d-flex align-items-center text-success" | ||
> | ||
Updated |
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.
translation missing
@@ -89,15 +160,65 @@ type TableData = { | |||
const BrokenLinkTable: FC<BrokenLinkTableProps> = ({ | |||
unit, | |||
filters, | |||
linkType = 'broken', |
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.
move this broken
to constant
} else { | ||
blocksWithResults.add(result.id); | ||
} | ||
}); |
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.
const typeToSection = {
course_updates: 'course-updates',
custom_pages: 'custom-pages'
}; // to be maintained in constant
const addBlocksWithPrevLinks = sectionId => {
const section = allSections.find(s => s.id === sectionId);
if (!section) return;
section.subsections.forEach(sub =>
sub.units.forEach(unit =>
unit.blocks.forEach(b => {
if (b.previousRunLinks && b.previousRunLinks.length) blocksWithResults.add(b.id);
})
)
);
};
response.results.forEach(result => {
const sectionId = typeToSection[result.type];
if (sectionId) {
addBlocksWithPrevLinks(sectionId);
} else {
blocksWithResults.add(result.id);
}
});
is it ok to write like this to reuse code
c42e91a
to
aef4ea3
Compare
Description
This PR introduces multiple UI enhancements and new functionality for the Course Optimizer page. The key updates include:
Previous Run Link Section
contentstore.enable_course_optimizer_check_prev_run_links
Course Update, Handouts, and Custom Page Section
UI Enhancements
Updated UI for the following elements:
Applied consistent styling based on the new design specifications.
Added functionality:
19-53-40.mp4
Jira
Testing Instructions
Please verify the following: