some stylistic fixes

Orual 9cdd0379 ac5685d4

+53 -10
+20 -2
crates/weaver-app/assets/styling/record-view.css
··· 128 padding-top: 0.5rem; 129 } 130 131 .field-value { 132 font-family: var(--font-mono); 133 color: var(--color-text); 134 - font-size: 1rem; 135 padding-top: 0.2rem; 136 padding-bottom: 0.1rem; 137 word-break: break-word; ··· 198 max-width: 600px; 199 max-height: 400px; 200 margin-top: 0.5rem; 201 - border: 1px solid var(--color-border); 202 margin-bottom: 0.5rem; 203 } 204
··· 128 padding-top: 0.5rem; 129 } 130 131 + .path-prefix { 132 + color: var(--color-muted); 133 + opacity: 0.7; 134 + } 135 + 136 + .path-final { 137 + color: var(--color-text); 138 + font-weight: 500; 139 + } 140 + 141 + .array-len { 142 + font-family: var(--font-mono); 143 + color: var(--color-subtle); 144 + font-size: 0.9rem; 145 + font-weight: 400; 146 + padding-left: 0.125rem; 147 + padding-top: 0.5rem; 148 + } 149 + 150 .field-value { 151 font-family: var(--font-mono); 152 color: var(--color-text); 153 + font-size: 0.9rem; 154 padding-top: 0.2rem; 155 padding-bottom: 0.1rem; 156 word-break: break-word; ··· 217 max-width: 600px; 218 max-height: 400px; 219 margin-top: 0.5rem; 220 margin-bottom: 0.5rem; 221 } 222
+33 -8
crates/weaver-app/src/views/record.rs
··· 45 class: "record-view-container", 46 div { 47 class: "record-header", 48 - h1 { "Record Inspector" } 49 div { 50 class: "record-metadata", 51 div { class: "metadata-row", ··· 95 rsx! { 96 div { 97 class: "record-view-container", 98 - h1 { "Record Inspector" } 99 p { "URI: {uri}" } 100 p { "Loading..." } 101 } ··· 136 } 137 138 #[component] 139 fn DataView(data: Data<'static>, path: String, did: String) -> Element { 140 match &data { 141 Data::Null => rsx! { 142 div { class: "record-field", 143 - span { class: "field-label", "{path}" } 144 span { class: "field-value muted", "null" } 145 } 146 }, 147 Data::Boolean(b) => rsx! { 148 div { class: "record-field", 149 - span { class: "field-label", "{path}" } 150 span { class: "field-value", "{b}" } 151 } 152 }, 153 Data::Integer(i) => rsx! { 154 div { class: "record-field", 155 - span { class: "field-label", "{path}" } 156 span { class: "field-value", "{i}" } 157 } 158 }, ··· 176 177 rsx! { 178 div { class: "record-field", 179 - span { class: "field-label", "{path}" } 180 span { class: "field-value", 181 182 HighlightedString { string_type: s.clone() } ··· 196 }; 197 rsx! { 198 div { class: "record-field", 199 - span { class: "field-label", "{path}" } 200 pre { class: "field-value bytes", "{hex_string} [{byte_size}]" } 201 } 202 } ··· 209 }, 210 Data::Array(arr) => rsx! { 211 div { class: "record-section", 212 - div { class: "section-label", "{path}" span { class: "field-label", "[{arr.len()}] " } } 213 214 div { class: "section-content", 215 for (idx, item) in arr.iter().enumerate() {
··· 45 class: "record-view-container", 46 div { 47 class: "record-header", 48 + h1 { "Record" } 49 div { 50 class: "record-metadata", 51 div { class: "metadata-row", ··· 95 rsx! { 96 div { 97 class: "record-view-container", 98 + h1 { "Record" } 99 p { "URI: {uri}" } 100 p { "Loading..." } 101 } ··· 136 } 137 138 #[component] 139 + fn PathLabel(path: String) -> Element { 140 + if path.is_empty() { 141 + return rsx! {}; 142 + } 143 + 144 + // Find the last separator 145 + let last_sep = path.rfind(|c| c == '.'); 146 + 147 + if let Some(idx) = last_sep { 148 + let prefix = &path[..idx + 1]; 149 + let final_segment = &path[idx + 1..]; 150 + rsx! { 151 + span { class: "field-label", 152 + span { class: "path-prefix", "{prefix}" } 153 + span { class: "path-final", "{final_segment}" } 154 + } 155 + } 156 + } else { 157 + rsx! { 158 + span { class: "field-label","{path}" } 159 + } 160 + } 161 + } 162 + 163 + #[component] 164 fn DataView(data: Data<'static>, path: String, did: String) -> Element { 165 match &data { 166 Data::Null => rsx! { 167 div { class: "record-field", 168 + PathLabel { path: path.clone() } 169 span { class: "field-value muted", "null" } 170 } 171 }, 172 Data::Boolean(b) => rsx! { 173 div { class: "record-field", 174 + PathLabel { path: path.clone() } 175 span { class: "field-value", "{b}" } 176 } 177 }, 178 Data::Integer(i) => rsx! { 179 div { class: "record-field", 180 + PathLabel { path: path.clone() } 181 span { class: "field-value", "{i}" } 182 } 183 }, ··· 201 202 rsx! { 203 div { class: "record-field", 204 + PathLabel { path: path.clone() } 205 span { class: "field-value", 206 207 HighlightedString { string_type: s.clone() } ··· 221 }; 222 rsx! { 223 div { class: "record-field", 224 + PathLabel { path: path.clone() } 225 pre { class: "field-value bytes", "{hex_string} [{byte_size}]" } 226 } 227 } ··· 234 }, 235 Data::Array(arr) => rsx! { 236 div { class: "record-section", 237 + div { class: "section-label", "{path}" span { class: "array-len", "[{arr.len()}] " } } 238 239 div { class: "section-content", 240 for (idx, item) in arr.iter().enumerate() {