resoai / TileBoard

A simple yet highly configurable Dashboard for HomeAssistant
MIT License
1.63k stars 278 forks source link

[Feature Request] Swipe to change brightness or volume #303

Open geronimo078 opened 4 years ago

geronimo078 commented 4 years ago

It is very uncomfortable to hit the small - and + buttons to change the brightness for the lamp and also for the volume. It whould be very nice if i could put my finger on the tile and simple move up and down. To display the value it whould be nice to fill the tile using a darker background.

I tried to implement this behavior using the hammer library but i have no experience with angular.

Like this sample: https://codepen.io/Geronimo78/pen/QWWRJZr

rchl commented 4 years ago

That kind of solution would interfere with scrolling and changing pages by swiping so I wouldn't see it working universally enough to be worth investing time into.

For a while now I was thinking that the proper solution for extra controls would be to have them show up in an extra popup dialog, after pressing and holding a tile. But that's something that would probably have to be investigated more to see if it would work in all cases and if it would be convenient (it would require extra presses to change some settings).

geronimo078 commented 4 years ago

A lot of apps use the swipe to change pages and for elements.

for the dimmer, i imaging that:

I do not like popup dialogs for "basic" functions.

Meanwhile i've found a sample using angular and hammer.js. it should be possible to use the "drag" event for the tile and "swipe" for the page.

http://monospaced.github.io/angular-hammer/

rchl commented 4 years ago

Long press to trigger brightness controls is already there for light tiles. The UI is different than what you are proposing (it's just a slider right now) but it's there. And I would not mind improving that UI with something similar to what you are proposing.

So if this issue is about improving that UI, I'm all for it. If it's about changing how that UI is triggered then it needs more consideration.

resoai commented 4 years ago

I think that light tile does need a major overhaul. Perhaps we need a proper colour wheel in a popup to match the behaviour to the rest of the tiles.

For me, basic actions must stay within the primary action while least used options should end up in a popup.

geronimo078 commented 4 years ago

I think that light tile does need a major overhaul. Perhaps we need a proper colour wheel in a popup to match the behaviour to the rest of the tiles.

For me, basic actions must stay within the primary action while least used options should end up in a popup.

Exactly this.

It's just an idea to improve the ui. An example is the brightness slider used in Apple IOS.

Sample Image

resoai commented 4 years ago

Withg all due respect to Apple, their very own Home app is a train wreck. It is hardly usable when you home more than four devices.

While a swipe slider does appeal to me, there are other tiles in TileBoard, like media player which rely on + - and where swiping would not be possible altogether.

rchl commented 4 years ago

Maybe we could focus on improving light tile here? Otherwise, we can holistically decide and define how things should look and behave but that might turn out to be overwhelming and then we won't do anything (note that we don't have that much time available anyway ;)).

For the light tile we could: 1) change the normal state to always show brightness indicator using the background color like in https://codepen.io/Geronimo78/pen/QWWRJZr 2) after the long press, change the tile to show big, centered percentage value and handle brightness change by just panning up or down. Lifting the finger would exit the brightness changing state. (that would have to work a bit differently for non-touch devices though.

Let's discuss and maybe we'll agree on something that we all like. :)

geronimo078 commented 4 years ago

absolutely agree, i think the light tile is probably one of the most used.

I like your idea, this should be very intuitive and works also great on small screens on the wall :)

But then it needs a new tile for RGB lights or a new menu to chose the color. Perhabs by double tapping the tile.

resoai commented 4 years ago

To me, long-press is always about "more options" and I belive it should stay consistent in all tiles. Perhaps it would be a good idea to forget about gragging for a moment and invest some time in a proper popup with colour wheel and brightess slider.

opep commented 4 years ago

To me, long-press is always about "more options" and I belive it should stay consistent in all tiles. I don't know about consistency, but for lights, one option would be consider the upper portion of the tile as + and the bottom as -. I noticed that for lights able to dimmer and RGB, the tile has to be taller in order to fit respective controls when long pressing. The way it is now is annoying, + and - being too tiny and to near each other.

akloeckner commented 3 years ago

linked: #312