Jean-Tinland / simple-bar

A yabai status bar widget for Übersicht
https://www.jeantinland.com/toolbox/simple-bar
MIT License
1.21k stars 129 forks source link

Hide widgets container when none are enabled #381

Closed Gelio closed 10 months ago

Gelio commented 11 months ago

Description

Problem: When no widgets are enabled, there is still a small rectangle in the bottom right of the screen. The container itself is not hidden even when all widgets are disabled. It looks out of place.

Solution: Hide the container when all widgets are disabled.

Type of change

How Has This Been Tested?

Test Configuration:

Checklist:

Changes to make to the documentation

None.

Jean-Tinland commented 10 months ago

Thanks, It was indeed an oversight :)

I made a change to your PR as it seems that this could be handled with CSS only thanks to that fact that you moved the settings outside the .simple-bar__data div. That :empty pseudo-selector is really handful.

By the way you are right there was no style guidelines anywhere so I added some basic guidelines here: https://github.com/Jean-Tinland/simple-bar/blob/master/CONTRIBUTING.md#coding-style-conventions

Edit: typo

Gelio commented 10 months ago

Thanks for taking care of this PR! I appreciate it 😄

It didn't occur to me to use the :empty psuedo-selector. Nice solution 👍