Skip to content

Conversation

@KrumTy
Copy link
Contributor

@KrumTy KrumTy commented Dec 4, 2025

What

Adjusts the rule to the standard followed in redis.
Previously, with sass we had the same thing (import styles).

Cons of the namespace pattern:

  • Slightly More Verbose: S.Container vs just Container

Cons of the named imports pattern:

  • Name Conflicts: Container could conflict with actual components
  • Unclear Origin: Hard to tell if Container is a component or styled element
  • Import Bloat: Long import lines with many styled components
  • Refactoring Issues: Renaming requires updating both definition and import

Testing


Note

Updates the frontend style guide to prefer namespace imports from Component.styles and discourage named imports, with examples.

  • Styled Components Rules:
    • Import Pattern: Keep styles in dedicated .styles.ts files and import them via namespace (import * as S from './Component.styles').
      • Adds “Good” example using S.Container, S.Title, S.Content.
      • Marks named imports from Component.styles as “Bad”.

Written by Cursor Bugbot for commit 14b3996. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.82% 21048/25415
🟡 Branches 67.96% 8842/13011
🟡 Functions 77.96% 5767/7397
🟢 Lines 83.21% 20614/24772

Test suite run success

5468 tests passing in 703 suites.

Report generated by 🧪jest coverage report action from 14b3996

Copy link
Contributor

@pd-redis pd-redis left a comment

Choose a reason for hiding this comment

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

lets discuss

@pd-redis pd-redis self-requested a review December 4, 2025 11:39
@pd-redis pd-redis dismissed their stale review December 4, 2025 12:32

dismiss

@KrumTy KrumTy merged commit acecd72 into main Dec 4, 2025
18 checks passed
@KrumTy KrumTy deleted the fe/ai/update-frontend-styles-import-rule branch December 4, 2025 13:31
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.

4 participants