Skip to content

fix: handle opening verticals in new tabs with the "View In Studio" button [BB-4211]#27799

Merged
stvstnfrd merged 1 commit intoopenedx:masterfrom
open-craft:agrendalath/fix_view_in_studio_button
Jun 16, 2021
Merged

fix: handle opening verticals in new tabs with the "View In Studio" button [BB-4211]#27799
stvstnfrd merged 1 commit intoopenedx:masterfrom
open-craft:agrendalath/fix_view_in_studio_button

Conversation

@Agrendalath
Copy link
Member

@Agrendalath Agrendalath commented Jun 1, 2021

#24020 introduced a workaround for viewing the current vertical in Studio However, replacing window.location.href on click did not support opening it in a new tab.

Jira

OSPR-5821

Sandbox

https://pr27799.sandbox.opencraft.hosting/

Testing instructions

  1. Go to this page (or this one in the sandbox).
  2. Use the middle mouse button (or right-click + open link in new tab) on the "View in Studio" button.
  3. Check that you have been redirected to the specific vertical instead of the course outline page in Studio.

Deadline

None.

Reviewers

@openedx-webhooks
Copy link

Thanks for the pull request, @Agrendalath! I've created OSPR-5821 to keep track of it in JIRA, where we prioritize reviews. 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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

@openedx-webhooks openedx-webhooks added needs triage open-source-contribution PR author is not from Axim or 2U labels Jun 1, 2021
@Agrendalath Agrendalath force-pushed the agrendalath/fix_view_in_studio_button branch from b323bf8 to 1ad7889 Compare June 1, 2021 17:33
@natabene
Copy link
Contributor

natabene commented Jun 1, 2021

@Agrendalath Thank you for your contribution. Please let me know once it is ready for our review.

@openedx-webhooks openedx-webhooks added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed needs triage labels Jun 2, 2021
Copy link
Contributor

@arjunsinghy96 arjunsinghy96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Agrendalath LGTM

👍

  • I tested that clicking View in Studio button from a vertical in LMS takes to that vertical in studio page rather than the course outline page. The behaviour is similar for Opening in same tab and for Open link in new tab.
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation
  • N/A I made sure any change in configuration variables is reflected in the corresponding client's configuration-secure repository.

@Agrendalath
Copy link
Member Author

@natabene, this is ready for your review.

@arch-bom-gocd-alerts
Copy link

📣 💥 Heads-up: You must either rebase onto master or merge master into your branch to avoid breaking the build.

We recently removed diff-quality and introduced lint-amnesty. This means that the automated quality check that has run on your branch doesn't work the same way it will on master. If you have introduced any quality failures, they might pass on the PR but then break the build on master.

This branch has been detected to not have commit 2e33565 as an ancestor. Here's how to see for yourself:

git merge-base --is-ancestor 2e335653 agrendalath/fix_view_in_studio_button && echo "You're all set" || echo "Please rebase onto master or merge master to your branch"

If you have any questions, please reach out to the Architecture team (either #edx-shared-architecture on Open edX Slack or #architecture on edX internal).

…utton

openedx#24020 introduced a workaround for viewing the current vertical in Studio
However, replacing `window.location.href` on `click` did not support opening
it in a new tab.
@Agrendalath Agrendalath force-pushed the agrendalath/fix_view_in_studio_button branch from 1ad7889 to 01ada0b Compare June 15, 2021 12:17
@openedx-webhooks openedx-webhooks removed the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Jun 15, 2021
@edx-status-bot
Copy link

Your PR has finished running tests. There were no failures.

@stvstnfrd
Copy link
Contributor

@Agrendalath Thanks for catching/fixing this; I initially wrote it 😊
I appreciate the summary in the commit message too!

@stvstnfrd stvstnfrd merged commit 2b445f1 into openedx:master Jun 16, 2021
@openedx-webhooks
Copy link

@Agrendalath 🎉 Your pull request was merged!

Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged open-source-contribution PR author is not from Axim or 2U

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants