Coder Social home page Coder Social logo

Comments (8)

michaelarnauts avatar michaelarnauts commented on September 23, 2024

It seems there is an issue with the padding/margin anyway, as the "ripple effect" seems to be cut off.
image

This doesn't happen on the demo pages: https://elements.polymer-project.org/elements/paper-toggle-button?view=demo:demo/index.html&active=paper-toggle-button

from frontend.

balloob avatar balloob commented on September 23, 2024

The padding has been increased in 0.17. You removed the issue template so I
don't know which version you're running. The cutting off is only in the
more info which doesn't have any side effects.

On Wed, Apr 13, 2016, 03:13 Michaël Arnauts [email protected]
wrote:

It seems there is an issue with the padding/margin anyway, as the "ripple
effect" seems to be cut off.
[image: image]
https://cloud.githubusercontent.com/assets/1193779/14490079/f223d63c-0170-11e6-8ae2-e7e3c04f2f70.png

This doesn't happen on the demo pages:
https://elements.polymer-project.org/elements/paper-toggle-button?view=demo:demo/index.html&active=paper-toggle-button


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#49 (comment)

from frontend.

michaelarnauts avatar michaelarnauts commented on September 23, 2024

There is no issue template in this repo :)

Anyway, I just upgraded to 0.17, and the padding around the toggle seems to be padding: 9px 0;. If I change this to padding: 9px;, it's a lot better to click on the icon, and the layout doesn't seem to change.

Edit:
On this line: https://github.com/home-assistant/home-assistant-polymer/blob/4ab308a9d2ae8a5f7313a28f333fd0636c94968f/src/components/entity/ha-entity-toggle.html#L20

from frontend.

balloob avatar balloob commented on September 23, 2024

Ah my bad, I thought this was an issue on the main repo.

I did explore this when I decided to just add a padding on top + bottom. Adding a padding on the right would make the switch not align with control for other entities. And since we can't have a padding on the right we also can't have a padding on the left or else it's not symmetrical.

from frontend.

happyleavesaoc avatar happyleavesaoc commented on September 23, 2024

I have about a 50% success rate when toggling a switch on mobile. Too easy to accidentally open the graph.

from frontend.

justweb1 avatar justweb1 commented on September 23, 2024

@balloob Can this issue be closed or should we still look into it?

from frontend.

michaelarnauts avatar michaelarnauts commented on September 23, 2024

I still have the same remark as @happyleavesaoc . On mobile, I accidentally open the dialog a lot instead of toggling the switch.

from frontend.

andrey-git avatar andrey-git commented on September 23, 2024

This can be solved by increasing padding (Google recommends at least 48x48: https://developers.google.com/speed/docs/insights/SizeTapTargetsAppropriately)
and compensating for it with negative margin. This way it doesn't move the element and doesn't affect parent size.

from frontend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.