Skip to content

fix: remove nih ras banner from the anvil data explorer (#4940) - #4941

Merged
NoopDog merged 1 commit into
mainfrom
fran/4940-remove-ras-banner
Aug 21, 2026
Merged

fix: remove nih ras banner from the anvil data explorer (#4940)#4941
NoopDog merged 1 commit into
mainfrom
fran/4940-remove-ras-banner

Conversation

@frano-m

@frano-m frano-m commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Closes #4940

What changed

  • Deleted app/components/anvil/banner/RAS/ras.tsx.
  • Removed the RAS import and the generalAnnouncement prop from site-config/anvil-cmg/dev/announcements/announcements.tsx. The config entry itself stays, so the Announcements wrapper keeps rendering (prod inherits this via makeConfig in site-config/anvil-cmg/prod/config.ts, so no prod change was needed).
  • Made generalAnnouncement optional on the Announcements component. It was the only caller, so after this change a required prop would have had zero callers — the optional type now reflects reality.

The Announcements wrapper is untouched otherwise: it still renders the session-timeout, system-unavailable and indexing banners, which are driven by its own hooks rather than by props.

Why

The banner announced an eRA Commons → Login.gov/ID.me transition deadline of March 25, 2026, which has passed, so the notice is stale.

How verified

The load-bearing check was grepping the built artifact: the RAS banner text is absent from out/, while the session-timeout and indexing banner strings are still shipped — confirming the wrapper survived rather than being removed along with the announcement.

  • tsc --noEmit clean; prettier and eslint clean on both changed files.
  • Unit tests: 129 passed across 8 suites.
  • npm run build-cc-dev:anvil-cmg succeeded through postbuild.
  • E2e npm run test:anvil-cmg: 132 passed (chromium/firefox/webkit) against a fresh build of this branch.
  • No RAS references remain in app/, site-config/, e2e/ or __tests__/; C.Announcements had exactly one consumer and generalAnnouncement exactly one caller, both accounted for.

Notes for the reviewer

  • site-config/anvil-cmg/dev/announcements/announcements.tsx now contains no JSX, so its .tsx extension is no longer warranted — the comparable site-config/hca-dcp/ma-dev/layout/announcements.ts is already .ts. Left as-is to keep this diff to the ticket's scope; happy to rename if preferred.
  • No tests added: this is a deletion, and the only new surface ("renders nothing when no general announcement is passed") would require mocking two findable-ui hooks for little value. Happy to add it on request.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI 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.

Pull request overview

Removes the now-stale NIH RAS announcement banner from the AnVIL CMG dev configuration while keeping the shared Announcements wrapper (and its session-timeout/system/indexing banners) intact.

Changes:

  • Deleted the NIH RAS banner component (RAS) and removed its usage from the AnVIL CMG dev announcements config.
  • Made generalAnnouncement optional on Announcements so the wrapper can render with no “general” banner content.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
site-config/anvil-cmg/dev/announcements/announcements.tsx Stops passing the removed RAS banner as generalAnnouncement while keeping the Announcements wrapper configured.
app/components/common/Banner/components/Announcements/announcements.tsx Makes generalAnnouncement optional so the component can render nothing when no general banner is provided.
app/components/anvil/banner/RAS/ras.tsx Removes the stale RAS banner component entirely.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@NoopDog NoopDog left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the full diff plus surrounding call sites — no correctness findings.

  • Deletion is clean: RAS had exactly one importer (site-config/anvil-cmg/dev/announcements/announcements.tsx), removed in the same diff. Remaining ras hits in the authentication configs are the OAuth provider URLs, correctly untouched.
  • Dropping props is safe — ComponentConfig.props is optional and ComponentCreator spreads it.
  • No empty-chrome regression: Header renders Announcements with no wrapper spacer, the config array is still one element, and generalAnnouncement is the final else branch so undefined renders nothing. Session-timeout/system-unavailable/indexing branches are hook-driven and unaffected.
  • Propagates to prod as described — prod, tempdev, and cc-dev inherit the header via makeConfig from site-config/anvil-cmg/dev/config.ts.

Non-blocking nit (already flagged by the author): announcements.tsx no longer contains JSX and could be renamed to .ts, matching site-config/hca-dcp/ma-dev/layout/announcements.ts.

@NoopDog
NoopDog merged commit 4a3b783 into main Aug 21, 2026
4 checks passed
@frano-m
frano-m deleted the fran/4940-remove-ras-banner branch August 21, 2026 03:09
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.

Remove NIH RAS banner from the AnVIL Data Explorer

3 participants