Skip to content

[Doc] Add feature docs related to themes, layouts, and i18n support#3017

Open
NutharaNR wants to merge 1 commit into
thunder-id:mainfrom
NutharaNR:doc-update-themes-layouts-i18n
Open

[Doc] Add feature docs related to themes, layouts, and i18n support#3017
NutharaNR wants to merge 1 commit into
thunder-id:mainfrom
NutharaNR:doc-update-themes-layouts-i18n

Conversation

@NutharaNR
Copy link
Copy Markdown
Contributor

@NutharaNR NutharaNR commented May 26, 2026

Purpose

Adds documentation for two new feature areas in the Guides section: Design and Translations.

Design
Covers how to customize the visual appearance and structural layout of authentication screens (sign-in, sign-up, recovery, consent) to match a brand. The section is structured as:

guides/
└── design(Design)/
    ├── overview.mdx       (Design — what can be customized, links to sub-sections)
    ├── themes.mdx         (Themes — color palettes, typography, shapes, visual effects)
    └── layouts.mdx        (Layouts — screen structure, slots, spacing, custom stylesheets)

Translations
Covers built-in i18n support for localizing authentication screen text into user-preferred languages using BCP 47 language tags. The section is structured as:

guides/
└── i18n(Translations)/
    ├── localization.mdx         (Localization — core i18n concepts, language resolution)
    └── manage-translations.mdx  (Manage Translations — add, update, delete via Console or API)

Also updates sidebars.ts to register both new sections.

Approach

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
    • Ran Vale and fixed all errors and warnings
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests
  • Breaking changes. (Fill if applicable)
    • Breaking changes section filled.
    • breaking change label added.

Security checks

  • Followed secure coding standards in WSO2 Secure Coding Guidelines
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

Summary by CodeRabbit

  • Documentation
    • Added Design guide documenting how to customize authentication UI themes and layouts per application or organizational unit.
    • Added Localization & Languages guide explaining how to manage translations, configure language support, and resolve translation keys for authentication screens.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

📝 Walkthrough

Walkthrough

This PR adds comprehensive documentation guides for two feature areas: Design system customization (themes and layouts) and internationalization/localization (translation management). Four new MDX documentation pages and two sidebar category configurations are introduced, with sidebar navigation updated to surface these guides.

Changes

Design and Localization Guide Documentation

Layer / File(s) Summary
Design guide category and overview
docs/content/guides/guides/design/_category_.json, docs/content/guides/guides/design/overview.mdx
Design category sidebar positioning and collapsibility are configured. The overview page introduces customizable elements (themes and layouts), explains per-application/organization scoping, and documents prerequisites (console access or system-scoped token) for design configuration changes.
Design themes documentation
docs/content/guides/guides/design/themes.mdx
Complete themes guide covering configurable properties (color schemes with light/dark/system modes, shape, blur, gradients, typography, text direction, component overrides), default theme values, and step-by-step Console and API workflows for creating, updating, and deleting themes with example JSON payloads and curl commands.
Design layouts documentation
docs/content/guides/guides/design/layouts.mdx
Comprehensive layouts guide introducing the structural layer distinct from themes. Documents available screen types, the extends-based inheritance mechanism, per-screen configuration properties (template, background, spacing), slot definitions (header/main/footer with enablement and layout options), and custom stylesheet injection via head.stylesheets (both inline and external formats with HTTPS requirement). Includes complete Console and API workflows for creating, updating, and deleting layouts with constraints and declarative-mode notes.
Localization and i18n documentation
docs/content/guides/guides/i18n/_category_.json, docs/content/guides/guides/i18n/localization.mdx, docs/content/guides/guides/i18n/manage-translations.mdx
i18n category sidebar configuration and two guides: Localization introduces core concepts (BCP 47 language tags, namespaces by screen/feature, dot-notation keys with {{placeholder}} interpolation, translation resolution via system defaults and custom overrides, language-matching behavior). Manage Translations covers workflows for listing languages, resolving translation keys, adding/updating/deleting languages and translations via Console and API, including validation rules (format/length constraints), supported i18n error codes, and Declarative Mode read-only behavior.
Sidebar navigation integration
docs/sidebars.ts
The Docusaurus sidebar configuration is updated to register Design (overview, themes, layouts) and Localization & Languages (localization, manage translations) as collapsible guide categories positioned after Resource Servers and before Use Cases.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • thunder-id/thunderid#1612: Both PRs modify docs/sidebars.ts to restructure Docusaurus guide navigation by adding/reorganizing guide categories.

Suggested labels

Type/Docs, documentation

Suggested reviewers

  • brionmario
  • darshanasbg
  • thiva-k
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description includes a clear Purpose section and a valid Related Issues reference, but the Approach section contains only a placeholder comment and the checklist items remain unchecked. Fill in the Approach section with substantive implementation details and design decisions. Check the completed checklist items to confirm manual testing, Vale verification, and security review were performed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title '[Doc] Add feature docs related to themes, layouts, and i18n support' clearly and specifically describes the main change: adding documentation for three related features.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@NutharaNR NutharaNR force-pushed the doc-update-themes-layouts-i18n branch 9 times, most recently from 82fd82e to 5ebbb9e Compare May 27, 2026 08:23
@NutharaNR NutharaNR marked this pull request as ready for review May 27, 2026 08:23
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/content/guides/guides/design/layouts.mdx`:
- Line 390: Replace the flagged sentence "Unassign the layout from all
applications before deleting it." with a rephrasing that avoids the word
"Unassign" but keeps the meaning—e.g., "Remove the layout from all applications
before deleting it." Update that line in the layouts.mdx content so it still
reads: "You cannot delete a layout that is currently assigned to an application.
Remove the layout from all applications before deleting it."
- Line 408: The link href "../../i18n/localization-support" in
docs/content/guides/guides/design/layouts.mdx is stale and should point to the
new doc introduced here; update the href to "../../i18n/localization" (or the
correct new slug if different) wherever the old link appears so the Next Steps
link resolves to the renamed localization page.

In `@docs/content/guides/guides/design/overview.mdx`:
- Line 23: Update the stale link targets in overview.mdx: replace occurrences of
"/docs/next/guides/guides/i18n/localization-support" with the new
"/docs/next/guides/guides/i18n/localization" (appears in the line with "To
localize screen text" and the other occurrence around line 52) so both links
point to the renamed localization doc.

In `@docs/content/guides/guides/design/themes.mdx`:
- Line 343: Replace the outdated Next Steps link href value
"../../i18n/localization-support" with the new localization page path
"../../i18n/localization" in the docs content (look for the
href="../../i18n/localization-support" occurrence in themes.mdx) so the Next
Steps link points to the renamed localization page.
- Line 44: Change the problematic wording so Vale no longer flags "dialogs" and
"Unassign": replace "cards and dialogs" with "cards and dialog boxes" (or "cards
and dialog components") in the line that currently reads "Blur effects create
frosted glass (acrylic) backgrounds on cards and dialogs.", and update any
instances of "Unassign" in the document to sentence-case "unassign" or rephrase
the text to avoid the flagged token; apply the same fixes at the other two
occurrences reported (the lines mentioned around 81 and 329).

In `@docs/content/guides/guides/i18n/localization.mdx`:
- Line 21: Replace the hardcoded brand phrase "Thunder-specific" in the sentence
describing SDK translation bundles with the MDX product template; specifically,
swap the literal "Thunder-specific" for a templated form using the ProductName
component (e.g., use "<ProductName />-specific" or "SDKs for <ProductName />")
so the prose uses the MDX product templating mechanism instead of the raw
literal and preserves the rest of the sentence about locales and the en-US
fallback.

In `@docs/content/guides/guides/i18n/manage-translations.mdx`:
- Line 330: Update the stale markdown link target in manage-translations.mdx:
replace the reference target "../localization-support" used in the
"[Localization Support]" link with the new localization doc path (e.g.,
"../localization" or the correct relative path to the added localization
document) so the "[Localization Support]" link resolves to the new localization
page.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c918e2ce-4908-4d57-a43d-b6d948d92000

📥 Commits

Reviewing files that changed from the base of the PR and between 24d4d00 and 5ebbb9e.

📒 Files selected for processing (8)
  • docs/content/guides/guides/design/_category_.json
  • docs/content/guides/guides/design/layouts.mdx
  • docs/content/guides/guides/design/overview.mdx
  • docs/content/guides/guides/design/themes.mdx
  • docs/content/guides/guides/i18n/_category_.json
  • docs/content/guides/guides/i18n/localization.mdx
  • docs/content/guides/guides/i18n/manage-translations.mdx
  • docs/sidebars.ts

Comment thread docs/content/guides/guides/design/layouts.mdx Outdated
Comment thread docs/content/guides/guides/design/layouts.mdx Outdated
Comment thread docs/content/guides/guides/design/overview.mdx Outdated
Comment thread docs/content/guides/guides/design/themes.mdx Outdated
Comment thread docs/content/guides/guides/design/themes.mdx Outdated
Comment thread docs/content/guides/guides/i18n/localization.mdx Outdated
Comment thread docs/content/guides/guides/i18n/manage-translations.mdx Outdated
@NutharaNR NutharaNR force-pushed the doc-update-themes-layouts-i18n branch from 5ebbb9e to 5f531a7 Compare May 27, 2026 08:35
@NutharaNR NutharaNR force-pushed the doc-update-themes-layouts-i18n branch from 5f531a7 to 1d472fa Compare May 27, 2026 08:37
@Malith-19 Malith-19 added the skip-changelog Skip generating changelog for a particular PR label May 27, 2026
@ThaminduDilshan ThaminduDilshan added documentation Improvements or additions to documentation Type/Docs labels May 27, 2026
Because these two areas are independent, you can update a theme without affecting the layout, and vice versa.

:::tip
To localize screen text, see [Translations](/docs/next/guides/guides/i18n/localization).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Clicking on Translations goes to Localization page. Is this intentional? Experience seems bit off right?

:::

:::note
When Declarative Mode is enabled, themes and layouts become read-only. You cannot update or delete them.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Themes and layouts will be read-only, only if these have been defined as declarative resources right?
By reading this, I got the initial impression all themes and layouts will be read only when declarative config is enabled


## How Design Is Applied

Design configurations are scoped per application or organizational unit. Each application or unit can have its own theme and layout. When a user opens an authentication screen, <ProductName /> resolves the matching design configuration for that context and renders the screen accordingly.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Design configurations are scoped per application or organizational unit. Each application or unit can have its own theme and layout. When a user opens an authentication screen, <ProductName /> resolves the matching design configuration for that context and renders the screen accordingly.
Design configurations are scoped per application or organizational unit. Each application or organization unit can have its own theme and layout. When a user opens an authentication screen, <ProductName /> resolves the matching design configuration for that context and renders the screen accordingly.

</Stepper>

</TabItem>
<TabItem value="api" label="API">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need these two tab version? Have we followed this in any other places?

IIRC our current approach is to write feature docs for the console try out experience. If they're using APIs, they have to refer API docs. But we have API walkthrough in some places where we don't have console implementation.

@himeshsiriwardana correct me if I'm wrong


<Stepper stepNode="h3" as="h3">

### Step 1: Open the Theme Creator
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd prefer to have "Theme Builder" here aligning with the "Flow Builder". But let's see other's opinions.

cc: @himeshsiriwardana @brionmario


Each theme includes the following configurable properties.

### Color Schemes
Copy link
Copy Markdown
Member

@ThaminduDilshan ThaminduDilshan May 27, 2026

Choose a reason for hiding this comment

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

Shall we keep only the basic details before the "Create a Theme" section and extract everything else to a catalog or similar doc?
Having explanations for all of these configurations before the walkthrough introduces a bit of overhead when reading feature docs.

Same applies to Layouts too

</Tabs>

:::warning
You cannot delete a theme that is currently assigned to an application. Remove the theme from all applications before deleting it.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure this validation is implemented as of now. Probably it's not there. Maybe can warn this is a permanent delete and cannot revert. Similar warning should be somewhere else in the docs already


A layout defines the structural composition of authentication screens. While a [theme](../themes) controls visual styling (colors, fonts), a layout controls how screen elements are arranged. This includes the header, main content area, and footer slots, along with their sizing, spacing, and visibility.

## Screen Types
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we have support for different screens in the current implementation? I don't think so

| `recovery` | Account recovery options screen. |
| `password-reset` | Password reset completion screen. |

### Screen Inheritance
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's validate this is valid. Not sure such a configurations exists in the current implementation

import TabItem from '@theme/TabItem';
import {NextSteps, NextStepsCard} from '../../../../src/components/NextSteps';

# Layouts
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shall we recheck the layout docs with the implementation?
IIRC we only support centered layout as of now and is only possible to configure custom CSS, at least in the frontend

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

API spec seems to be outdated. Shall we check and update the api swagger definition too?

cc: @DonOmalVindula


Each language is identified by a BCP 47 language tag such as `en-US`, `fr-FR`, or `ja-JP`. When a user opens an authentication screen, <ProductName /> resolves the appropriate translations for that language and renders all text accordingly.

The <ProductName />-specific SDKs ship with built-in translation bundles for the following locales. English (`en-US`) serves as the fallback:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't provide these language bundles in the console or backend. These are pure SDK fallbacks. IMO it's better to remove these from docs and only have en-US.

@DonOmalVindula @brionmario any thoughts?


<ProductName /> lets you add, update, and delete translations through the <ProductName /> Console or the i18n API. You can list available languages, resolve translations at runtime, and create or remove custom translation overrides.

## Prerequisites
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Better to build experience around console here. At least that's what we've been following as of now.

| Key | Alphanumeric characters, dots, underscores, and hyphens. Maximum 256 characters. | `forms.credentials.title`, `forms.username.title` |
| Value | Non-empty string. Maximum 4096 characters. | `Welcome back` |

## Error Codes
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Better to have these in a catalog page. @himeshsiriwardana WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skip-changelog Skip generating changelog for a particular PR Type/Docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants