Skip to content

style(ui): enforce sharp corners across components#79

Merged
jwt625 merged 2 commits intomainfrom
feature/ui-sharp-corners
Feb 16, 2026
Merged

style(ui): enforce sharp corners across components#79
jwt625 merged 2 commits intomainfrom
feature/ui-sharp-corners

Conversation

@jwt625
Copy link
Owner

@jwt625 jwt625 commented Feb 16, 2026

No description provided.

@claude
Copy link

claude bot commented Feb 16, 2026

PR Review: style(ui): enforce sharp corners across components

Summary

This PR implements a consistent sharp-corner visual design language across the entire UI by removing border-radius styling from 21 component files and adding global CSS rules in app.css.

Code Quality ✅

Strengths:

  • Consistent approach: The PR uses a systematic method - both global CSS rules and component-level changes ensure comprehensive coverage
  • Well-scoped commit: Single, focused commit with clear conventional commit message
  • Minimal code churn: Changes are straightforward find-and-replace operations (95 additions, 75 deletions)

Good practices:

  • Global rules in app.css:31-49 use attribute selectors to catch elements by class name patterns, reducing future maintenance burden
  • Use of !important on SVG rect attributes is justified here since it needs to override inline SVG attributes

Potential Issues ⚠️

1. Visual Regression: Loading Spinners (High Priority)

Location: src/components/ui/FileUpload.svelte:548, src/components/ui/LoadingOverlay.svelte:42

The loading spinners use CSS border-radius: 0 which will turn circular spinners into squares. This is likely not intentional and will look broken:

.loading-spinner {
    border: 4px solid #333;
    border-top-color: #4a9eff;
    border-radius: 0;  /* ❌ This breaks the spinner animation */
    animation: spin 1s linear infinite;
}

Recommendation: Loading spinners should remain circular. Add an exception:

/* In app.css or component styles */
.loading-spinner {
    border-radius: 50% !important;
}

2. UX Concern: Comment Bubble Indicators

Location: src/components/comments/CommentBubble.svelte:104

The minimal comment bubble (24x24px) changed from circular to square. Circular indicators are a common UX pattern for "avatars" or "markers" - the square version may look unpolished or be confused with other UI elements.

Recommendation: Consider if this is intentional. If comment bubbles should remain circular for visual hierarchy, add an exception.

3. Mobile FAB Button

Location: src/components/ui/MobileControls.svelte:500

The Floating Action Button (FAB) is a well-established mobile UI pattern that's typically circular. Changing it to square (border-radius: 0) goes against platform conventions.

Recommendation: Keep FABs circular to match user expectations on mobile platforms.

4. CSS Specificity Conflicts

Location: src/app.css:32-43

The global selectors like [class*="panel"] will match any element with "panel" anywhere in the class name. While this provides broad coverage, it could:

  • Conflict with third-party libraries or future components
  • Override intentional styling in specific components
  • Make debugging harder when "border-radius isn't working"

Current implementation:

button,
input,
textarea,
[class*="panel"],  /* Matches "panel", "subpanel", "panel-wrapper", etc. */
[class*="modal"],
/* ... */

Recommendation: This is acceptable for a complete visual overhaul, but document this decision so future contributors understand the global rules.

5. SVG Icon Rectangles

Location: src/app.css:46-49

The global rule svg rect { rx: 0 !important; ry: 0 !important; } affects ALL SVG rectangles sitewide. This could:

  • Break third-party icons or illustrations
  • Affect decorative SVG elements where rounded corners are intentional
  • Override design system icons from libraries

Recommendation: Consider scoping this to specific component SVGs if possible, or document that only sharp-corner SVG icons should be used.

Performance Considerations ✅

  • No performance impact: CSS-only changes with negligible runtime cost
  • Selector performance: Attribute selectors like [class*="panel"] are slightly slower than class selectors, but the difference is negligible for modern browsers with ~20 UI elements

Security Concerns ✅

  • No security implications: Pure styling changes with no logic modifications

Test Coverage ⚠️

Observations:

  • No visual regression tests exist for UI components
  • Changes affect 21 component files but test files appear to focus on business logic (auth, rendering, collaboration)

Recommendations:

  1. Manual testing required: Test the following interactively:

    • Loading spinners (FileUpload, LoadingOverlay) - verify they still appear circular and animate correctly
    • Comment bubbles in minimal mode - verify visual appearance
    • Mobile FAB button - test on mobile viewport
    • All modals, panels, and buttons - verify sharp corners appear as intended
  2. Consider adding visual regression tests: Tools like Playwright or Chromatic could catch future styling regressions

Architecture & Maintainability

Positive:

  • Clear design system decision applied consistently
  • Easy to revert if needed (single commit)
  • Future components will inherit sharp corners from global rules

Considerations:

  • Document this design decision in a style guide or DESIGN.md file
  • Consider if certain UI element types (spinners, avatars, FABs) should have exceptions

Summary Recommendations

Must Fix (Before Merge)

  1. Fix loading spinners - restore border-radius: 50% for circular spinners

Should Consider

  1. 🤔 Review comment bubble styling (minimal mode) - confirm squares are intentional
  2. 🤔 Review mobile FAB - consider keeping circular per mobile UX conventions
  3. 📝 Add manual testing checklist to PR description
  4. 📝 Document the sharp-corner design system decision

Optional Improvements

  1. Consider scoping SVG rect rule to avoid affecting third-party content
  2. Add visual regression tests for future UI changes

Overall Assessment: This is a clean, well-executed styling change, but likely has unintended visual bugs with loading spinners. Review the specific UI elements mentioned above before merging.

🤖 Generated with Claude Code

@claude
Copy link

claude bot commented Feb 16, 2026

PR Review: Style Enforcement - Sharp Corners Across UI

Summary

This PR implements a design system change to enforce sharp corners (border-radius: 0) across all UI components, replacing the previous rounded corner aesthetic. The changes span 21 files with a systematic approach using both global CSS rules and component-level updates.


Strengths

  1. Systematic Approach: The use of global CSS selectors in src/app.css (lines 31-49) provides a good foundation that automatically applies sharp corners to common elements using attribute selectors like [class*="panel"].

  2. Intentional Design Decision: The second commit ("fix(ui): restore circular loading spinners") shows good judgment in preserving circular spinners where they make functional sense, demonstrating thoughtful application rather than blind enforcement.

  3. Consistent Implementation: All 21 files follow the same pattern of changing border-radius values to 0, showing consistency across the codebase.

  4. SVG Handling: The global rule for svg rect elements (src/app.css:46-48) ensures even icon elements follow the sharp-corner visual language.


⚠️ Issues & Concerns

1. Semantic Inconsistency (Minor)

In src/components/comments/CommentBubble.svelte:104, the .minimal class still sets border-radius: 0 despite the element already having this applied via the parent class at line 92. This is redundant but harmless.

2. Loading Spinner Exception Not Documented

The loading spinner at src/components/ui/LoadingOverlay.svelte:42 retains border-radius: 50% (circular shape), which is correct functionally but creates an exception to the sharp-corner rule. This exception should be documented in the global CSS or component comment to explain why spinners are exempt from the design system.

Recommendation: Add a comment explaining this exception.

3. FAB Button Exception

The FAB (Floating Action Button) in src/components/ui/MobileControls.svelte:501 was changed from border-radius: 50% to border-radius: 0, which transforms it from a circular button to a square. FABs are traditionally circular for ergonomic and design reasons on mobile interfaces. This may impact UX negatively.

Question: Was this intentional? Circular FABs are a widely-recognized mobile UI pattern.

4. Over-reliance on !important

The global SVG rule uses !important flags. While this ensures enforcement, it prevents any future exceptions. Consider whether all SVG rectangles should be forced to sharp corners, or if some icons might need rounded corners for visual clarity.

5. Missing Test Coverage

No visual regression tests or snapshot tests appear to have been added/updated for this visual change. While the existing tests may still pass, visual changes like this benefit from screenshot tests to catch unintended visual regressions.


🔍 Code Quality

Good:

  • Clean, focused changes with minimal noise
  • Proper use of CSS specificity
  • Consistent formatting
  • Good commit messages that explain the "why"

Could Improve:

  • Add inline comments explaining exceptions (spinners, etc.)
  • Consider documenting this design decision in a style guide

🚀 Performance Considerations

No performance concerns. The attribute selectors like [class*="panel"] have minimal performance impact in modern browsers, and the changes are purely visual CSS updates.


🔒 Security Concerns

None identified. This is purely a styling change with no security implications.


📋 Recommendations

  1. Document the Exception: Add comments explaining why loading spinners remain circular
  2. Reconsider FAB Design: Evaluate whether the mobile FAB should remain circular for better UX
  3. Consider Visual Testing: Add screenshot/visual regression tests for critical UI components
  4. Remove Redundant Rules: Clean up redundant border-radius: 0 declarations where global CSS already applies
  5. Evaluate !important Usage: Consider if all SVG rectangles should be forced to sharp corners

Overall Assessment

This is a well-executed design system change with consistent implementation. The code quality is solid, and the systematic approach shows good engineering practices. The main concerns are around UX decisions (FAB button shape) and documentation of exceptions.

Recommendation: Approve with minor suggestions - The changes are safe to merge after considering the FAB button design decision.

@jwt625 jwt625 merged commit 6ab33ee into main Feb 16, 2026
2 checks passed
@jwt625 jwt625 deleted the feature/ui-sharp-corners branch February 16, 2026 00:56
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.

1 participant