IS-11474 Remove redundant curity-theme.css link from SSP loader template#242
IS-11474 Remove redundant curity-theme.css link from SSP loader template#242urre wants to merge 24 commits into
Conversation
Merge/11.3/dev/2026 06 05
…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>
Merge/11.3/dev/2026 06 10
…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
Merge/11.3/dev/2026 06 12
…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
…encies IS-11486 Update dependencies
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>
There was a problem hiding this comment.
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.cssfrom the SSP loader and append cache-busting via a reusable$_cacheBustingQuery. - Apply the same cache-busting pattern and
theme_css_pathstylesheet 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) |
| "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", |
There was a problem hiding this comment.
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.
What
Removes the hardcoded
curity-theme.cssstylesheet 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_pathalways resolves to a default value in the render context —settings-defaults.vmsets it to$!_staticResourceRootPath + '/assets/css/curity-theme.css', andsite.vmparsessettingsbefore 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.cssstylesheet links.Letting
theme_css_pathprovide the link (and dropping the hardcoded one):$_staticResourceRootPath,_configured_theme_css_path,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