feat: constrain flex bases and redistribute bounded growth and shrink
Verify Tessera GUI / verify (push) Failing after 9m4s

This commit is contained in:
2026-10-23 00:42:48 +08:00
parent 78fb66277d
commit 1fda07ebc5
12 changed files with 298 additions and 55 deletions
+7 -1
View File
@@ -61,6 +61,7 @@ pub const QUERY_NAMES: &[&str] = &[
#[derive(Debug, Clone, PartialEq)]
pub struct UiNode {
pub flex: f32,
pub flex_policy: crate::layout::FlexPolicy,
pub main_align: crate::layout::MainAlign,
pub block_id: String,
pub protocol_key: String,
@@ -80,8 +81,13 @@ impl UiNode {
}
}
pub fn has_flex(&self) -> bool {
self.flex > 0.0 || self.flex_policy != crate::layout::FlexPolicy::default()
}
pub fn shallow_eq(&self, other: &Self) -> bool {
if self.flex != other.flex
if self.flex_policy != other.flex_policy
|| self.flex != other.flex
|| self.main_align != other.main_align
|| self.block_id != other.block_id
|| self.protocol_key != other.protocol_key