-
Notifications
You must be signed in to change notification settings - Fork 597
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
Implement conditional container #3648
base: master
Are you sure you want to change the base?
Conversation
This container allows showing or hiding a child widget based on a boolean state property.
Codecov Report
@@ Coverage Diff @@
## master #3648 +/- ##
==========================================
+ Coverage 90.65% 90.67% +0.02%
==========================================
Files 854 857 +3
Lines 54772 54884 +112
==========================================
+ Hits 49651 49766 +115
+ Misses 5121 5118 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
what the difference between setting |
(i reopened to unstuck ci) |
Thanks for this. I gave this a shot a few years ago in #2244 . Then a couple years later tried to convince people a more QML-like approach was the way forward in #3217 . I still think this is generally the way forward, but it will require me (or someone) to find the time to refactor That being said, we already have |
The same difference as setting And as outlined in #3531, the handling of Because of that, I'm also not entirely comfortable naming it
After a quick skim, it seems to be doing the same thing as this one, so I don't see anything that would prevent that refactor. |
ok, i see. now since it makes sense to discuss it further - i see the major difference between your PR and Elv's previous approaches: |
What's still needed here? As far as I can tell:
|
Both IMHO, my version is complex and hard to merge. Your version is simple and fix a real problem. Other question:
|
Fine with me.
I don't think so. I don't see any major use case where it would be worth having both functionalities in one widget. And, as you said, currently this container is quite simple to use. If they were merged, you'd need to bring the entire templating logic, unused, when you only wanted the simple |
This container allows showing or hiding a child widget based on a boolean property.
I'm not quite sure about the names here.
wibox.container.if
and a property.condition
could work as well.