Skip to content

feat: custom scripts via PORTAL_JS_FILENAMES - #1303

Open
wesleyboar wants to merge 6 commits into
mainfrom
feat/custom-scripts
Open

wesleyboar wants to merge 6 commits into
mainfrom
feat/custom-scripts

Conversation

@wesleyboar

@wesleyboar wesleyboar commented May 26, 2026 •

Copy link
Copy Markdown
Member

Overview

Add PORTAL_JS_FILENAMES (like existing PORTAL_CSS_FILENAMES).

Enables the client-side solution for WP-1230: a custom script on PTDataX needs to run on Portal pages, but Portal had no mechanism for per-project JS.

Related

Changes

  • added PORTAL_JS_FILENAMES
  • documents PORTAL_…_FILENAMES

Testing

  1. Deploy to PTDataX with https://github.com/TACC/Core-Portal-Deployments/f5c4ee1a.
  2. Login to Portal.
  3. In Portal (not CMS page), click "Docs" in CMS nav.
  4. Docs should open in new window.

UI

On.Portal.CMS.Nav.Documentation.Link.Opens.in.New.Tab.mov
Still Works on CMS Too
On.CMS.mov

Notes

Important

Assumes type="module". Could instead allow object instead of array, like CMS PORTAL_LOGO and PORTAL_FAVICON, as could other PORTAL_…_FILENAMES.

@codecov

codecov Bot commented May 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.46%. Comparing base (999b269) to head (10de117).

Files with missing lines Patch % Lines
server/portal/settings/settings.py 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1303      +/-   ##
==========================================
- Coverage   56.47%   56.46%   -0.01%     
==========================================
  Files         534      534              
  Lines       17164    17165       +1     
  Branches     3496     3502       +6     
==========================================
  Hits         9693     9693              
- Misses       6921     6922       +1     
  Partials      550      550              
Flag Coverage Δ
javascript 58.62% <ø> (ø)
unittests 54.25% <0.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
server/portal/settings/settings.py 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

wesleyboar added a commit to TACC/Core-CMS that referenced this pull request May 26, 2026
## Overview

Hide a11y text via `hidden` not a class, because class requires
stylesheet to have loaded.

_When testing TACC/Core-Portal#1303, a11y text
showed on screen before Bootstrap stylesheet had loaded._

## Related

- fixes UI bug with TACC/Core-Portal#1303

## Changes

- **changed** className to `hidden` attribute

## Testing

0. Have external link without accessible descritpion.
    <sub>(e.g. a CMS Nav link that opens site in new tab.)</sub>
1. Deploy with (or on-the-fly change to use) new code.
2. Verify link a11y description is still "Opens in a new window".
3. Verify element with text "Opens in a new window":
    - is `hidden`
    - not `class="sr-only"`

## UI


https://github.com/user-attachments/assets/316dbed1-769e-4d12-a655-f147801fd036


https://github.com/user-attachments/assets/e131f8f5-447b-4372-8aa0-c35b1e492923
@wesleyboar
wesleyboar requested a review from taoteg August 27, 2026 00:40
@wesleyboar
wesleyboar marked this pull request as ready for review August 27, 2026 00:40
@wesleyboar wesleyboar added the enhancement New feature or request label Aug 27, 2026

@taoteg taoteg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

@taoteg
taoteg requested a review from rstijerina August 27, 2026 16:27

This branch has not been deployed

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants