Skip to content
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

RTL fixes sep 24 #21893

Merged
merged 3 commits into from
Sep 9, 2024
Merged

RTL fixes sep 24 #21893

merged 3 commits into from
Sep 9, 2024

Conversation

yosilevy
Copy link
Contributor

@yosilevy yosilevy commented Sep 5, 2024

Breaking change

Proposed change

RTL bug fixes

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Summary by CodeRabbit

  • New Features

    • Enhanced visual representation of the voice command dialog with improved scaling effects.
    • Updated navigation icon in the history graph card for a more consistent user interface.
  • Style

    • Adjusted CSS targeting for SVG icons in the button menu to improve visual presentation and user interaction.
    • Updated styles for the new icon component in the history graph card header.

Copy link
Contributor

coderabbitai bot commented Sep 5, 2024

Walkthrough

Walkthrough

The changes involve updates to the styling and components used in various dialog and panel files. Notable modifications include the addition of a CSS property for scaling in the HaVoiceCommandDialog, a change in the button selector in HaConfigLogs, and a replacement of the ha-icon-button with ha-icon-next in the HuiHistoryGraphCard. These adjustments enhance the visual representation and user interface consistency across the application.

Changes

File Path Change Summary
src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts Added transform: scaleX(var(--scale-direction)); to enhance visual dynamics.
src/panels/config/logs/ha-config-logs.ts Changed CSS selector from ha-button-menu > mwc-button > ha-svg-icon to ha-button-menu > ha-button > ha-svg-icon.
src/panels/lovelace/cards/hui-history-graph-card.ts Replaced ha-icon-button with ha-icon-next in the card header and updated associated CSS styles.

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 618cd9d and 919a0a3.

Files selected for processing (3)
  • src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts (1 hunks)
  • src/panels/config/logs/ha-config-logs.ts (1 hunks)
  • src/panels/lovelace/cards/hui-history-graph-card.ts (3 hunks)
Files skipped from review due to trivial changes (1)
  • src/dialogs/voice-command-dialog/ha-voice-command-dialog.ts
Additional comments not posted (3)
src/panels/config/logs/ha-config-logs.ts (1)

253-253: Review of CSS Selector Change

The change from ha-button-menu > mwc-button > ha-svg-icon to ha-button-menu > ha-button > ha-svg-icon indicates a shift in the use of button components, which could affect the styling and behavior of the SVG icon within the button menu. This change is likely intended to improve consistency and possibly address RTL layout issues by ensuring the icon's alignment and spacing are correct in RTL modes.

Given the context of the PR, which focuses on RTL fixes, this change seems appropriate. However, it's crucial to ensure that this change does not inadvertently affect the layout in LTR (left-to-right) modes or introduce other styling issues.

Actionable Recommendations:

  • Verify the visual consistency: Ensure that the icon's appearance and behavior are consistent across both RTL and LTR layouts. This can be done through visual testing or by adding automated tests that check these properties.
  • Review related components: Since the selector change affects how the icon is styled within the button, it's advisable to review other instances where ha-button and ha-svg-icon are used together to ensure that similar changes are applied consistently across the application if needed.
src/panels/lovelace/cards/hui-history-graph-card.ts (2)

258-258: Updated CSS for ha-icon-next is well-implemented.

The use of CSS custom properties (--mdc-icon-button-size) ensures that the icon's appearance is consistent and easily adjustable across different themes. This is a good practice for maintainability and theming flexibility.


211-211: Replacement of ha-icon-button with ha-icon-next is appropriate.

The change aligns with the PR's objective to enhance RTL support and update UI components. Ensure that the integration of ha-icon-next is seamless and that it functions correctly in all supported browsers.

Verification successful

Integration and styling of ha-icon-next are consistent and appropriate.

The ha-icon-next component is well-integrated within hui-history-graph-card.ts, with styling defined directly in the file. This aligns with its usage across the codebase, ensuring consistency and proper functionality. No further action is required.

  • File: src/panels/lovelace/cards/hui-history-graph-card.ts
  • Lines: 211
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the integration and styling of `ha-icon-next`.

# Test: Search for the usage of `ha-icon-next` in the project to ensure it's styled consistently.
rg --type css 'ha-icon-next'

Length of output: 177


Script:

#!/bin/bash
# Description: Search for the usage of `ha-icon-next` across all file types to verify integration and styling.

# Search for `ha-icon-next` in the entire codebase to find its usage and any associated styling or integration logic.
rg 'ha-icon-next' -A 5

Length of output: 56196


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 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 or @coderabbitai title 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.

@bramkragten bramkragten merged commit 1a0ca1b into home-assistant:dev Sep 9, 2024
14 checks passed
@yosilevy yosilevy deleted the RTL-fixes-Sep-24 branch September 24, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants