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

ha-switch without text is causing unwanted scrollbar #5084

Closed
3 tasks done
Misiu opened this issue Mar 6, 2020 · 8 comments
Closed
3 tasks done

ha-switch without text is causing unwanted scrollbar #5084

Misiu opened this issue Mar 6, 2020 · 8 comments
Labels
Bug Current Bug in UI - Extra Attention stale

Comments

@Misiu
Copy link
Contributor

Misiu commented Mar 6, 2020

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

The problem

While working on view visibility editor I noticed that when shadow dom of ha-switch is empty I get an unwanted scrollbar.

ha_switch_bug

As a quick fix I'm using  :

<ha-switch
  .userId="${user.id}"
  @change=${this.valChange}
  .checked=${this.checkUser(user.id)}
  >&nbsp;</ha-switch
>

image

This cause unwanted scrollbar to appear:

<ha-switch
  .userId="${user.id}"
  @change=${this.valChange}
  .checked=${this.checkUser(user.id)}
  ></ha-switch>

image

Affected PR: https://github.com/home-assistant/frontend/pulls

Expected behavior

ha-switch without text shouldn't cause unwanted scrollbars to appear.

Steps to reproduce

Environment

  • Home Assistant release with the issue: 0.107.0.dev0
  • Last working Home Assistant release (if known):
  • Browser and browser version: Chrome 80.0.3987.132, Firefox 73.0.1
  • Operating system: Windows 10

Problem-relevant configuration

Javascript errors shown in your browser console/inspector

Additional information

@Misiu Misiu added the Bug Current Bug in UI - Extra Attention label Mar 6, 2020
@Misiu Misiu mentioned this issue Mar 6, 2020
9 tasks
@bramkragten
Copy link
Member

It is not the lack of text that causes this, but the margin (right) of the switch. The ripple probably gets too big. We have to wait for mwc to fix this.

@Misiu
Copy link
Contributor Author

Misiu commented Mar 12, 2020

@bramkragten is this reported as a bug? If yes could you please link the issue.

@bramkragten
Copy link
Member

I have not filled one, if there is none could you do that maybe?

@Misiu
Copy link
Contributor Author

Misiu commented Mar 12, 2020

@bramkragten
Copy link
Member

Yes :-)

@Misiu
Copy link
Contributor Author

Misiu commented Mar 12, 2020

@bramkragten it would be awesome if the demo site would show users in view visibility tab. This would help with presenting the bug to mwc team. Is this possible to add?

@bramkragten
Copy link
Member

bramkragten commented Mar 12, 2020

@stale
Copy link

stale bot commented Jun 10, 2020

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 10, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Current Bug in UI - Extra Attention stale
Projects
None yet
Development

No branches or pull requests

2 participants