Skip to content
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

profile: make help links open in new tabs #1922

Merged
merged 1 commit into from
Feb 28, 2019

Commits on Feb 28, 2019

  1. profile: make help links open in new tabs

    Summary:
    Not only is opening in new tabs a better user experience, it’s necessary
    in notebook contexts so that we don’t try to load the GitHub docs in an
    iframe, which would fail because GitHub sets `frame-ancestors 'none'`.
    (When I tested #1914 in Colab, I instinctively Ctrl-clicked the link,
    thus not hitting this issue.)
    
    Test Plan:
    Tested that in both Jupyter and Colab, clicking on a help link before
    this change yields a white frame with a “Refused to display…” console
    error, while after this change it opens the appropriate link in a new
    tab.
    
    Checked statically that each link has `rel="noopener" target="_blank"`:
    
    ```shell
    $ <./tensorboard/plugins/profile/tf_profile_dashboard/tf-profile-dashboard.html tee \
    > >(grep 'href=' | grep -Fcv '<link') \
    > >(grep -Fc 'rel="noopener"') \
    > >(grep -Fc 'target="_blank"') \
    > >/dev/null
    6
    6
    6
    ```
    
    wchargin-branch: profile-help-in-new-tab
    wchargin committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    f4e3457 View commit details
    Browse the repository at this point in the history