bc174915272f22a34cc3dc9824d0adda9ac6f5ab
When using the latest version of `GPUI`, I found some grid layout issues. I discovered #43555 modified the default behavior of grid template columns. I checked the implementation at https://tailwindcss.com/docs/grid-template-columns, and it seems our previous implementation was correct. If a grid layout is placed inside a flexbox, the layout becomes unpredictable. ```rust impl Render for HelloWorld { fn render(&mut self, _window: &mut Window, _cx: &mut Context<Self>) -> impl IntoElement { div() .flex() .size(px(500.0)) .bg(rgb(0x505050)) .text_xl() .text_color(rgb(0xffffff)) .child( div() .size_full() .gap_1() .grid() .grid_cols(2) .border_1() .border_color(gpui::red()) .children((0..10).map(|ix| { div() .w_full() .border_1() .border_color(gpui::green()) .child(ix.to_string()) })), ) } } ``` | Before | After | | - | - | | <img width="612" height="644" alt="After1" src="https://github.com/user-attachments/assets/64eaf949-0f38-4f0b-aae7-6637f8f40038" /> | <img width="612" height="644" alt="Before1" src="https://github.com/user-attachments/assets/561a508d-29ea-4fd2-bd1e-909ad14b9ee3" /> | I also placed the grid layout example inside a flexbox too. | Before | After | | - | - | | <img width="612" height="644" alt="After" src="https://github.com/user-attachments/assets/fa6f4a2d-21d8-413e-8b66-7bd073e05f87" /> | <img width="612" height="644" alt="Before" src="https://github.com/user-attachments/assets/9e0783d1-18e9-470d-b913-0dbe4ba88835" /> | I tested the changes from the previous PR, and it seems that setting the table's parent to `v_flex` is sufficient to achieve a non-full table width without modifying the grid layout. This was already done in the previous PR. I reverted the grid changes, the blue border represents the table width. cc @RemcoSmitsDev <img width="1107" height="1000" alt="table" src="https://github.com/user-attachments/assets/4b7ba2a2-a66a-444d-ad42-d80bc9057cce" /> So, I believe we should revert to this implementation to align with tailwindcss behavior and avoid potential future problems, especially since the cause of this issue is difficult to pinpoint. Release Notes: - N/A
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
GPUI – Community Edition maintained by Oak Team
https://gpui-ce.github.io/
258 MiB
Languages
Rust
95.6%
WGSL
1.2%
Metal
1.1%
HLSL
1.1%
Python
0.6%
Other
0.3%