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

Remove tile pointer/ripple/index when it has no action #19137

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

karwosts
Copy link
Contributor

Proposed change

If a tile card (or tile card icon) explicitly defines no action, remove the visual suggestions that is interactive:

  • No mouse hover effects
  • No cursor pointer
  • No ripples on click
  • No tab index

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

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:

@ildar170975
Copy link
Contributor

ildar170975 commented Dec 25, 2023

I would leave "on_hover" effects even for Tiles w/o tap_actions.
When a user monitoring UI with Tiles, he still may move a mouse pointer; and "on_hover" effect may help him to concentrate his attention on the currently selected Tile.
It is especially useful for users with limited abilities (a11y) .

Copy link
Member

@Quentame Quentame left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@piitaya piitaya left a comment

Choose a reason for hiding this comment

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

Thanks! We should use ifDefined directive to avoid unnecessary attribute in the DOM.

src/panels/lovelace/cards/hui-tile-card.ts Outdated Show resolved Hide resolved
src/panels/lovelace/cards/hui-tile-card.ts Outdated Show resolved Hide resolved
@bramkragten bramkragten added this to the 2024.1 milestone Jan 3, 2024
@bramkragten bramkragten merged commit 41bb677 into home-assistant:dev Jan 3, 2024
13 checks passed
bramkragten pushed a commit that referenced this pull request Jan 3, 2024
* Remove tile pointer/ripple/index when it has no action

* update

* Apply suggestions from code review

Co-authored-by: Paul Bottein <[email protected]>

---------

Co-authored-by: Paul Bottein <[email protected]>
@karwosts karwosts deleted the tile-no-action branch January 3, 2024 14:16
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.

Tile card with disabled actions still has hover effect and is clickable
5 participants