-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
For large Layout: Calculate height with row height,size and gap #965
base: main
Are you sure you want to change the base?
Conversation
Hi! I'm so glad that you made you first PR! 😄 I just have some suggestions, because it was something I wanted to do already, it would be great if the icon/name/state stay fixed at the top, and the sub-buttons fixed at the bottom. This would better to enjoy the additional space that this offer. What do you think? And don't hesitate if you have any suggestions 🙂 |
• Stick Subbuttons to bottom en wrap them arround
That's amazing! Thanks a lot! 😀 |
Hi again! I should be able to try that tomorrow, can't wait! |
Not ready yet. Will have some more work. So no need to try for now. |
Ok good to know, tell me when I will be able to try it 🙂 And thanks again! |
You'll notice some extra commented code for the sub-buttons. I always worked with the following grid:
When there was only 1 row
when there were multiple rows but this was very unrelliable. |
How should it resolve such a thing? |
I guess you're right, I'm probably overthinking. This will be a major new possibility for Bubble Card, I will try it when I got some time. |
This layout was made to support the new section view without making a too big breaking change, but the more I think of it and the more I think we should remove the original layout, it was a bit too compact anyway and the new large layout is way better, even on the other view layouts. What do you think? |
I would keep the original layout in, but make the "large" the default one. |
I still think we should remove it, to avoid confusion, misalignment, and for a better consistency, also this way if we add new |
Then it will need further adjustment because, when the card is not in a section view it does not work. |
It does work outside of a section view, I mean all the large layouts does, what do you mean? |
I solved It already so no problem anymore. |
Ah nice, good that you have eye for detail. The only thing I don't agree with, is that all buttons should be at the bottom. |
I disagree, because the main use case for this is to have the possibility to display two or more cards on a same line, this way it will be possible to display two media players/climate cards next to each other on mobile. To me there is no sense to only display the sub-buttons below, because default buttons looks exactly the same for the end user. |
I will try to test that today! 😀 For your example that's perfect, but the more empty line should be below (the one with only one sub-button). Thanks again! Edit: I don't have enough time today after all, I will wait for your next adjustments instead 🙂 |
Alternative layout is possible for media-player and climate card. |
4 problems I've see already
|
• Solve Centring when no sub-buttons are involved • Add width properties for alternative design that are calculated • Remove hidden overflow so select sub-buttons work.
Should be all good now... |
Nice progress! I haven't tried it yet but I see on your screenshots that the sub-buttons are not perfectly centered when they are below, the margin on the left is shorter than the one on the right. Edit: And indeed I should rework the cover card to give it a similar structure to the other cards, without this done I will hold this PR. If it's all good, this new feature will be for the next major beta release (v2.4.0). Edit 2: Totally unrelated but I managed to use your conditional logic for the pop-up triggers (and this works perfectly ❤️), I prefer to say it to make sure you don't work on that 🙂 |
Nice! I will have some time today to try this, I'll let you now my feedback. I will also try to fix the remaining important issues for v2.3.1. |
That's nicer indeed when the card is taking the full column width, but I'm glad you added the possibility to put these below for the shorter column cases. Looks great, thank you again! |
For people that want to test: bubble-card.zip To use unzip file above and follow the "without HACS"-method. PLEASE do not make new issues about this PR If you find problems, (and they are not present on the main branch) please report them in this thread. Features: |
Hey @Clooos here my first pull request.
Haven't gone through all the code yet but this is a start.