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

use javascript to open new tab for external links #5159

Merged
merged 1 commit into from
Mar 31, 2024

Conversation

cosmicBboy
Copy link
Contributor

This PR removes the sphinx-new-tab-link dependency for adding target="_blank" to external links in favor of using a simple custom javascript file to achieve the same effect.

Why are the changes needed?

The sphinx-new-tab-link dependency caused an unintended change in the html/css styling of the site (black border on table elements):

image

sphinx-new-tab-link depends on sphinxcontrib-extdevhelper-kasane, (repo), which seems to modify the way the html docs are rendered in a non-obvious way.

What changes were proposed in this pull request?

Use sphinx's supported way of customizing docs with a custom.js file that achieves the same thing, but without the additional python dependency.

How was this patch tested?

Docs built locally with make docs

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. documentation Improvements or additions to documentation labels Mar 31, 2024
Copy link

codecov bot commented Mar 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.11%. Comparing base (c81133b) to head (a0aaec9).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5159      +/-   ##
==========================================
+ Coverage   59.03%   59.11%   +0.08%     
==========================================
  Files         645      645              
  Lines       55726    55574     -152     
==========================================
- Hits        32896    32851      -45     
+ Misses      20233    20130     -103     
+ Partials     2597     2593       -4     
Flag Coverage Δ
unittests 59.11% <ø> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 31, 2024
@cosmicBboy cosmicBboy merged commit b1cab3a into master Mar 31, 2024
48 checks passed
@cosmicBboy cosmicBboy deleted the docs/external-links-js branch March 31, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants