-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Tracking Issue: UI Density #18078
Comments
Tracking issue: #18078 Improve UI Density support for List. UI density is an unstable feature. You can read more about it in the above issue! | Before Normal - Before Dense - After Normal - After Dense | |--------------------------------------------------------| | ![Group 8](https://github.com/user-attachments/assets/bb896fcf-e4a6-4776-9308-1405906d2dbe) | | | | | Before Normal - Before Dense - After Normal - After Dense | |--------------------------------------------------------| | ![Group 9](https://github.com/user-attachments/assets/00815a1b-071b-4d02-96bc-36bf37b5ae8b) | Release Notes: - N/A
@iamnbutler I love how it works in nightly but I did notice that neither compact or comfortable match the current which sits between the two, would it make sense to have an in-between setting that matches the current UI spacing ComfortableUnset/Current DefaultCompact |
@versecafe Hey, thanks for trying this! Help me understand your feedback – The default/unset setting is "default", which you can activate using |
@iamnbutler just a quick round of personal feedback. I've tried out all of the options and eventually went back to Great work on Zed's design and build so far! My favorite product/app at the moment ❤️ |
@iamnbutler default actually works perfectly, when I was first testing this the only options that would register and pop up were compact and comfortable, but that was on the nightly build weeks ago, so no issue on my end anymore! |
Great! Thanks. Appreciate the kind words :) |
Tracking issue: zed-industries#18078 Improve UI Density support for List. UI density is an unstable feature. You can read more about it in the above issue! | Before Normal - Before Dense - After Normal - After Dense | |--------------------------------------------------------| | ![Group 8](https://github.com/user-attachments/assets/bb896fcf-e4a6-4776-9308-1405906d2dbe) | | | | | Before Normal - Before Dense - After Normal - After Dense | |--------------------------------------------------------| | ![Group 9](https://github.com/user-attachments/assets/00815a1b-071b-4d02-96bc-36bf37b5ae8b) | Release Notes: - N/A
Density tracking issue: #18078 This PR refactors our spacing system to use a more flexible and maintainable approach. We've replaced the static `Spacing` enum with a dynamically generated `DynamicSpacing` enum using a proc macro. Enum variants now use a `BaseXX` format, where XX = the pixel value @ default rem size and the default UI density. For example: `CustomSpacing::Base16` would return 16px at the default UI scale & density. I'd love to find another name other than `Base` that is clear (to avoid base_10, etc confusion), let me know if you have any ideas! Changes: - Introduced a new `derive_dynamic_spacing` proc macro to generate the `DynamicSpacing` enum - Updated all usages of `Spacing` to use the new `DynamicSpacing` - Removed the `custom_spacing` function, mapping previous usages to appropriate `DynamicSpacing` variants - Improved documentation and type safety for spacing values New usage example: ```rust .child( div() .flex() .flex_none() .m(DynamicSpacing::Base04.px(cx)) .size(DynamicSpacing::Base16.rems(cx)) .children(icon), ) ``` vs old usage example: ``` .child( div() .flex() .flex_none() .m(Spacing::Small.px(cx)) .size(custom_spacing(px(16.))) .children(icon), ) ``` Release Notes: - N/A
Tracking issue: #18078 Release Notes: - Change tab bar height according to `ui-density` --------- Signed-off-by: Aaron Ruan <[email protected]>
Note: #19076 is merged and made some improvements on this front. |
I've been hacking away on customizable UI density for Zed on the side for a while now – I wanted to open up a tracking issue to help get the feature over the line, and would love to hear from anyone that has discovered it so far!
It's considered an
unstable
feature as it is not complete (many UI elements do not support density yet), however it is still usable today via the"unstable.ui_density"
setting.TODO:
What to expect
For the moment, the development focus for density is to make the UI optionally more dense. However, there is a
"comfortable"
setting for folks that want to try a little less density.Try it
If you would like to give it a try you can add the following to your settings:
High Density
Low Density
Useful feedback
Contributing
You can help bring dynamic density to places it is missing by opening a PR. Please link to this issue and mention me so we can keep track of all the contributions coming in.
There are two main ways to dynamically adjust spacing, both shown in this example:
Typically converting a statically spaced element to one that responds to density means taking spacing that is static and converting it to dynamic.
However, not all spacing should be dynamic. Consider what the spacing controls, and test if it makes sense for it to change with density.
The text was updated successfully, but these errors were encountered: