M3: a library's style that reaches a file through another library stays bound (#2414)

Publishing keeps the variables its styles bind and where its copies of other libraries' assets came
from; importing files such a copy under that library when the file links it.
This commit is contained in:
bflatastic committed 2026-11-19 03:54:44 +07:00
1 parent f51606ca4e
commit 0e5070d6cf
4 files changed
+131 -18

No files matched your search

+41 -16
View File
@@ -436,7 +436,8 @@ pub fn publish(doc: &Document, prev: Option<&PublishedLibrary>, sel: &Selection,
.map(|v| v.id.as_str())
.collect();
let (bound, mode_colls) = used_variables(doc, &units);
let var_ids = alias_closure(&doc.variables, offered_vars.iter().map(ToString::to_string).chain(bound));
let style_vars = snap.styles.iter().flat_map(|s| s.bound.values().cloned());
let var_ids = alias_closure(&doc.variables, offered_vars.iter().map(ToString::to_string).chain(bound).chain(style_vars));
snap.variables.variables = doc.variables.variables.iter().filter(|v| var_ids.contains(&v.id)).cloned().collect();
let coll_ids: BTreeSet<&str> = snap
.variables
@@ -447,6 +448,16 @@ pub fn publish(doc: &Document, prev: Option<&PublishedLibrary>, sel: &Selection,
.chain(mode_colls.iter().map(String::as_str))
.collect();
snap.variables.collections = doc.variables.collections.iter().filter(|c| coll_ids.contains(c.id.as_str())).cloned().collect();
// Where its copies of other libraries' styles, variables and collections come from, so that a
// file linking those libraries too files them under them (#2414).
let kept = |recs: &[ImportedRecord], has: &dyn Fn(&str) -> bool| recs.iter().filter(|r| has(&r.local)).cloned().collect::<Vec<_>>();
let from = (
kept(&doc.libraries.styles, &|l| snap.styles.iter().any(|s| s.id == l)),
kept(&doc.libraries.variables, &|l| snap.variables.variables.iter().any(|v| v.id == l)),
kept(&doc.libraries.collections, &|l| snap.variables.collections.iter().any(|c| c.id == l)),
);
let libs = snap.libraries_mut();
(libs.styles, libs.variables, libs.collections) = from;
for h in used_images(&snap) {
if let Some(img) = doc.images.get(&h) {
snap.images.insert(h, img.clone());
@@ -806,12 +817,22 @@ fn local_key(lid: &str, key: &str, taken: impl Fn(&str) -> bool) -> String {
(1..10_000).map(|k| if k == 1 { base.clone() } else { format!("{base}#{k}") }).find(|l| !taken(l)).unwrap_or(base)
}
/// Where library `lib`'s style, variable or collection `key` (at `version`) comes from: when `lib`
/// has it from another library this file links too, that library, its key and version there, so the
/// copy is that library's (one copy, bound, following its modes: #2414); else `lib` itself.
fn origin<'a>(doc: &Document, lib: &'a PublishedLibrary, theirs: &'a [ImportedRecord], key: &'a str, version: u64) -> (&'a str, &'a str, u64) {
let linked = |id: &str| doc.libraries.enabled.iter().any(|l| l.id == id);
match theirs.iter().find(|r| r.local == key && r.library != lib.manifest.id && linked(&r.library)) {
Some(r) => (&r.library, &r.key, r.version),
None => (&lib.manifest.id, key, version),
}
}
/// Copy library styles `keys` into `doc` as linked remote styles (with `update`, copies older than
/// the library's are refreshed). The variables a written copy binds are imported too and its
/// bindings point at their copies (never at this file's variables of the same ids). Returns library
/// style id → local id.
pub fn import_styles(doc: &mut Document, lib: &PublishedLibrary, keys: &BTreeSet<String>, update: bool) -> BTreeMap<String, String> {
let lid = lib.manifest.id.clone();
let mut out = BTreeMap::new();
let mut hashes = BTreeSet::new();
// Local ids of the copies written now, with the library style they copy.
@@ -819,7 +840,8 @@ pub fn import_styles(doc: &mut Document, lib: &PublishedLibrary, keys: &BTreeSet
for key in keys {
let Some(style) = lib.doc.styles.iter().find(|s| s.id == *key) else { continue };
let version = lib.manifest.style(key).map_or(lib.manifest.version, |s| s.version);
let local = match record_of(&doc.libraries.styles, &lid, key, |l| doc.styles.iter().any(|s| s.id == l)) {
let (from, from_key, version) = origin(doc, lib, &lib.doc.libraries.styles, key, version);
let local = match record_of(&doc.libraries.styles, from, from_key, |l| doc.styles.iter().any(|s| s.id == l)) {
Some(r) => {
if update
&& version > r.version
@@ -832,9 +854,10 @@ pub fn import_styles(doc: &mut Document, lib: &PublishedLibrary, keys: &BTreeSet
r.local
}
None => {
let local = local_key(&lid, key, |l| doc.styles.iter().any(|s| s.id == l));
let local = local_key(from, from_key, |l| doc.styles.iter().any(|s| s.id == l));
doc.styles.push(Style { id: local.clone(), ..style.clone() });
set_record(&mut doc.libraries_mut().styles, ImportedStyle { library: lid.clone(), key: key.clone(), local: local.clone(), version });
let rec = ImportedStyle { library: from.to_string(), key: from_key.to_string(), local: local.clone(), version };
set_record(&mut doc.libraries_mut().styles, rec);
written.push((local.clone(), style));
local
}
@@ -877,7 +900,7 @@ pub fn import_variables(
collections: &BTreeSet<CollectionId>,
update: bool,
) -> VariableMap {
let (lid, m, src) = (lib.manifest.id.as_str(), &lib.manifest, &lib.doc.variables);
let (m, src) = (&lib.manifest, &lib.doc.variables);
let vars = alias_closure(src, keys.iter().cloned());
let colls: BTreeSet<&CollectionId> = collections.iter().chain(vars.iter().filter_map(|v| src.get_by_id(v)).map(|v| &v.collection)).collect();
let mut out = VariableMap::default();
@@ -885,8 +908,9 @@ pub fn import_variables(
for key in colls {
let Some(c) = src.collections.iter().find(|c| c.id == *key) else { continue };
let version = m.collection(key).map_or(m.version, |x| x.version);
let (from, from_key, version) = origin(doc, lib, &lib.doc.libraries.collections, key, version);
let exists = |d: &Document, l: &str| d.variables.collections.iter().any(|x| x.id == l);
let local = match record_of(&doc.libraries.collections, lid, key, |l| exists(doc, l)) {
let local = match record_of(&doc.libraries.collections, from, from_key, |l| exists(doc, l)) {
Some(r) => {
if update
&& version > r.version
@@ -898,9 +922,9 @@ pub fn import_variables(
r.local
}
None => {
let local = local_key(lid, key, |l| exists(doc, l));
let local = local_key(from, from_key, |l| exists(doc, l));
doc.variables.collections.push(Collection { id: local.clone(), extends: None, ..c.clone() });
let rec = ImportedRecord { library: lid.to_string(), key: key.clone(), local: local.clone(), version };
let rec = ImportedRecord { library: from.to_string(), key: from_key.to_string(), local: local.clone(), version };
set_record(&mut doc.libraries_mut().collections, rec);
local
}
@@ -908,27 +932,28 @@ pub fn import_variables(
out.collections.insert(key.clone(), local);
}
// Local ids first (the copies alias each other), then the values.
let mut write: Vec<(&Variable, VariableId, u64, bool)> = Vec::new();
let mut write: Vec<(&Variable, VariableId, u64, bool, &str, &str)> = Vec::new();
for key in &vars {
let Some(v) = src.variables.iter().find(|x| x.id == *key).filter(|v| out.collections.contains_key(&v.collection)) else { continue };
let version = m.variable(key).map_or(m.version, |x| x.version);
let local = match record_of(&doc.libraries.variables, lid, key, |l| doc.variables.variables.iter().any(|x| x.id == l)) {
let (from, from_key, version) = origin(doc, lib, &lib.doc.libraries.variables, &v.id, version);
let local = match record_of(&doc.libraries.variables, from, from_key, |l| doc.variables.variables.iter().any(|x| x.id == l)) {
Some(r) => {
if update && version > r.version {
write.push((v, r.local.clone(), version, false));
write.push((v, r.local.clone(), version, false, from, from_key));
}
r.local
}
None => {
let taken = |l: &str| doc.variables.variables.iter().any(|x| x.id == l) || out.variables.values().any(|x| x == l);
let local = local_key(lid, key, taken);
write.push((v, local.clone(), version, true));
let local = local_key(from, from_key, taken);
write.push((v, local.clone(), version, true, from, from_key));
local
}
};
out.variables.insert(key.clone(), local);
}
for (v, local, version, new) in write {
for (v, local, version, new, from, from_key) in write {
let Some(collection) = out.collections.get(&v.collection).cloned() else { continue };
let mut values = BTreeMap::new();
for (mode, val) in &v.values {
@@ -952,7 +977,7 @@ pub fn import_variables(
Some(slot) => *slot = copy,
None => doc.variables.variables.push(copy),
}
set_record(&mut doc.libraries_mut().variables, ImportedRecord { library: lid.to_string(), key: v.id.clone(), local, version });
set_record(&mut doc.libraries_mut().variables, ImportedRecord { library: from.to_string(), key: from_key.to_string(), local, version });
}
out
}
+2
View File
@@ -414,6 +414,8 @@ mod library_path_tests;
#[cfg(test)]
mod library_range_styles_tests;
#[cfg(test)]
mod library_style_hops_tests;
#[cfg(test)]
mod library_variables_tests;
#[cfg(test)]
mod line_endings_tests;
@@ -0,0 +1,85 @@
//! Styles that reach a file through another library (#2414): a kit's style used by a component of
//! a second library is, in a file linking both, the kit's own bound copy, so a mode set on the kit's
//! collection colours it. Before, the file got a second, unbound copy frozen in the kit's default mode.
use figcraft_doc::*;
use serde_json::{Value, json};
use crate::Session;
use crate::params::id_of;
fn ex(s: &mut Session, cmd: &str, p: Value) -> Value {
s.execute(cmd, &p).unwrap_or_else(|e| panic!("{cmd} {p}: {e}"))
}
fn id(v: &Value) -> NodeId {
id_of(&v["id"]).unwrap()
}
/// The main component named `name` (a library copy or this file's own).
fn component(s: &Session, name: &str) -> NodeId {
s.doc().unwrap().nodes().find(|n| n.name == name && matches!(n.kind, NodeKind::Component { .. })).unwrap().id
}
/// Publish `s` and save it as `name`.figcraft in `dir`; returns (its path, its library id).
fn publish(s: &mut Session, dir: &std::path::Path, name: &str) -> (String, String) {
let lid = ex(s, "library.publish", json!({}))["id"].as_str().unwrap().to_string();
let path = dir.join(format!("{name}.figcraft")).to_string_lossy().into_owned();
ex(s, "file.saveAs", json!({"path": path}));
(path, lid)
}
#[test]
fn a_kit_style_through_another_library_is_the_kits_bound_copy() {
let dir = std::env::temp_dir().join(format!("figcraft-style-hops-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
// kit: a Theme (Light/Brand) colour and a style bound to it, used by "kit-button".
let mut kit = Session::new();
ex(&mut kit, "variable.createCollection", json!({"name": "Theme", "modes": ["Light", "Brand"]}));
ex(
&mut kit,
"variable.create",
json!({"collection": "Theme", "name": "primary", "type": "color", "values": {"Light": "#7B1FA2", "Brand": "#1565C0"}}),
);
let src = id(&ex(&mut kit, "node.create", json!({"type": "rectangle", "x": 0, "y": 200, "width": 40, "height": 40})));
ex(&mut kit, "variable.bind", json!({"ids": [src], "field": "fill", "variable": "primary"}));
ex(&mut kit, "style.create", json!({"type": "paint", "name": "kit/primary", "from": src}));
let c = id(&ex(&mut kit, "node.create", json!({"type": "component", "width": 120, "height": 40, "name": "kit-button"})));
let bg = id(&ex(&mut kit, "node.create", json!({"type": "rectangle", "parent": c, "width": 120, "height": 40, "name": "bg"})));
ex(&mut kit, "style.apply", json!({"ids": [bg], "style": "kit/primary", "target": "fill"}));
let (kit_path, kit_id) = publish(&mut kit, &dir, "kit");
// auth: "auth-button" holds a kit-button.
let mut auth = Session::new();
ex(&mut auth, "library.add", json!({"path": kit_path}));
ex(&mut auth, "library.import", json!({"library": kit_id, "component": "kit-button"}));
let c = id(&ex(&mut auth, "node.create", json!({"type": "component", "width": 200, "height": 40, "name": "auth-button"})));
let main = component(&auth, "kit-button");
ex(&mut auth, "instance.create", json!({"component": main, "parent": c}));
let (auth_path, auth_id) = publish(&mut auth, &dir, "auth");
// app: links both, uses an auth-button in a frame set to the kit's Brand mode.
let mut app = Session::new();
ex(&mut app, "library.add", json!({"path": kit_path}));
ex(&mut app, "library.add", json!({"path": auth_path}));
ex(&mut app, "library.import", json!({"library": kit_id, "component": "kit-button"}));
ex(&mut app, "library.import", json!({"library": auth_id, "component": "auth-button"}));
let f = id(&ex(&mut app, "node.create", json!({"type": "frame", "width": 240, "height": 100, "name": "Brand"})));
ex(&mut app, "library.setVariableMode", json!({"library": kit_id, "collection": "Theme", "mode": "Brand", "ids": [f]}));
let main = component(&app, "auth-button");
ex(&mut app, "instance.create", json!({"component": main, "parent": f}));
let doc = app.doc().unwrap();
let kit_styles: Vec<&Style> = doc.styles.iter().filter(|s| s.name == "kit/primary").collect();
assert_eq!(kit_styles.len(), 1, "one copy of the kit's style: {:?}", kit_styles.iter().map(|s| &s.id).collect::<Vec<_>>());
let style = kit_styles[0];
assert!(doc.libraries.styles.iter().any(|r| r.local == style.id && r.library == kit_id), "it is the kit's copy: {}", style.id);
let var = style.bound.values().next().expect("the copy stays bound");
assert!(doc.libraries.variables.iter().any(|r| r.local == *var && r.library == kit_id), "to the kit's variable: {var}");
// The bg inside the placed auth-button uses it.
let placed: Vec<NodeId> = doc.subtree(f).into_iter().filter(|n| doc.node(*n).is_some_and(|n| n.name == "bg")).collect();
assert_eq!(placed.len(), 1);
assert_eq!(doc.node(placed[0]).unwrap().styles.fill.as_deref(), Some(style.id.as_str()));
let _ = std::fs::remove_dir_all(&dir);
}
+3 -2
View File
@@ -1,6 +1,6 @@
# Components, variants, styles and variables parity
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (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 (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
@@ -50,7 +50,7 @@ updates with overrides kept: `library_tests.rs`, `components_scale_tests.rs`.
| Feature | Status | Notes |
|---|---|---|
| Publish a file's components, sets, styles and variables (per-asset versions) | done | as local library files |
| Enable a library in a file; read-only linked copies | done | |
| Enable a library in a file; read-only linked copies | done | a library's copies of another library's styles, variables and collections are, in a file linking that library too, that library's copies (one copy, bound, following its modes: `library_style_hops_tests`, #2414); a file that doesn't link it gets the copies under the library it used |
| Go to main component from an instance of a library component | done | opens the library file in a tab, or brings it to the front, on the page holding the main, selected and zoomed to; a variant goes to that variant. Team libraries on a server are refused with a note; no Return to instance yet |
| Library updates available; overrides kept | done | a library file saved again within two seconds of being read, at the same length, is read again (its time stamp can't prove it unchanged; #652) |
| Team libraries: publish to a `figcraft-server` under the file, enable by a share link (a view link reads it), background update checks | done | [server.md](server.md#team-libraries); no team-wide library list or accounts ([gaps](gaps.md) #10) |
@@ -80,6 +80,7 @@ updates with overrides kept: `library_tests.rs`, `components_scale_tests.rs`.
| Date | Change | Summary |
|---|---|---|
| 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 (`<auth>:<kit>: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`. |
| 2026-11-18 | patch | M3: Combine as variants gives every variant the component properties any of the components had (as a property added to a set goes to all its variants); a property made on one component before combining was missing from the others, so their layers couldn't be bound to it and an instance switched to them dropped its value. A variant with a property of the same name keeps its own. Tests: `variant_shared_props_tests`. |