-
Notifications
You must be signed in to change notification settings - Fork 823
WEB-412:Reduce spacing and use centralized color system #2953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WEB-412:Reduce spacing and use centralized color system #2953
Conversation
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
View-Role component (HTML + styles) src/app/system/roles-and-permissions/view-role/view-role.component.html, src/app/system/roles-and-permissions/view-role/view-role.component.scss |
HTML: adjusted container margins (m-b-20 → m-b-0), added role-details-card class, updated card wrappers and action-row gap spacing (gap-5px → gap-10px). SCSS: imported colour tokens; added/updated mat-card and container padding, borders, radius, shadows, transitions; refined layout helpers, list/permission paddings, typography, active/inactive states, hover scaling and background, and mat-card-actions spacing. No functional changes. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~15 minutes
Suggested reviewers
- alberto-art3ch
- IOhacker
Pre-merge checks
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately summarizes the two main changes: reducing spacing and implementing centralized color system. It directly reflects the core modifications in both HTML and SCSS files. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
📜 Recent review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/app/system/roles-and-permissions/view-role/view-role.component.htmlsrc/app/system/roles-and-permissions/view-role/view-role.component.scss
🚧 Files skipped from review as they are similar to previous changes (2)
- src/app/system/roles-and-permissions/view-role/view-role.component.scss
- src/app/system/roles-and-permissions/view-role/view-role.component.html
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/app/system/roles-and-permissions/view-role/view-role.component.html (2)
82-82: Consider gap spacing consistency between button groups.Line 130 uses
gap-10pxfor the action buttons (Submit/Cancel), while Line 82 usesgap-5pxfor the select/deselect buttons. For visual consistency, consider whether both button groups should use the same gap value, or if the difference is intentional based on button hierarchy.Also applies to: 130-130
96-96: Optimize track expressions with unique identifiers.Both
@forloops track by object reference rather than by a unique identifier. Consider tracking by ID for better change detection performance:
- Line 96:
track grouping.id(or appropriate unique property)- Line 113:
track permission.idThis prevents unnecessary DOM re-renders when the object references change but the actual data remains the same.
As per coding guidelines for Angular code.
Also applies to: 113-113
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/app/system/roles-and-permissions/view-role/view-role.component.htmlsrc/app/system/roles-and-permissions/view-role/view-role.component.scss
🧰 Additional context used
📓 Path-based instructions (1)
src/app/**
⚙️ CodeRabbit configuration file
src/app/**: For Angular code: verify component separation, trackBy on *ngFor,
strict type safety, and clean observable patterns.
Files:
src/app/system/roles-and-permissions/view-role/view-role.component.htmlsrc/app/system/roles-and-permissions/view-role/view-role.component.scss
🔇 Additional comments (8)
src/app/system/roles-and-permissions/view-role/view-role.component.scss (5)
3-29: Good use of centralized color variables with CSS custom properties.The implementation correctly uses color variables from the centralized system (
$black,$mid-grey) and provides a fallback pattern with CSS custom properties. The transitions and box-shadow provide a polished visual experience.
25-27: Verify the minimal padding for role-details-card.The padding of
0.125rem(2px) is extremely small. While this aligns with the PR objective to reduce spacing, ensure this doesn't make the content appear too cramped or affect readability. Consider testing this visually across different screen sizes.
73-80: Excellent use of centralized color system for hover states.The hover effect properly uses
$light-greyfrom the centralized color system, replacing any previous hardcoded colors. The subtle scale transform (1.01) provides good visual feedback without being jarring.
94-121: Well-structured layout helpers with reduced spacing.The layout utilities are properly scoped and provide reduced spacing values that align with the PR's compact layout objective. The nested styling for
.role-details-card .layout-row-wrapensures context-specific adjustments without global side effects.
123-134: LGTM: Proper button spacing in card actions.The button spacing is consistent with the reduced spacing objective and correctly removes the trailing margin from the last button to prevent unnecessary whitespace.
src/app/system/roles-and-permissions/view-role/view-role.component.html (3)
1-1: Margin reduction aligns with PR objectives.The change from
m-b-20tom-b-0reduces spacing as intended. This should create a more compact layout between the action buttons and the content below.
47-48: Good class structure for styled card.The addition of the
role-details-cardclass provides the necessary hook for the specific styling defined in the SCSS file, maintaining separation of concerns.
71-71: Appropriate margin spacing for section separation.The use of
m-b-20here provides proper visual separation after the permissions card, while earlier sections usem-b-0for a more compact layout. This creates a balanced spacing hierarchy.
1584ad0 to
225e06b
Compare
IOhacker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pr reduce padding and spacing in roles-permissions view page for compactlayout. Replace hardcoded colors with variables from _colours.scss .
WEB-412


Before:
After:
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
If you have multiple commits please combine them into one commit by squashing them.
Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.