Comments (25)
I think the vertical
option can be removed and can be replaced by a layout
options : default
vertical
horizontal
.
And we can a backward compatibility to avoid breaking change.
There will be 3 layouts :
Default
Vertical
Horizontal
from lovelace-mushroom.
Somethings like that ?
Maybe we can add an option controls_layout: "column" | "row"
for that?
from lovelace-mushroom.
We can add collapse_controls
to hide controls when entity is considered off
too. I think it's easy to understand if collapse
and layout
are two different options.
from lovelace-mushroom.
Another option that I'd like to see is to be able to hide the slider if the current state of the light is 'off'
from lovelace-mushroom.
Another option that I'd like to see is to be able to hide the slider if the current state of the light is 'off'
I'm doing this by Conditional Card
hide slider when other than on
, show when on
from lovelace-mushroom.
I did a mock up of how it could look like with and without title with light and dark themes.. Don't hesitate if you want me to try different versions since it's all in photoshop and split in layers. It's pretty easy for me to change things around if needed. I hope this helps.
from lovelace-mushroom.
Absolutely agreed, I'm trying to make per room group card and it's a bit tough to get Light cards and entity cards (for smart plugs controling lights, in the switch domain) to line up cleanly on one line.
The ability to get the light card to only take one line would make that look good, +1 !
from lovelace-mushroom.
Also would love to see this to reduce vertical space. It likely can get extended to be reused for other card as common layout option too. For example, this is the mushroom alarm card with vertical disabled:
Here is how it could look like with a layout mode of horizontal and vertical disabled:
This looks possible with flex-direction: row; justify-content: space-between; align-items: center;
on the container and some modifications to some of the padding on the mushroom entity.
This sets us up for getting closer to Yuhang's original design work with horizontal card layouts that are rounded and compact so it keeps things true to the design language this work was inspired from. Plus it differentiates mushroom and UI Minimalist from the blocky nature and wasted use of space in other HA cards you might find:
With a rounded border radius on the card and icons:
Other cards that benefit:
from lovelace-mushroom.
I wanted to share this as well given there are constraints you have to deal with doing this approach:
This is a 50/50 split with space reserved for text and the other portion reserved for actions. I feel the look and usability is acceptable but users will need to be more careful about not ending up in situations where they break these constraints or risk text or elements collapsing to a new line thus negating the main benefit of this approach.
It also means this mode is primarily used for full-width columns and not half-columns in a horizontal stack. Need to think through how to gracefully handle these use cases. One initial thought is maybe the horizontal layout mode is ignored and things function with vertical flow as if the layout option didn't exist (aka swap back to flex-direction: column; and reflow as the original look is now.)
from lovelace-mushroom.
Exactly! Or even put the slider behind the entity name (but that may introduce color contrast issues) :) Thank you!
from lovelace-mushroom.
OT: I must say I absolutely love the haptic feedback implementation on the iPhone. That's something the default Lovelace stuff should have.
from lovelace-mushroom.
Yeah, this would be nice. Until this feature is available, just use an vertical stack!
from lovelace-mushroom.
+1 for one row light.
Would be also nice to have a height attribute so we can make the slider even more compact if needed.
I'm currently using it for a mobile device and less real estate on slider would be a great help.
Thanks for the amazing work on this btw.
from lovelace-mushroom.
Wouldn't it be possible to have the slider extend (begin) under the text? It would probably be bad from an UX perspective, right?
from lovelace-mushroom.
We will not propose such slider (behind the text) in Mushroom because it's too different than other cards.
The design proposed by @brandensilva can be a great addition because it's composable with all type of controls (buttons, slider, etc...)
If you want a slider behind text, you can use this card : https://github.com/mattieha/slider-button-card#general
from lovelace-mushroom.
I like Branden's proposal as well as your from your first reply to this request. Something like that.
from lovelace-mushroom.
I agree that what Branden's proposed is more in line with the rest of Mushroom look. I would be happy with that :-)
from lovelace-mushroom.
Wouldn't it be possible to have the slider extend (begin) under the text? It would probably be bad from an UX perspective, right?
It's doable but not great code to write. Because each of these sections is separated as two different components or elements, they cannot easily mingle into each other like that without a bit of hackery. You could alter how it renders based on those options being selected but that's a lot of code for little benefit.
Or to put simply it's a solvable problem but the problem is it requires writing code that is less maintainable in the long run due to how the code is structured.
from lovelace-mushroom.
I agree, it wouldn't be pretty or very useful anyway as the slider would be very close to the tappable button.
from lovelace-mushroom.
@piitaya will give a first answer to this issue in 1.0.6 ;)
from lovelace-mushroom.
@bemble Cool. I think the big thing is the responsiveness if this were used in two columns. I really do think we should revert back to the flex-direction: column rather than flex-direction: row in those cases so actions re-flow below the text.
It also might make sense to make this clearer between what "vertical" is doing and what a horizontal layout mode does so it might require some renaming of some labels when editing the cards.
from lovelace-mushroom.
Clearly a good proposition ! :)
With collasped option who hide the sliders and controls when light is off, it will be perfect :)
from lovelace-mushroom.
That's oh so pretty! Thank you!
from lovelace-mushroom.
Wow really nice!!!!
Can't wait to try it :-).
Thanks
from lovelace-mushroom.
Perfect
from lovelace-mushroom.
Related Issues (20)
- [Feature]: Keep the keyboard collapsed and open when needed
- control flow temperature
- [Enhancement]: Update card - show version information under secondary_info HOT 1
- [Enhancement]: Update Card - Fallback to icon if entity_picture attribute doesn't exist
- [Bug]: Multipliable errors
- [Bug]: Extremly Slow and Stuck HOT 2
- [Feature]: Badge support in the template-chip
- [Bug]: Unresponsive light status control HOT 1
- [Feature]: Grabber/Handle style like home assistant
- [Bug]: 2024.3 Different card width on different devices HOT 2
- [Bug]: bigger size of mushroom card in sections type of dashboard HOT 6
- [Bug]: icons are not described in output
- [Bug]: BrowserMod action: fire-dom-event removed from editor
- [Feature]: Improve "Unavailable" status on lock card HOT 1
- [Feature] - Adding a card for lawn mower HOT 6
- [Bug]: climate with Netatmo not working HOT 6
- [Bug]: mushroom-select menu cut off
- [Bug]: after latest Update subtitle template code is not visible but exists
- [Feature]: Differentiate between the icon tap and the regular tap in the tile(light) card
- [Feature]: Media player icon toggles on/off, just like the climate card
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lovelace-mushroom.