Skip to content

refactor: resolve the account settings link with frontend-base - #135

Merged
arbrandes merged 1 commit into
openedx:mainfrom
arbrandes:arbrandes/resolve-route-by-role
Sep 22, 2026
Merged

arbrandes merged 1 commit into
openedx:mainfrom
arbrandes:arbrandes/resolve-route-by-role

Conversation

@arbrandes

Copy link
Copy Markdown
Contributor

Description

The settings icon in the notification tray tested the account route against a scheme regex to choose between a react-router Link and a Paragon Hyperlink that opens a new tab. It now takes that answer from frontend-base's resolveRouteByRole. Tests cover both cases against the test site config.

Follow-up to openedx/frontend-base#317. frontend-base is bumped to 2.0.0-alpha.15, which provides it.

LLM usage notice

Built with assistance from Claude.

The settings icon checked whether the account route was a path in this
site or an external URL by hand; frontend-base now owns that.

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

@arbrandes arbrandes left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Claude reviewed and found no defects: ready to merge.

isInternal agrees with the old scheme regex for every URL the config can produce, and correctly rejects protocol-relative URLs the regex let through. generatePath is a no-op on the param-less account path, so the resulting URL is unchanged. The site config restore in the tests is sound, since mergeSiteConfig never mutates the previous config; the { ...getSiteConfig() } spread is redundant but harmless.

Full suite, lint, and tsc --noEmit pass locally against alpha.15.

@arbrandes
arbrandes merged commit 55ad352 into openedx:main Sep 22, 2026
4 checks passed
@arbrandes
arbrandes deleted the arbrandes/resolve-route-by-role branch September 22, 2026 22:44
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