Skip to content

Updated React Vanila Sample App to maintain UI consistency#2803

Open
RandithaK wants to merge 1 commit into
thunder-id:mainfrom
RandithaK:React-Vanila-Sample-App-Modernisation
Open

Updated React Vanila Sample App to maintain UI consistency#2803
RandithaK wants to merge 1 commit into
thunder-id:mainfrom
RandithaK:React-Vanila-Sample-App-Modernisation

Conversation

@RandithaK
Copy link
Copy Markdown
Contributor

@RandithaK RandithaK commented May 18, 2026

Purpose

Get the React Vanila Sample to the new color theme

Approach

Added the new colors and gradients, and updated images for the README file.

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

  • Style
    • Updated code block styling: translucent theme-aware backgrounds, inherit text color, smaller corner radius, and dark-mode override
    • Refreshed app theme to white/black base with blue→cyan primary gradients and added hover color for primary buttons
    • Added fixed gradient background imagery, subtle backdrop blur on surfaces, improved button transitions, global body sizing, and spinner gradient updates

Review Change Stack

Copilot AI review requested due to automatic review settings May 18, 2026 16:55
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Switches the sample app theme to a white/black base with blue/cyan primary gradients, adds body gradient backgrounds and MUI paper backdrop blur, and updates component visuals: pre styling and inline SVG gradient stop colors.

Changes

Theme and Component Styling Updates

Layer / File(s) Summary
Theme foundation and color palette
samples/apps/react-vanilla-sample/src/theme/theme.css, samples/apps/react-vanilla-sample/src/theme/theme.ts
Core theme variables replaced with white/black base and blue/cyan primary gradients; added scheme-specific body gradient backgrounds with background-attachment: fixed; introduced --md-contained-primary-hover-background, button background transition, MUI Paper backdrop blur and theme-driven paper/border colors, and body { min-height: 100dvh }.
Component styling and gradient harmonization
samples/apps/react-vanilla-sample/src/App.css, samples/apps/react-vanilla-sample/src/components/GradientCircularProgress.tsx, samples/apps/react-vanilla-sample/src/pages/LoginPage.tsx
pre element styling switched to translucent, theme-variable-driven background, color: inherit, reduced border-radius and theme border with dark-mode override. Inline SVG linearGradient stop colors updated to new blue/cyan values in GradientCircularProgress and its LoginPage usage.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

skip-changelog

Suggested reviewers

  • ThumulaPerera
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title references maintaining UI consistency, which aligns with the PR's purpose of updating to the new color theme, though it's somewhat generic.
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.
Description check ✅ Passed The PR description covers the purpose and approach, includes related issue link, and completes security checks; however, the Approach section lacks detail about specific implementation changes.

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

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

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

@RandithaK RandithaK changed the title Refactor styles for improved UI consistency and accessibility across … Updated Reac Vanila Saample Appto maintain UI consistency May 18, 2026
@RandithaK RandithaK changed the title Updated Reac Vanila Saample Appto maintain UI consistency Updated React Vanila Saample Appto maintain UI consistency May 18, 2026
@RandithaK RandithaK changed the title Updated React Vanila Saample Appto maintain UI consistency Updated React Vanila Sample App to maintain UI consistency May 18, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the React vanilla sample’s visual theme toward a blue/teal gradient palette with new light/dark background treatments and “glass” surfaces.

Changes:

  • Updated global theme tokens (background/foreground and primary gradient variables).
  • Added new light/dark radial background effects and paper “frosted glass” styling.
  • Updated SVG gradient stop colors used on the login page and circular progress indicator.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 6 comments.

File Description
samples/apps/react-vanilla-sample/src/theme/theme.css Updates theme variables, adds radial background effects, and adjusts component surface/button styling.
samples/apps/react-vanilla-sample/src/pages/LoginPage.tsx Updates the SVG gradient colors used on the login page.
samples/apps/react-vanilla-sample/src/components/GradientCircularProgress.tsx Updates the SVG gradient colors used for the progress indicator.
samples/apps/react-vanilla-sample/src/App.css Adjusts <pre> styling to better match the new theme (including dark-scheme override).

Comment thread samples/apps/react-vanilla-sample/src/theme/theme.css Outdated
Comment thread samples/apps/react-vanilla-sample/src/theme/theme.css Outdated
Comment thread samples/apps/react-vanilla-sample/src/theme/theme.css Outdated
Comment thread samples/apps/react-vanilla-sample/src/theme/theme.css
Comment thread samples/apps/react-vanilla-sample/src/theme/theme.css Outdated
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: 1

🧹 Nitpick comments (1)
samples/apps/react-vanilla-sample/src/pages/LoginPage.tsx (1)

148-160: ⚡ Quick win

Use the shared GradientCircularProgress component instead of redefining it locally.

This duplicates the same gradient definition already maintained in samples/apps/react-vanilla-sample/src/components/GradientCircularProgress.tsx, which can drift over time. Reusing the shared component keeps theme changes single-source.

🤖 Prompt for 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.

In `@samples/apps/react-vanilla-sample/src/pages/LoginPage.tsx` around lines 148 -
160, The local GradientCircularProgress function in LoginPage.tsx duplicates the
shared component; remove the local GradientCircularProgress definition and
instead import and use the existing shared GradientCircularProgress component
(the component exported from GradientCircularProgress.tsx) where the local one
is used; update the top imports in LoginPage.tsx to import
GradientCircularProgress and replace any JSX instances of the local
GradientCircularProgress with the imported component so the app uses the single
source of truth.
🤖 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
`@samples/apps/react-vanilla-sample/src/components/GradientCircularProgress.tsx`:
- Around line 30-31: Add a focused component test for GradientCircularProgress
that mounts/renders the GradientCircularProgress component and asserts the SVG
gradient is wired correctly: verify the <linearGradient> (id "my_gradient")
exists, the two <stop> elements have stopColor values "`#3a87ed`" and "`#00b8d9`"
(offsets "0%" and "100%"), and that the progress circle element has
stroke="url(`#my_gradient`)"; implement this as a unit/RTL test (e.g., in a new
GradientCircularProgress.test.tsx) using the existing render utilities and
assertions to ensure future theme changes don’t regress these values.

---

Nitpick comments:
In `@samples/apps/react-vanilla-sample/src/pages/LoginPage.tsx`:
- Around line 148-160: The local GradientCircularProgress function in
LoginPage.tsx duplicates the shared component; remove the local
GradientCircularProgress definition and instead import and use the existing
shared GradientCircularProgress component (the component exported from
GradientCircularProgress.tsx) where the local one is used; update the top
imports in LoginPage.tsx to import GradientCircularProgress and replace any JSX
instances of the local GradientCircularProgress with the imported component so
the app uses the single source of truth.
🪄 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: 5b62e4f1-4f0a-4941-8028-b7932b1c88a1

📥 Commits

Reviewing files that changed from the base of the PR and between 14063c2 and 742d12b.

⛔ Files ignored due to path filters (2)
  • resources/images/sample-app-login.png is excluded by !**/*.png
  • resources/images/sample-app-self-registration-basic.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • samples/apps/react-vanilla-sample/src/App.css
  • samples/apps/react-vanilla-sample/src/components/GradientCircularProgress.tsx
  • samples/apps/react-vanilla-sample/src/pages/LoginPage.tsx
  • samples/apps/react-vanilla-sample/src/theme/theme.css

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@RandithaK RandithaK force-pushed the React-Vanila-Sample-App-Modernisation branch from 742d12b to 99911e1 Compare May 18, 2026 17:24
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: 1

🤖 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 `@samples/apps/react-vanilla-sample/src/theme/theme.css`:
- Around line 29-34: The CSS blocks for html[data-color-scheme='light'] and the
corresponding dark scheme are missing a blank line before the final declaration
and triggering Stylelint's declaration-empty-line-before rule; edit the
theme.css blocks for the selectors html[data-color-scheme='light'] and
html[data-color-scheme='dark'] (the blocks that contain
--md-palette-background-paper and --md-palette-border-color-paper) and insert a
single empty line immediately before the background: var(--background);
declaration in each block so the linter no longer reports the violation.
🪄 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: 18ec865f-41c7-4e64-9a66-62c22cc8798b

📥 Commits

Reviewing files that changed from the base of the PR and between 742d12b and 99911e1.

⛔ Files ignored due to path filters (2)
  • resources/images/sample-app-login.png is excluded by !**/*.png
  • resources/images/sample-app-self-registration-basic.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • samples/apps/react-vanilla-sample/src/App.css
  • samples/apps/react-vanilla-sample/src/components/GradientCircularProgress.tsx
  • samples/apps/react-vanilla-sample/src/pages/LoginPage.tsx
  • samples/apps/react-vanilla-sample/src/theme/theme.css
✅ Files skipped from review due to trivial changes (2)
  • samples/apps/react-vanilla-sample/src/pages/LoginPage.tsx
  • samples/apps/react-vanilla-sample/src/components/GradientCircularProgress.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • samples/apps/react-vanilla-sample/src/App.css

Comment thread samples/apps/react-vanilla-sample/src/theme/theme.css
@RandithaK RandithaK force-pushed the React-Vanila-Sample-App-Modernisation branch 4 times, most recently from 554d68a to 815b54e Compare May 18, 2026 18:31
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.

♻️ Duplicate comments (1)
samples/apps/react-vanilla-sample/src/theme/theme.css (1)

27-31: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix Stylelint spacing before final declaration in both scheme blocks.

Stylelint’s declaration-empty-line-before is still violated at Line 31 and Line 47. Add one blank line before each background: var(--background); declaration.

Suggested patch
 html[data-color-scheme='light'] {
     color-scheme: light;
     --md-palette-background-paper: rgba(244, 246, 249, 0.7);
     --md-palette-border-color-paper: rgba(191, 198, 207, 0.4);
+
     background: var(--background);
 }
@@
 html[data-color-scheme='dark'] {
     color-scheme: dark;
     --background: `#060d1a`;
     --foreground: `#FFFFFF`;
 
     --md-palette-background-paper: rgba(11, 22, 40, 0.7);
     --md-palette-border-color-paper: rgba(255, 255, 255, 0.08);
     --mui-palette-background-paper: `#0b1424`;
+
     background: var(--background);
 }

Also applies to: 39-47

🤖 Prompt for 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.

In `@samples/apps/react-vanilla-sample/src/theme/theme.css` around lines 27 - 31,
Add a single blank line before the final "background: var(--background);"
declaration in both CSS rule blocks for the selectors
html[data-color-scheme='light'] and html[data-color-scheme='dark'] to satisfy
Stylelint's declaration-empty-line-before rule; locate the two blocks that
contain "--md-palette-background-paper" and "--md-palette-border-color-paper"
and insert one empty line immediately above each "background:
var(--background);" line.
🤖 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.

Duplicate comments:
In `@samples/apps/react-vanilla-sample/src/theme/theme.css`:
- Around line 27-31: Add a single blank line before the final "background:
var(--background);" declaration in both CSS rule blocks for the selectors
html[data-color-scheme='light'] and html[data-color-scheme='dark'] to satisfy
Stylelint's declaration-empty-line-before rule; locate the two blocks that
contain "--md-palette-background-paper" and "--md-palette-border-color-paper"
and insert one empty line immediately above each "background:
var(--background);" line.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 79ad9d03-913f-44ba-8a7e-b40016fb68fe

📥 Commits

Reviewing files that changed from the base of the PR and between a3c7efc and 554d68a.

⛔ Files ignored due to path filters (2)
  • resources/images/sample-app-login.png is excluded by !**/*.png
  • resources/images/sample-app-self-registration-basic.png is excluded by !**/*.png
📒 Files selected for processing (5)
  • samples/apps/react-vanilla-sample/src/App.css
  • samples/apps/react-vanilla-sample/src/components/GradientCircularProgress.tsx
  • samples/apps/react-vanilla-sample/src/pages/LoginPage.tsx
  • samples/apps/react-vanilla-sample/src/theme/theme.css
  • samples/apps/react-vanilla-sample/src/theme/theme.ts
✅ Files skipped from review due to trivial changes (3)
  • samples/apps/react-vanilla-sample/src/pages/LoginPage.tsx
  • samples/apps/react-vanilla-sample/src/theme/theme.ts
  • samples/apps/react-vanilla-sample/src/components/GradientCircularProgress.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • samples/apps/react-vanilla-sample/src/App.css

@RandithaK RandithaK force-pushed the React-Vanila-Sample-App-Modernisation branch 2 times, most recently from c673d00 to 405aa2a Compare May 18, 2026 18:40
Comment thread samples/apps/react-vanilla-sample/src/theme/theme.css
Comment thread samples/apps/react-vanilla-sample/src/App.css Outdated
@RandithaK RandithaK force-pushed the React-Vanila-Sample-App-Modernisation branch from 405aa2a to 8751208 Compare May 19, 2026 16:55
@RandithaK
Copy link
Copy Markdown
Contributor Author

@RandithaK RandithaK force-pushed the React-Vanila-Sample-App-Modernisation branch 2 times, most recently from 39cb552 to cda7955 Compare May 21, 2026 04:28
Signed-off-by: RandithaK <me@randitha.net>
@RandithaK RandithaK force-pushed the React-Vanila-Sample-App-Modernisation branch from cda7955 to 01598ad Compare May 21, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants