Skip to content

IS-11474 Remove redundant curity-theme.css link from SSP loader template#242

Open
urre wants to merge 24 commits into
mainfrom
fix/dev/IS-11474-remove-duplicate-curity-theme-css-link
Open

IS-11474 Remove redundant curity-theme.css link from SSP loader template#242
urre wants to merge 24 commits into
mainfrom
fix/dev/IS-11474-remove-duplicate-curity-theme-css-link

Conversation

@urre

@urre urre commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

What

Removes the hardcoded curity-theme.css stylesheet link from the Self-Service Portal loader template (src/self-service-portal/templates/apps/self-service-portal/index.vm).

Why

IS-11474 added a #if ($theme_css_path) stylesheet block to the SSP loader template. theme_css_path always resolves to a default value in the render context — settings-defaults.vm sets it to $!_staticResourceRootPath + '/assets/css/curity-theme.css', and site.vm parses settings before the page template. The original hardcoded line was therefore left in place as a duplicate, so every SSP page emitted two identical /assets/css/curity-theme.css stylesheet links.

Letting theme_css_path provide the link (and dropping the hardcoded one):

  • removes the duplicate stylesheet,
  • correctly respects $_staticResourceRootPath,
  • honors a configured _configured_theme_css_path,
  • matches how the core pages (fragments/css.vm) and the api-driven-ui template already behave.

Impact

Fixes SelfServicePortalViewDataIntegrationTest ("Portal resolves the default look&feel template properly") in the Identity Server, which asserts the exact set of CSS links on the default SSP page and was failing on the duplicate.

🤖 Generated with Claude Code

aleixsuau and others added 24 commits June 4, 2026 08:37
…k-self-contained

IS-11407 Make haapi-react-sdk self-contained (relocate SDK-owned files)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tion-react-portal

IS-11428 Render HAAPI error notification via React portal
IS-11431 Add meaningful alt text to Logo image
…viewer-hashes

IS-9816: updates previewer hashes with the 1.3 values
…a-uri

Fix/dev/is 7660 csp img src data uri
…_path-stylesheet-link-to-api-driven-ui-template

IS-11474 Add theme css path stylesheet link to API driven UI and Self Service Portal templates
The theme_css_path variable (set in settings-defaults.vm, default
/assets/css/curity-theme.css) already renders the curity-theme.css
stylesheet link via the #if ($theme_css_path) block, so the hardcoded
link produced a duplicate stylesheet on every SSP page. Removing it also
makes the SSP respect $_staticResourceRootPath and a configured theme
css path, consistent with core fragments/css.vm and the api-driven-ui
template.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 23, 2026 09:03

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

This PR removes a duplicated theme stylesheet link in the Self-Service Portal loader template by relying on theme_css_path (and normalizing cache-busting query handling), and also includes a set of broader UI-kit updates (HAAPI React SDK/UI refactors, CSP img-src merge behavior, and dependency bumps).

Changes:

  • Remove hardcoded curity-theme.css from the SSP loader and append cache-busting via a reusable $_cacheBustingQuery.
  • Apply the same cache-busting pattern and theme_css_path stylesheet inclusion to the API-driven UI template.
  • Refactor parts of the HAAPI React app/SDK UI (move components/types, add spinner/icons), adjust error handling rendering, and bump various frontend dependencies.

Reviewed changes

Copilot reviewed 36 out of 42 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/self-service-portal/templates/apps/self-service-portal/index.vm Drops the hardcoded theme CSS link and switches to theme_css_path with optional cache-busting query.
src/self-service-portal/app/src/error-handling/RouteErrorBoundary.tsx Uses getErrorMessage from react-error-boundary when building the fallback message.
src/self-service-portal/app/package.json Updates several runtime/dev dependency versions.
src/identity-server/templates/core/views/api-driven-ui/index.vm Adds optional cache-busting query and includes theme stylesheet via theme_css_path.
src/identity-server/templates/core/settings-defaults.vm Changes CSP img-src handling to merge configured and page-provided values.
src/haapi-react-app/src/shared/ui/Well.tsx Introduces a local Well container component.
src/haapi-react-app/src/shared/ui/SuccessCheckmark.tsx Removes the SuccessCheckmark component.
src/haapi-react-app/src/shared/ui/PageSymbol/PageSymbol.tsx Adjusts import paths for config hook/util.
src/haapi-react-app/src/shared/ui/PageSymbol/PageSymbol.spec.tsx Updates import paths for moved modules.
src/haapi-react-app/src/shared/ui/Logo/Logo.tsx Adjusts config hook import path and changes the image alt.
src/haapi-react-app/src/shared/ui/Logo/Logo.spec.tsx Updates tests to reflect the logo accessibility/role change and import paths.
src/haapi-react-app/src/shared/ui/Layout/Layout.tsx Switches to local Well and updates internal import paths.
src/haapi-react-app/src/shared/ui/Layout/Layout.spec.tsx Updates import paths to match UI refactor.
src/haapi-react-app/src/shared/feature/error-handling/default-error-fallback.tsx Switches Well import to the local component.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/util/tests/mocks.ts Updates MEDIA_TYPES import path after type re-org.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/util/tests/api-responses.ts Updates imports to use local data-access types.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/ui/spinner/Spinner.tsx Adds a stepper-local spinner component.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/ui/spinner/spinner.module.css Adds styles/animation for the new spinner.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/ui/messages/messages.module.css Removes an unused/placeholder CSS module.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/ui/icons/authenticator-icons.ts Adds authenticator-type → icon resolution mapping.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/ui/actions/HaapiStepperActionsUI.spec.tsx Updates MEDIA_TYPES import path.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/README.md Updates bootstrap config typing in library usage example.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/feature/steps/step-element-factories.tsx Switches spinner import to the stepper-local spinner.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/feature/steps/HaapiStepperStepUI.spec.tsx Updates MEDIA_TYPES import path.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/feature/stepper/HaapiStepperErrorNotifier.tsx Renders the toast via a React portal to document.body.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/feature/stepper/HaapiStepper.spec.tsx Updates test imports after util/type relocation.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/feature/actions/form/HaapiStepperFormSubmitButton.tsx Updates authenticator icon resolver import path.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/data-access/useHaapiFetch.spec.ts Updates MEDIA_TYPES import path.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/data-access/types/media.types.ts Introduces MEDIA_TYPES enum under stepper-local data-access types.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/data-access/types/haapi-form.types.ts Switches to stepper-local MEDIA_TYPES.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/data-access/haapi-fetch-utils.ts Switches to stepper-local MEDIA_TYPES.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/data-access/haapi-fetch-utils.spec.ts Switches to stepper-local MEDIA_TYPES.
src/haapi-react-app/src/haapi-react-sdk/haapi-stepper/data-access/haapi-fetch-request.ts Switches to stepper-local MEDIA_TYPES.
src/haapi-react-app/src/App.tsx Updates Layout import path after refactor.
src/haapi-react-app/previewer/shared/ui/preview/Preview.tsx Updates imports for Well, Logo, and PageSymbol.
src/haapi-react-app/previewer/examples.oauth.ts Switches MEDIA_TYPES import to the stepper package path.
src/haapi-react-app/previewer/examples.authenticators.ts Switches MEDIA_TYPES import to the stepper package path.
src/haapi-react-app/previewer/examples.authentication-actions.ts Switches MEDIA_TYPES import to the stepper package path.
src/haapi-react-app/package.json Updates React DOM/types and dev dependencies.
src/common/css/docs/package.json Updates Astro/React DOM/types versions.
src/common/component-library/package.json Updates peer deps range and bumps router + dev deps versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const [isResettingErrorBoundary, setIsResettingErrorBoundary] = useState(false);
const isAppBootstrappingError = error?.message?.includes('Error bootstrapping');
const errorMessage = isAppBootstrappingError ? error?.message : `${t('Failed to load')} ${pageTitle} ${t('page')}`;
const boundaryMessage = getErrorMessage(error)
Comment on lines +38 to +45
"i18next": "^26.2.0",
"react": "^19.2.0",
"react-dom": "^19.2.4",
"react-error-boundary": "^6.0.0",
"react-dom": "^19.2.7",
"react-error-boundary": "^6.1.2",
"react-hot-toast": "^2.5.2",
"react-i18next": "^16.1.5",
"react-i18next": "^17.0.8",
"react-qr-code": "^2.0.15",
"react-router": "^7.13.1",
"react-router": "^7.18.0",

@luisgoncalves luisgoncalves Jun 29, 2026

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.

This is probably important/correct.

I think the current PR is meant to be equivalent to #243, but to target what's released (11.3 or main). However, it seems to be including many other commits, so probably it was branched off a wrong location.

In any case, #243 is only needed due to #235, which is only merged to dev. In other words, main doesn't have the duplication: https://github.com/curityio/ui-kit/blob/main/src/self-service-portal/templates/apps/self-service-portal/index.vm#L80.

So, I believe the current PR is not needed.

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.

6 participants