chore: complete the rewrite for instructor dashboard#1998
Draft
leangseu-edx wants to merge 2 commits intomasterfrom
Draft
chore: complete the rewrite for instructor dashboard#1998leangseu-edx wants to merge 2 commits intomasterfrom
leangseu-edx wants to merge 2 commits intomasterfrom
Conversation
chore: add flag to stop override css from lms+studio and allow paragon to work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR - Instructor dashboard rewrite with react/paragon
What work?
npm run starthot reload the change (still need to refresh the page manually)npm run buildwith production buildlmsandstudioWhat not work?
paragonstyling mostly it got override fromlms-courseandlms-mainwhich came fromedx-platform. I don't expect to use it in a long while.What changed?
openassessment/xblock/openassessmentblock.py:: _render_react_pagethat we will use to render react page.page_name,props,on_mount_funcpage_namethe react component/page.jsxthat should locate inopenassessment/xblock/static/js/src/react/. All of the.jsxfile that create here will be parse accordingly.propsare the property that will show up in the react component. We definitely need some clean up about how to lint props type later. Right now it is arbitrary.on_mount_functhis is require at the moment because I am trying to piggy back on the existing behavior. Once we reimplement everything, we won't need to use this anymore.How it work?
return self._render_react_page('oa_base', context_dict, on_mount_func='OpenAssessmentBlock')openassessment/templates/openassessmentblock/react_template.htmlas the template.openassessment/xblock/static/js/src/react_base.jsas default javascript file.RenderReactwill import pageopenassessment/xblock/static/js/src/react/oa_base.jsxdynamically and render it. (if you lookopenassessment/xblock/static/js/src/react/oa_base.jsxandopenassessment/templates/openassessmentblock/oa_base.html, the file should be almost identical. This will make updating the existing pattern much faster)RenderReactwill parse the props correctly willonMountfunction to run inuseEffect. We need this right now becauseOpenAssessmentBlockis quite complex to rewrite with limited time. But it should be possible in the future.Reason
openassessment/xblock/static/js/src/react/because I want to make sure future implementation of react will be simple. No need to worry about intl provider or reactdom rendering.Future?
.htmlto.jsxComponentvsPageor just all the same. Do we need more entries point than justreact_renderlmsandstudiothat propagate to xblock and overwrite paragon?instructor-dashboard.mov