refactor(styles): remove hardcoded styles - #1760
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the React side-nav-auth template styling to remove hardcoded colors and reduce excessive component state styling, aligning the generated auth UI more closely with Ignite UI theme tokens (issue #1748).
Changes:
- Replaced hardcoded error colors in OAuth redirect pages with the theme token
var(--ig-error-500). - Updated auth-related CSS modules to prefer Ignite UI palette variables (e.g.,
--ig-surface-500,--ig-primary-500,--ig-gray-*) and removed several hardcoded hover/disabled overrides. - Adjusted focus-visible outline styling to use a theme token.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectMicrosoft.tsx | Switches inline error color from a hex value to var(--ig-error-500). |
| packages/cli/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectGoogle.tsx | Switches inline error color from a hex value to var(--ig-error-500). |
| packages/cli/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectFacebook.tsx | Switches inline error color from a hex value to var(--ig-error-500). |
| packages/cli/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/Profile.module.css | Replaces several hardcoded colors with theme tokens in the profile card layout. |
| packages/cli/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.module.css | Removes hardcoded input/button styling and updates remaining colors to theme tokens. |
| packages/cli/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginDialog.module.css | Removes hardcoded title color to allow theme to control it. |
| packages/cli/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginBar.module.css | Removes hardcoded button/avatar colors and uses a theme token for focus outline. |
| packages/cli/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.module.css | Removes hardcoded input/button styling, updates error/border colors to theme tokens. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…thub.com/IgniteUI/igniteui-cli into mstoyanova/remove-hardcoded-styles-react
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated no new comments.
Suppressed comments (2)
packages/cli/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.tsx:49
- This interactive element is rendered as an without an href and only wires onClick; with role="button" + tabIndex it should also support keyboard activation (Enter/Space). Otherwise keyboard users can tab to it but not reliably activate it.
<a onClick={onRegister} role="button" tabIndex={0}>Create new account</a>
packages/cli/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.tsx:63
- This interactive element is rendered as an without an href and only wires onClick; with role="button" + tabIndex it should also support keyboard activation (Enter/Space). Otherwise keyboard users can tab to it but not reliably activate it.
<a onClick={onLogin} role="button" tabIndex={0}>Have an account?</a>
Description
Related Issue
Closes #1748
Type of Change
Affected Packages
igniteui-cli(packages/cli)@igniteui/cli-core(packages/core)@igniteui/angular-templates(packages/igx-templates)@igniteui/angular-schematics(packages/ng-schematics)@igniteui/mcp-server(packages/igniteui-mcp)Checklist
npm run test)npm run build)npm run lint)Additional Context