From 167ce234bc9e298bde4c0a2513865296029b6651 Mon Sep 17 00:00:00 2001 From: Denis Gomes <6731020+denisg0mes@users.noreply.github.com> Date: Wed, 18 Nov 2026 18:39:13 -0500 Subject: [PATCH] M3: Library styles show in the style pickers without the Assets tab, with a source menu Enabled libraries were read from disk only by the Assets panel (refresh_libraries ran from its show). After a file with enabled libraries was opened, the Design panel's style pickers found none in the cache, and a library's text styles weren't offered ("No text styles yet") until the Assets tab had been opened once. refresh_libraries now runs from the app's background tick, whichever tab shows, and reads a local library not read yet at once instead of waiting out the 2 s throttle. A library the read refuses (too large, or not on this computer) is never cached, so the tick remembers the paths it last tried and tries those again only after the throttle; otherwise it would read again every frame. The periodic repaint that picks up a library changed on disk stays with the Assets panel, so an idle window isn't woken every 2 s; the panel's doc comment now describes that repaint. The style picker gets Figma's source menu under the search field when the file has enabled libraries: All libraries (the default, the list as before), This file, or one library, kept while the picker is open. A library that goes away falls back to All libraries. --- crates/ui-egui/locales/en.toml | 1 + crates/ui-egui/locales/ru.toml | 1 + crates/ui-egui/src/app/commands.rs | 1 + crates/ui-egui/src/panels/assets_panel.rs | 40 +++++++---- crates/ui-egui/src/widgets/style_picker.rs | 68 +++++++++++++++++-- .../ui-egui/src/widgets/style_picker/tests.rs | 68 +++++++++++++++++++ docs/components-parity.md | 3 +- 7 files changed, 162 insertions(+), 20 deletions(-) diff --git a/crates/ui-egui/locales/en.toml b/crates/ui-egui/locales/en.toml index e42a1c21c..c03f7ad65 100644 --- a/crates/ui-egui/locales/en.toml +++ b/crates/ui-egui/locales/en.toml @@ -102,6 +102,7 @@ name = "English" "All comments" = "All comments" "All components" = "All components" "All fonts" = "All fonts" +"All libraries" = "All libraries" "All objects" = "All objects" "All supported properties" = "All supported properties" "All the fonts this file uses are installed" = "All the fonts this file uses are installed" diff --git a/crates/ui-egui/locales/ru.toml b/crates/ui-egui/locales/ru.toml index bc7aa6353..f74c0c02a 100644 --- a/crates/ui-egui/locales/ru.toml +++ b/crates/ui-egui/locales/ru.toml @@ -99,6 +99,7 @@ name = "Русский" "All comments" = "Все комментарии" "All components" = "Все компоненты" "All fonts" = "Все шрифты" +"All libraries" = "Все библиотеки" "All objects" = "Все объекты" "All supported properties" = "Все поддерживаемые свойства" "All the fonts this file uses are installed" = "Все шрифты, которые использует этот файл, установлены" diff --git a/crates/ui-egui/src/app/commands.rs b/crates/ui-egui/src/app/commands.rs index e36471b42..e3251fcdd 100644 --- a/crates/ui-egui/src/app/commands.rs +++ b/crates/ui-egui/src/app/commands.rs @@ -321,6 +321,7 @@ impl FigApp { self.autosave_tick(ctx, now); self.auto_save_tick(ctx, now); updates_ui::tick(self, ctx); + crate::assets_panel::refresh_libraries(self, ctx); self.logic_ticked = true; } } diff --git a/crates/ui-egui/src/panels/assets_panel.rs b/crates/ui-egui/src/panels/assets_panel.rs index 9ee6c0dfe..a5f3773bc 100644 --- a/crates/ui-egui/src/panels/assets_panel.rs +++ b/crates/ui-egui/src/panels/assets_panel.rs @@ -37,9 +37,9 @@ const MAX_THUMBS: usize = 600; const THUMBS_PER_FRAME: usize = 8; /// Layers compared per component when checking whether its thumbnail is stale. const MAX_COMPARED: usize = 20_000; -/// Look for changed library files this often (seconds) while the panel shows. +/// Look for changed library files this often (seconds). const LIBRARY_REFRESH: f64 = 2.0; -/// Ask team libraries' servers for newer versions this often (seconds) while the panel shows. +/// Ask team libraries' servers for newer versions this often (seconds). // shortcut: polled (a few bytes when nothing changed); a server push needs a connection per // library, worth it once libraries are used beyond the Assets panel. const SERVER_REFRESH: f64 = 30.0; @@ -278,33 +278,42 @@ fn build_listing(app: &FigApp, doc: &Document, q: &str, key: (u64, String, u64)) Listing { key, local: foldered("", local), local_styles, libraries, updates } } -/// Re-read enabled library files that changed on disk (throttled). -fn refresh_libraries(app: &mut FigApp, ui: &Ui) { +/// Re-read enabled library files that changed on disk (throttled), every logic tick whether or not +/// the Assets panel shows, so the style pickers list library styles too. A library this file +/// hasn't tried to read yet (just opened or added) is read at once. +pub(crate) fn refresh_libraries(app: &mut FigApp, ctx: &egui::Context) { let Ok(doc) = app.session.doc() else { return }; if doc.libraries.enabled.is_empty() { return; } let paths: Vec = doc.libraries.enabled.iter().map(|l| l.path.clone()).collect(); let id = Id::unique("asset_libraries_checked"); - let now = ui.input(|i| i.time); - let last: Option = ui.data(|d| d.get_temp(id)); - if last.is_none_or(|l| now - l >= LIBRARY_REFRESH) { + // The paths the last read tried: one that was refused (too large, not on this computer) is + // never cached, and would otherwise be tried again every frame. + let tried_id = Id::unique("asset_libraries_tried"); + let now = ctx.input(|i| i.time); + let last: Option = ctx.data(|d| d.get_temp(id)); + let tried: Vec = ctx.data(|d| d.get_temp(tried_id)).unwrap_or_default(); + let unread_here = paths.iter().any(|p| !is_server_link(p) && app.session.libraries.cached(p).is_none() && !tried.contains(p)); + if unread_here || last.is_none_or(|l| now - l >= LIBRARY_REFRESH) { for p in &paths { let _ = app.session.libraries.load(p); } - ui.data_mut(|d| d.insert_temp(id, now)); + ctx.data_mut(|d| { + d.insert_temp(id, now); + d.insert_temp(tried_id, paths.clone()); + }); // Team libraries: in the background, at once for one not fetched yet. let sid = Id::unique("asset_server_libraries_checked"); - let fetched: Option = ui.data(|d| d.get_temp(sid)); + let fetched: Option = ctx.data(|d| d.get_temp(sid)); // Only the ones you added or checked: a file can't make the app contact a server (#1097). let team: Vec<&String> = paths.iter().filter(|p| is_server_link(p) && app.session.library_allowed(p)).collect(); let unread = team.iter().any(|p| app.session.libraries.cached(p).is_none()); if !team.is_empty() && (unread || fetched.is_none_or(|l| now - l >= SERVER_REFRESH)) { app.session.refresh_server_libraries(); - ui.data_mut(|d| d.insert_temp(sid, now)); + ctx.data_mut(|d| d.insert_temp(sid, now)); } } - ui.ctx().request_repaint_after(std::time::Duration::from_secs_f64(LIBRARY_REFRESH)); } /// The search field with the libraries button; returns the lowercase query. @@ -577,12 +586,15 @@ fn render_thumbs(ui: &Ui, w: f32, thumbs: &mut Thumbs, wanted: &[(Source, NodeId } } -/// Draw the Assets panel: refresh libraries, switch to the libraries view when asked, -/// otherwise cache a listing keyed by revision, query and library state, render local and +/// Draw the Assets panel: repaint every `LIBRARY_REFRESH` while the file has libraries (so a +/// library changed on disk shows; the app's tick reads it), switch to the libraries view when +/// asked, otherwise cache a listing keyed by revision, query and library state, render local and /// enabled-library assets with reused thumbnails, and dispatch place, style, hide, toggle /// and drag actions. pub fn show(app: &mut FigApp, ui: &mut Ui) { - refresh_libraries(app, ui); + if app.session.doc().is_ok_and(|d| !d.libraries.enabled.is_empty()) { + ui.ctx().request_repaint_after(std::time::Duration::from_secs_f64(LIBRARY_REFRESH)); + } if app.ui.libraries { libraries_view(app, ui); return; diff --git a/crates/ui-egui/src/widgets/style_picker.rs b/crates/ui-egui/src/widgets/style_picker.rs index ca063abad..fb369fbca 100644 --- a/crates/ui-egui/src/widgets/style_picker.rs +++ b/crates/ui-egui/src/widgets/style_picker.rs @@ -160,6 +160,30 @@ pub struct Picker { y: f32, query: String, edit: Option, + /// Whose styles the list shows (the source menu over the list). + source: Source, +} + +/// The source menu's choice: every source, this file's styles, or one enabled library's (by +/// manifest id). +#[derive(Clone, Debug, Default, PartialEq)] +enum Source { + #[default] + All, + ThisFile, + Library(String), +} + +impl Source { + /// Whether the styles of `lib` (`None`: this file) are listed. + fn shows(&self, lib: Option<&PublishedLibrary>) -> bool { + match (self, lib) { + (Source::All, _) => true, + (Source::ThisFile, None) => true, + (Source::Library(id), Some(l)) => l.manifest.id == *id, + _ => false, + } + } } impl Picker { @@ -174,7 +198,7 @@ pub fn open(app: &mut FigApp, ui: &Ui, ids: &[NodeId], slot: StyleSlot) { // Opening the style picker closes the colour picker (it would linger beside it). crate::colorpicker::close(app); app.ui.style_picker_popover = None; - app.ui.style_picker = Some(Picker { slot, ids: ids.to_vec(), y, query: String::new(), edit: None }); + app.ui.style_picker = Some(Picker { slot, ids: ids.to_vec(), y, query: String::new(), edit: None, source: Source::All }); } /// Open the picker for `slot` of the selection (the control channel), optionally editing `style`. @@ -183,7 +207,7 @@ pub fn open_for_selection(app: &mut FigApp, slot: StyleSlot, style: Option<&str> let edit = style.and_then(|s| app.session.doc().ok()?.style(s).map(editing)); crate::colorpicker::close(app); app.ui.style_picker_popover = None; - app.ui.style_picker = Some(Picker { slot, ids, y: 140.0, query: String::new(), edit }); + app.ui.style_picker = Some(Picker { slot, ids, y: 140.0, query: String::new(), edit, source: Source::All }); } fn editing(s: &Style) -> Editing { @@ -522,6 +546,28 @@ fn offered<'a>(doc: &'a Document, lib: Option<&'a PublishedLibrary>, slot: Style } } +/// The source menu over the style list (shown when the file has libraries): All libraries, This +/// file, then each library by name, the chosen one ticked. +fn source_menu(ui: &mut Ui, libs: &[std::sync::Arc], source: &mut Source) { + let label = match source { + Source::All => tr("All libraries").to_string(), + Source::ThisFile => tr("This file").to_string(), + Source::Library(id) => libs.iter().find(|l| l.manifest.id == *id).map(|l| l.manifest.name.clone()).unwrap_or_default(), + }; + let resp = widgets::dropdown(ui, &label, W, None); + crate::right::menu_popup(&resp).width(W).show(|ui| { + let mut choices = vec![(Source::All, tr("All libraries").to_string()), (Source::ThisFile, tr("This file").to_string())]; + choices.extend(libs.iter().map(|l| (Source::Library(l.manifest.id.clone()), l.manifest.name.clone()))); + for (choice, name) in choices { + let mark = if *source == choice { "✓ " } else { " " }; + if crate::right::menu_item(ui, &format!("{mark}{name}"), "") { + *source = choice; + ui.close(); + } + } + }); +} + /// The style list: header, search, this file's and the libraries' styles by folder, and (colour /// slots) colour variables. fn listing(app: &FigApp, ui: &mut Ui, doc: &Document, p: &mut Picker, out: &mut Frame) { @@ -560,8 +606,20 @@ fn listing(app: &FigApp, ui: &mut Ui, doc: &Document, p: &mut Picker, out: &mut ui.add_space(4.0); let q = p.query.trim().to_lowercase(); let libs = crate::variable_ui::libraries(app, doc); - let mut sources: Vec<(Option<&PublishedLibrary>, Vec<&Style>)> = vec![(None, offered(doc, None, slot, &q))]; - for l in &libs { + if !libs.is_empty() { + source_menu(ui, &libs, &mut p.source); + ui.add_space(4.0); + } + if let Source::Library(id) = &p.source + && !libs.iter().any(|l| l.manifest.id == *id) + { + p.source = Source::All; + } + let mut sources: Vec<(Option<&PublishedLibrary>, Vec<&Style>)> = Vec::new(); + if p.source.shows(None) { + sources.push((None, offered(doc, None, slot, &q))); + } + for l in libs.iter().filter(|l| p.source.shows(Some(l))) { let list = offered(doc, Some(l), slot, &q); if !list.is_empty() { sources.push((Some(l.as_ref()), list)); @@ -1246,7 +1304,7 @@ fn edit_local(app: &mut FigApp, ui: &Ui, slot: StyleSlot, id: &str) { let edit = app.session.doc().ok().and_then(|d| d.style(id).map(editing)); crate::colorpicker::close(app); app.ui.style_picker_popover = None; - app.ui.style_picker = Some(Picker { slot, ids: app.session.selection(), y, query: String::new(), edit }); + app.ui.style_picker = Some(Picker { slot, ids: app.session.selection(), y, query: String::new(), edit, source: Source::All }); } /// `style.move` for the shown style `from` dropped at shown position `to` (`shown` in display diff --git a/crates/ui-egui/src/widgets/style_picker/tests.rs b/crates/ui-egui/src/widgets/style_picker/tests.rs index 08c27f12d..e837d3fa6 100644 --- a/crates/ui-egui/src/widgets/style_picker/tests.rs +++ b/crates/ui-egui/src/widgets/style_picker/tests.rs @@ -572,3 +572,71 @@ fn style_picker_icon_buttons_paint_16pt() { assert!(paints_icon_at_button_size(&painted, icon), "{icon:?} is not 16 pt"); } } + +#[test] +fn a_reopened_files_text_styles_picker_lists_its_librarys_styles_without_the_assets_tab() { + let dir = std::env::temp_dir().join(format!("figcraft-picker-library-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir(&dir).unwrap(); + let (library, file) = (dir.join("ds.figcraft"), dir.join("site.figcraft")); + let mut publisher = Session::new(); + publisher.execute("style.create", &json!({"type": "text", "name": "Display", "value": {"fontFamily": "Inter", "fontSize": 48}})).unwrap(); + publisher.execute("library.publish", &json!({})).unwrap(); + publisher.execute("file.saveAs", &json!({"path": library})).unwrap(); + let mut site = Session::new(); + site.execute("text.create", &json!({"text": "Hello", "x": 0, "y": 0})).unwrap(); + site.execute("style.create", &json!({"type": "text", "name": "Body", "value": {"fontFamily": "Inter", "fontSize": 14}})).unwrap(); + site.execute("library.add", &json!({"path": library})).unwrap(); + site.execute("file.saveAs", &json!({"path": file})).unwrap(); + + let mut reopened = Session::new(); + reopened.execute("file.open", &json!({"path": file})).unwrap(); + let text = reopened.doc().unwrap().nodes().find(|n| matches!(n.kind, figcraft_doc::NodeKind::Text(_))).unwrap().id; + reopened.execute("select.set", &json!({"ids": [text]})).unwrap(); + let mut u = crate::layers_drag_tests::Ui::new(reopened); + open_for_selection(&mut u.app, StyleSlot::Text, None); + for _ in 0..3 { + u.frame(vec![]); + } + let texts = drawn_texts(&mut u); + let _ = std::fs::remove_dir_all(&dir); + let (display, body) = ("48/Auto", "14/Auto"); + let shows = |texts: &[(String, Pos2)], s: &str| texts.iter().any(|(t, _)| t == s); + assert!(shows(&texts, display) && shows(&texts, body), "every source by default: {:?}", texts.iter().map(|t| &t.0).collect::>()); + + let choose = |u: &mut crate::layers_drag_tests::Ui, from: &str, to: &str| { + let at = text_at(&drawn_texts(u), from); + u.button(at, true); + u.button(at, false); + let texts = drawn_texts(u); + let item = texts.iter().rev().find(|(t, _)| t.trim_start_matches(['✓', ' ']) == to).unwrap_or_else(|| panic!("{to} in the menu")).1; + u.button(item, true); + u.button(item, false); + drawn_texts(u) + }; + let texts = choose(&mut u, "All libraries", "This file"); + assert!(shows(&texts, body) && !shows(&texts, display), "This file: its own styles only"); + let texts = choose(&mut u, "This file", "Untitled"); + assert!(shows(&texts, display) && !shows(&texts, body), "a library: its styles only"); + assert!(u.app.ui.style_picker.is_some(), "choosing a source keeps the picker open"); +} + +#[test] +fn a_library_that_cant_be_read_is_tried_again_only_after_the_refresh_interval() { + let mut s = Session::new(); + s.doc_mut().unwrap().libraries_mut().enabled.push(figcraft_doc::LibraryLink { + id: "elsewhere".into(), + name: "Elsewhere".into(), + path: "file://server/share/ds.figcraft".into(), + relative: String::new(), + version: 0, + }); + let mut u = crate::layers_drag_tests::Ui::new(s); + let checked = |u: &crate::layers_drag_tests::Ui| u.ctx.data(|d| d.get_temp::(Id::unique("asset_libraries_checked"))); + u.frame(vec![]); + let first = checked(&u).expect("the first frame tries the library"); + for _ in 0..10 { + u.frame(vec![]); + } + assert_eq!(checked(&u), Some(first), "a refused library doesn't make every frame read again"); +} diff --git a/docs/components-parity.md b/docs/components-parity.md index fa4d2494e..02b0ca441 100644 --- a/docs/components-parity.md +++ b/docs/components-parity.md @@ -1,6 +1,6 @@ # Components, variants, styles and variables parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (a style of one library that reaches a file through another library's component is, in a file linking both, the first library's own bound copy, so its modes colour it (#2414); with a variant selected, its property dropdowns show its own values and choosing one renames only that variant, instead of setting the set's default and moving the variants (#2349); library analytics count insertions and detachments of styles and variables; combining components gives every variant the properties any of them had; renaming a variable group to a path with `/` nests it under a parent group instead of turning the slash into a hyphen (#2353); a group's context menu in the Local variables window has Duplicate group, a copy named after it plus " 2" holding a copy of every variable, in one undo step (#2084); pages take a variable mode: with nothing selected the Design panel's Page section shows a Variable modes section, Auto or a mode of each collection that has more than one, as the help center says ("Apply variable mode" in the Page section of the right sidebar) (#2215); a text style binds a number variable to its weight (#2174); an instance lists only the properties its variant's layers use and long property names are cut to one line (#2022); with several layers selected the Design panel header's component button offers Create multiple components (#2088); the Local variables window selects several variables (click, Shift+click for a range, Cmd/Ctrl+click to toggle, Escape to clear) and delete, move to a group and scope act on the selected local variables in one undo step (#2002); text styles carry paragraph spacing and indent, the list style and the OpenType features, as the Supported in text styles table of Create and apply text styles says (#1829); a layer's effect binding takes only a field its effect has; Go to main component on an instance of a library component opens the library file in a tab and selects the main there; glass effects take variables; Delete on a layer inside an instance hides it as an override instead of being refused, as the help center says: "Figma will only toggle the layer's visibility instead of removing it"; library analytics list how many layers and files use each style and variable; SwiftUI and Compose code names a bound variable by its iOS or Android code syntax; library analytics count insertions and show insertions and detachments over the past 30 days, 90 days or year; a collection of this file can be extended (Extend collection on its row, `variable.extendCollection`), its extension following its edits at once, and extended collections extend again in the file; a typed or stored variable, collection or mode id names only the object with that id (#1613); colour variables can be calculated from other colours per mode — `{alpha}` replaces a colour's alpha, `{mix}` blends two — and follow them (#1280); stored variable and collection references keep their identity when another object is named like their id (follow-up to #1542); a component set's property rows fit the 240 px right panel: variant values wrap two to a line there and every + and − stays in view; opening a file contacts no team library server it names until you check it (#1097); an explicit variables file path (`variable.import`, the `variables` of `file.open` and `file.import`) is refused past 256 MiB or when it isn't a regular file, as the sibling `variables.json` already was (part of #1114); component properties keep the order they were made in when one is renamed, and Make slot asks for the slot's name first (#1536, #1537); components can't contain their own instances, directly or through others (#1084); the instance-swap menus have a search field (#1338); an instance-swap property's default menu scrolls (#1338); variables on a text style's fields from the style editor; instance-swap properties in the component playground; duplicating or Alt-dragging a main component makes an instance of it (#892); a bound colour variable's alpha applies once (#802); variables import reads `variables` outside `meta` and warns when it imports none (#790); variant properties reorder by drag; library files saved right after a read are read again; Hide when publishing note corrected; size and resizing overrides of layers inside instances (#731); variables export in the browser as a download; core editor leftovers: component playground, variables inside styles; layers and assets panels behaviour suite and fixes; extended collections tail; styles and variables behaviour suite and fixes; components behaviour suite and fixes; team libraries on the server, library usage and swapping a library; extended collections, variables import/export, gradient stops and variant properties bound to variables) · **Target:** Figma Design (desktop app 126.10.7) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (an enabled library's styles are offered in the style pickers without opening the Assets tab first, and the picker filters its list by source (All libraries, This file, one library); a style of one library that reaches a file through another library's component is, in a file linking both, the first library's own bound copy, so its modes colour it (#2414); with a variant selected, its property dropdowns show its own values and choosing one renames only that variant, instead of setting the set's default and moving the variants (#2349); library analytics count insertions and detachments of styles and variables; combining components gives every variant the properties any of them had; renaming a variable group to a path with `/` nests it under a parent group instead of turning the slash into a hyphen (#2353); a group's context menu in the Local variables window has Duplicate group, a copy named after it plus " 2" holding a copy of every variable, in one undo step (#2084); pages take a variable mode: with nothing selected the Design panel's Page section shows a Variable modes section, Auto or a mode of each collection that has more than one, as the help center says ("Apply variable mode" in the Page section of the right sidebar) (#2215); a text style binds a number variable to its weight (#2174); an instance lists only the properties its variant's layers use and long property names are cut to one line (#2022); with several layers selected the Design panel header's component button offers Create multiple components (#2088); the Local variables window selects several variables (click, Shift+click for a range, Cmd/Ctrl+click to toggle, Escape to clear) and delete, move to a group and scope act on the selected local variables in one undo step (#2002); text styles carry paragraph spacing and indent, the list style and the OpenType features, as the Supported in text styles table of Create and apply text styles says (#1829); a layer's effect binding takes only a field its effect has; Go to main component on an instance of a library component opens the library file in a tab and selects the main there; glass effects take variables; Delete on a layer inside an instance hides it as an override instead of being refused, as the help center says: "Figma will only toggle the layer's visibility instead of removing it"; library analytics list how many layers and files use each style and variable; SwiftUI and Compose code names a bound variable by its iOS or Android code syntax; library analytics count insertions and show insertions and detachments over the past 30 days, 90 days or year; a collection of this file can be extended (Extend collection on its row, `variable.extendCollection`), its extension following its edits at once, and extended collections extend again in the file; a typed or stored variable, collection or mode id names only the object with that id (#1613); colour variables can be calculated from other colours per mode — `{alpha}` replaces a colour's alpha, `{mix}` blends two — and follow them (#1280); stored variable and collection references keep their identity when another object is named like their id (follow-up to #1542); a component set's property rows fit the 240 px right panel: variant values wrap two to a line there and every + and − stays in view; opening a file contacts no team library server it names until you check it (#1097); an explicit variables file path (`variable.import`, the `variables` of `file.open` and `file.import`) is refused past 256 MiB or when it isn't a regular file, as the sibling `variables.json` already was (part of #1114); component properties keep the order they were made in when one is renamed, and Make slot asks for the slot's name first (#1536, #1537); components can't contain their own instances, directly or through others (#1084); the instance-swap menus have a search field (#1338); an instance-swap property's default menu scrolls (#1338); variables on a text style's fields from the style editor; instance-swap properties in the component playground; duplicating or Alt-dragging a main component makes an instance of it (#892); a bound colour variable's alpha applies once (#802); variables import reads `variables` outside `meta` and warns when it imports none (#790); variant properties reorder by drag; library files saved right after a read are read again; Hide when publishing note corrected; size and resizing overrides of layers inside instances (#731); variables export in the browser as a download; core editor leftovers: component playground, variables inside styles; layers and assets panels behaviour suite and fixes; extended collections tail; styles and variables behaviour suite and fixes; components behaviour suite and fixes; team libraries on the server, library usage and swapping a library; extended collections, variables import/export, gradient stops and variant properties bound to variables) · **Target:** Figma Design (desktop app 126.10.7) Design systems are why teams adopt Figma. **Components: breadth ~96%, ready ~72%. Styles and variables: breadth ~95%, ready ~76% (estimated).** QA'd with a synthetic design system of ~300 @@ -80,6 +80,7 @@ updates with overrides kept: `library_tests.rs`, `components_scale_tests.rs`. | Date | Change | Summary | |---|---|---| +| 2026-11-18 | patch | M3: enabled libraries were read only while the Assets panel showed, so after a file was opened the Design panel's style pickers offered none of their styles (a library's text styles read "No text styles yet") until the Assets tab had been opened. They are refreshed from the app's background tick now, a local library not read yet at once. The style picker has a source menu under its search field, as in Figma: All libraries (the default), This file, or one enabled library. Test: `style_picker::tests::a_reopened_files_text_styles_picker_lists_its_librarys_styles_without_the_assets_tab` | | 2026-11-19 | patch | M3, #2414: a kit's style used by a component of a second library reached a file linking both as a second, unbound copy (`::S:1`) frozen in the kit's default mode, so a mode set on the kit's collection didn't colour it (from two hops on, every such style). Publishing now keeps the variables the published styles bind and where the file's copies of other libraries' styles, variables and collections came from; importing files such a copy under that library when the file links it, so it is the file's own bound copy. Test: `library_style_hops_tests::a_kit_style_through_another_library_is_the_kits_bound_copy`; the issue's four-file chain renders Brand and Alt everywhere. Grade unchanged. | | 2026-11-19 | patch | M3, #2349: with one variant of a set selected, the Design panel's variant property dropdowns showed the set's default values, and choosing a value set the default, so the variants swapped places. They now show the selected variant's own values (hover: "This variant's value"), and choosing one renames that variant only; with the set selected they still set its default. Test: `variant_own_value_tests::a_selected_variants_dropdown_shows_and_sets_its_own_value`. Grade unchanged. | | 2026-11-18 | minor | M3, gap 10: library analytics count insertions and detachments of styles and variables. Applying one, or copying or duplicating content that uses it, inserts it; the Detach button detaches it; an instance counts as its component alone. Show usage and `library.usage` give them per style and variable over the chosen period. Modes aren't counted. Numbers unchanged. Tests: `library_asset_counts_tests`, `library_assets_tests`. |