Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix broken "View App Configurations" link
Also fully remove `alreadyRendered`, which was added in 309e5fd but saw its usage removed in 0bf0399. Added PropType `baseUrl` to ensure that is sent; Gergich then required my to add a PropType for `app`. fixes INTEROP-7118 flag=none The value of page.js's "pathname" is dependent on whether there is a hash symbol (anchor) in the current URL. If there is no anchor, the pathname contains (starts with) the base URL (e.g. "/accounts/self/settings"). If there is an anchor, it does not contain it. The problem is that sometimes, the clicking the Apps tab changed the web browser's current URL to "/accounts/self/settings#tab-tools". As a result, pathname was "", and the configurations URL, which is normally "/accounts/self/settings/configurations", was then just "/configurations". I have filed a bug report on page.js, but the project doesn't seem terribly active. visionmedia/page.js#589 This bug apparently cropped up with d07531a, before which we never added a anchor onto the settings URL. This commit was never in prod, but my guess is that the times we seen it in prod were when we first went to beta to repro it, then simply got rid of the "beta." from the URL, leaving canvas.instructure.com/accounts/self/setting#tab-tools, from which we could repro the issue. For the fix, "baseUrl" is already used successfully in AppDetails to construct URLs. I can't find any reason to rely on pathname, and pathname is not used for any other purpose. 6e31dcf fixed a similar (same?) issue, but that was on an older version of path.js which did not overwrite pathname if there was a hash symbol. In the old version of path.js, "/accounts/self/settings#tab-tools" would yield a pathname of "/accounts/self/settings#tab-tools" so we needed to cut off the "#tab-tools". In the current version, it yields a pathname of "". Test plan: - go to /accounts/self/settings - click various tabs and try setting a couple options to make sure nothing is broken there. - click the Apps tab. Note whether or not the browser's URL has changed to add "#tab-tools" or not. Within the Apps tab, click "View App Configurations", then back to "View App Center", then click a particular app (which adds "app/abcdef123-..." to the browser location) and click both "View App Configurations" and "View App Center" from there. Make sure all the links work. - If your browser did add "#tab-tools" which clicking the tab, try disabling the "remember_settings_tab" feature flag and repeat the tests. If it didn't, check that that flag is on. - go to "/accounts/self/settings#tab-tools". It should jump to the Apps tab. Check out that links again and make sure they all work. In particular make sure the "View App Configurations" button works when the browser URL has "#tab-tools" - Try editing tools, clicking the info icon or disabling/enabling placements. Try to break stuff. - The test plan from 6e31dcf says to use the keyboard, but that didn't do anything different for me. You can try it. - Run all the above steps for the course settings page. - Run all the above steps for the course details page (/courses/123/details). Change-Id: I2d5cfdcbbb8f0cfd2d43b61b2b5eebf034c77062 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276597 Tested-by: Service Cloud Jenkins <[email protected]> Reviewed-by: Sean Scally <[email protected]> QA-Review: Xander Moffatt <[email protected]> Product-Review: Evan Battaglia <[email protected]>
- Loading branch information