-
Notifications
You must be signed in to change notification settings - Fork 65
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
fix: null error at useRouteMatch when running on tutor #613
Conversation
Thanks for the pull request, @xitij2000! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
Hi @openedx/2u-infinity @openedx/edx-infinity! Is this something you can review / merge for us? Also, which is the correct tag for your team (from the ones above)? I want to make sure I'm using the correct one. |
Hello, @mphilbrick211 |
@xitij2000 This change will break other functionality for tutor such as |
I don't think it will break. The copy link feature is prepending the public path to the URL so it will get the full URL. |
I think I'll break the copy link feature. The current issue is raised because of the Tutor If we use the same tutor |
Since the trailing slash was removed on purpose (see overhangio/tutor-mfe#154) I think we can update the MFE instead. I'll update this PR to fix it. |
8fcefa4
to
90bb152
Compare
I've fixed the path issue. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #613 +/- ##
==========================================
+ Coverage 92.36% 92.42% +0.06%
==========================================
Files 169 169
Lines 3445 3446 +1
Branches 897 897
==========================================
+ Hits 3182 3185 +3
+ Misses 243 241 -2
Partials 20 20 ☔ View full report in Codecov by Sentry. |
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.
Just a nit other than LGTM.
@xitij2000 Can we add a test case for this change? |
Will apply your changes and add a test on monday. |
@xitij2000 Just a follow-up. Did you get time to work on this? |
tutor sets the PUBLIC_PATH to '/discussions' which causes frontend-platform to treat all URLs for matching etc to be relative to this path. Since many places include '/discussions' in the match it causes those matches to break. This change makes the default PUBLIC_PATH in .env.development to match the one set by tutor and removes it from the base path of the router letting frontend platform handle the prefix. This also allows for deployments to customise this path to be something other than 'discussions'.
90bb152
to
3b2d831
Compare
I've updated the PR as requested and added a test. |
@xitij2000 Please create a backport PR for the Quince branch. |
I've created #623 |
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.
PR LGTM
@xitij2000 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Description
tutor sets the PUBLIC_PATH to '/discussions' which causes frontend-platform to treat all URLs for matching etc to be relative to this path. Since many places include '/discussions' in the match it causes those matches to break.
This change makes the default PUBLIC_PATH in .env.development to match the one set by tutor and removes it from the base path of the router letting frontend platform handle the prefix.
This also allows for deployments to customise this path to be something other then 'discussions'.
Fixes #584
How Has This Been Tested?
Tested using the tutor master devstack and running using npm start
Merge Checklist
Post-merge Checklist