Skip to content

feat: custom scripts via PORTAL_JS_FILENAMES#1303

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

feat: custom scripts via PORTAL_JS_FILENAMES#1303
wesleyboar wants to merge 4 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 1 line in your changes missing coverage. Please review.
✅ Project coverage is 64.09%. Comparing base (a2c9004) to head (bc7c1ce).

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

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1303      +/-   ##
==========================================
- Coverage   64.09%   64.09%   -0.01%     
==========================================
  Files         461      461              
  Lines       13793    13794       +1     
  Branches     2750     2750              
==========================================
  Hits         8841     8841              
- Misses       4603     4604       +1     
  Partials      349      349              
Flag Coverage Δ
javascript 67.10% <ø> (ø)
unittests 60.90% <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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant