Skip to content

improved icon button size - #143

Merged
peereflits merged 1 commit into
developfrom
140-task-improve-button-sizes
Jul 25, 2025
Merged

improved icon button size#143
peereflits merged 1 commit into
developfrom
140-task-improve-button-sizes

Conversation

@DphnZwp

@DphnZwp DphnZwp commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Style
    • Updated the appearance of action buttons in the side panel header for improved visual consistency.
    • Refined icon colors and hover effects for a more cohesive and accessible user interface.

@DphnZwp
DphnZwp requested a review from peereflits July 23, 2025 14:10
@DphnZwp DphnZwp self-assigned this Jul 23, 2025
@DphnZwp DphnZwp linked an issue Jul 23, 2025 that may be closed by this pull request
3 tasks
@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This change updates the SidePanelComponent by adding a specific CSS class to header action buttons and refines the associated CSS styling. The CSS selector is expanded, color variables are updated, and new style rules are introduced for icon buttons within the side panel actions.

Changes

File(s) Change Summary
Src/Innovative.Blazor.Components/Components/SidePanel/SidePanelComponent.razor Added "sidepanel-icon-button" CSS class to RadzenButton components in the side panel header actions.
Src/Innovative.Blazor.Components/Components/SidePanel/SidePanelComponent.razor.css Expanded CSS selectors, updated color variables, removed color: inherit, and added new style rules for icons.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SidePanelComponent
    participant CSS

    User->>SidePanelComponent: Interacts with header action buttons
    SidePanelComponent->>CSS: Applies "sidepanel-icon-button" class to buttons
    CSS-->>SidePanelComponent: Styles buttons and icons based on new selectors and variables
Loading

Estimated code review effort

2 (~12 minutes)

Possibly related PRs

Suggested reviewers

  • vdboots
  • peereflits

Poem

A button gets a class, so neat,
With colors bold, its style complete.
The side panel shines with icons bright,
Thanks to new CSS, it looks just right.
A hop, a skip, a stylish feat—
This rabbit’s work is quite the treat!
🐇✨


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (2)
Src/Innovative.Blazor.Components/Components/SidePanel/SidePanelComponent.razor.css (2)

34-36: ::deep triggers linter errors – silence or scope the rule

The Biome warning about an “unknown pseudo-element” is a false positive: ::deep is explicitly supported by Blazor CSS-isolation to pierce the generated scope attribute. Consider adding an ignore comment (/* biome-ignore noUnknownPseudoElement */) or linter override for .razor.css files to keep CI green.


61-63: Selector duplication can be reduced

Both the normal and hover state inside ::deep share the same colour. You can drop the second selector and let the inherited colour handle hover:

-.sidepanel-actions ::deep .sidepanel-icon-button .rz-button-box .material-symbols-outlined,
-.sidepanel-actions ::deep .sidepanel-icon-button:hover .rz-button-box .material-symbols-outlined {
+.sidepanel-actions ::deep .sidepanel-icon-button .rz-button-box .material-symbols-outlined {
     color: var(--innov-base-50, #fafafa);
 }

Behaviour stays identical while trimming CSS bytes.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b0ecb9e and 80fad71.

📒 Files selected for processing (2)
  • Src/Innovative.Blazor.Components/Components/SidePanel/SidePanelComponent.razor (2 hunks)
  • Src/Innovative.Blazor.Components/Components/SidePanel/SidePanelComponent.razor.css (2 hunks)
🪛 Biome (2.1.2)
Src/Innovative.Blazor.Components/Components/SidePanel/SidePanelComponent.razor.css

[error] 35-35: Unexpected unknown pseudo-elements: deep

See MDN web docs for more details.
Use a known pseudo-elements instead, such as:

(lint/correctness/noUnknownPseudoElement)


[error] 61-61: Unexpected unknown pseudo-elements: deep

See MDN web docs for more details.
Use a known pseudo-elements instead, such as:

(lint/correctness/noUnknownPseudoElement)


[error] 62-62: Unexpected unknown pseudo-elements: deep

See MDN web docs for more details.
Use a known pseudo-elements instead, such as:

(lint/correctness/noUnknownPseudoElement)

🧰 Additional context used
🪛 Biome (2.1.2)
Src/Innovative.Blazor.Components/Components/SidePanel/SidePanelComponent.razor.css

[error] 35-35: Unexpected unknown pseudo-elements: deep

See MDN web docs for more details.
Use a known pseudo-elements instead, such as:

(lint/correctness/noUnknownPseudoElement)


[error] 61-61: Unexpected unknown pseudo-elements: deep

See MDN web docs for more details.
Use a known pseudo-elements instead, such as:

(lint/correctness/noUnknownPseudoElement)


[error] 62-62: Unexpected unknown pseudo-elements: deep

See MDN web docs for more details.
Use a known pseudo-elements instead, such as:

(lint/correctness/noUnknownPseudoElement)

🔇 Additional comments (1)
Src/Innovative.Blazor.Components/Components/SidePanel/SidePanelComponent.razor (1)

21-24: CSS class injection looks correct – double-check Radzen’s class passthrough

Attaching class="sidepanel-icon-button" to RadzenButton relies on the component forwarding arbitrary attributes to the underlying <button> (Radzen does this via AdditionalAttributes).
Just make sure you’re on a Radzen version ≥ 4.15 where this behaviour is guaranteed; otherwise the class might never reach the DOM and the new styles won’t apply.
No code changes required – only verification.

Also applies to: 28-31, 42-45

Comment on lines 53 to +60
.sidepanel-icon-button .material-symbols-outlined {
color: var(--rz-text-tertiary-color);
color: var(--innov-base-600, #675f5f);
}

.sidepanel-icon-button:hover .material-symbols-outlined {
color: var(--rz-text-title-color);
color: var(--innov-base-900, #0d0c0c);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Colour rules may be overridden unexpectedly

You now have two hover-colour rules:

  1. .sidepanel-icon-button:hover .material-symbols-outlined { color: var(--innov-base-900); }
  2. .sidepanel-actions ::deep .sidepanel-icon-button:hover .rz-button-box .material-symbols-outlined { color: var(--innov-base-50); }

Inside a RadzenButton, rule 2 wins due to higher specificity, leading to different hover colours for native <button> vs RadzenButton> variants of the same icon button.

If that’s intentional, add an inline comment; if not, unify the colours or raise specificity for rule 1.

🤖 Prompt for AI Agents
In
Src/Innovative.Blazor.Components/Components/SidePanel/SidePanelComponent.razor.css
around lines 53 to 60, there are conflicting hover color rules for
.material-symbols-outlined inside .sidepanel-icon-button, causing inconsistent
hover colors between native buttons and RadzenButton variants due to specificity
differences. To fix this, either add an inline comment explaining the
intentional difference in hover colors or unify the hover color values to be
consistent. Alternatively, increase the specificity of the first hover rule to
match or override the second rule if the color should be the same.

@peereflits
peereflits merged commit e403b69 into develop Jul 25, 2025
2 of 4 checks passed
@MatthijsvanderPlas
MatthijsvanderPlas deleted the 140-task-improve-button-sizes branch September 4, 2025 06:20
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.

[TASK] Improve button sizes

2 participants