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

Ensure links in help files open in new windows #6095

Merged
merged 2 commits into from Dec 24, 2021

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Dec 21, 2021

It's annoying when links in HTML help files that get shown inline after clicking "❔" are not opening in a new window: The current form may have modifications we want to keep.

Rather than fix every plugin ever, this PR changes hudson-behavior to rewrite the inlined HTML to ensure all links open in a new window unless they explicitly already specify the target attribute. (It can be set to _self explicitly to not open in a new window.)

Additionally, some cleanup: _new isn't a thing (😭), it just behaves similar to _blank because there's no frame (or popup? It's been a while…) with that name already. In help files, remove target entirely and rely on the JS added elsewhere, in HTML shown inline directly on config forms, open in a new window.

Proposed changelog entries

  • Ensure that links from inline help (shown after clicking "?" icons) always open in new windows.

Proposed upgrade guidelines

N/A

Submitter checklist

  • (If applicable) Jira issue is well described
  • Changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    • Fill-in the Proposed changelog entries section only if there are breaking changes or other changes which may require extra steps from users during the upgrade
  • Appropriate autotests or explanation to why this change has no tests
  • For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@mention

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are correct
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

not tested but looks sensible

@timja timja added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Dec 21, 2021
@timja timja requested a review from a team December 21, 2021 22:23
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Nice trick.

@MarkEWaite MarkEWaite added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Dec 23, 2021
@MarkEWaite
Copy link
Contributor

This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback.

@basil basil merged commit da1bc50 into jenkinsci:master Dec 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
5 participants