Merge pull request #7754 from dotCooCoo/feat/properties-graph-section

Properties: a Graph section opens Graph Type and Graph Data for a selected graph
This commit is contained in:
BFlat authored and GitHub committed 2026-11-16 04:27:40 +07:00
commit babc8b1dd8
32 files changed
+320

No files matched your search

+2
View File
@@ -1378,6 +1378,8 @@ font-technology Variable Променливи
Graph Диаграма
Graph Data Данни за диаграма
Graph Type Тип диаграма
Graph Type… Тип диаграма…
Graph Data… Данни за диаграма…
Graph Options Опции на диаграмата
Left Axis Лява ос
Right Axis Дясна ос
Can't render this file because it is too large.
+2
View File
@@ -3599,6 +3599,8 @@ theme Appearance Izgled
Create Graph Kreiraj grafikon
Graph Data Podaci grafikona
Graph Type Vrsta grafikona
Graph Type… Vrsta grafikona…
Graph Data… Podaci grafikona…
Graph Options Opcije grafikona
Left Axis Lijeva osa
Right Axis Desna osa
Can't render this file because it contains an unexpected character in line 2 and column 73.
+2
View File
@@ -1910,6 +1910,8 @@ digits Malayalam Malaiàlam
Graph Design Disseny del gràfic
Graph Marker Marcador del gràfic
Graph Type Tipus de gràfic
Graph Type… Tipus de gràfic…
Graph Data… Dades del gràfic…
Graph Options Opcions del gràfic
Left Axis Eix esquerre
Right Axis Eix dret
Can't render this file because it contains an unexpected character in line 2 and column 73.
+2
View File
@@ -3695,6 +3695,8 @@ theme Appearance Motiv
Create Graph Vytvořit graf
Graph Data Data grafu
Graph Type Typ grafu
Graph Type… Typ grafu…
Graph Data… Data grafu…
Graph Options Možnosti grafu
Left Axis Levá osa
Right Axis Pravá osa
Can't render this file because it is too large.
+2
View File
@@ -4042,6 +4042,8 @@ theme Appearance Udseende
Create Graph Opret graf
Graph Data Grafdata
Graph Type Graftype
Graph Type… Graftype…
Graph Data… Grafdata…
Graph Options Grafindstillinger
Left Axis Venstre akse
Right Axis Højre akse
Can't render this file because it contains an unexpected character in line 2 and column 73.
+2
View File
@@ -1421,6 +1421,8 @@ file-filter Templates Vorlagen
Graph Diagramm
Graph Data Diagrammdaten
Graph Type Diagrammtyp
Graph Type… Diagrammtyp…
Graph Data… Diagrammdaten…
Graph Options Diagrammoptionen
Left Axis Linke Achse
Right Axis Rechte Achse
Can't render this file because it is too large.
+2
View File
@@ -1353,6 +1353,8 @@ font-technology Variable Μεταβλητές
Graph Γράφημα
Graph Data Δεδομένα γραφήματος
Graph Type Τύπος γραφήματος
Graph Type… Τύπος γραφήματος…
Graph Data… Δεδομένα γραφήματος…
Graph Options Επιλογές γραφήματος
Left Axis Αριστερός άξονας
Right Axis Δεξιός άξονας
Can't render this file because it is too large.
+2
View File
@@ -1432,6 +1432,8 @@ font-technology Variable Variables
Graph Gráfico
Graph Data Datos del gráfico
Graph Type Tipo de gráfico
Graph Type… Tipo de gráfico…
Graph Data… Datos del gráfico…
Graph Options Opciones de gráfico
Left Axis Eje izquierdo
Right Axis Eje derecho
Can't render this file because it contains an unexpected character in line 2 and column 73.
+2
View File
@@ -3633,6 +3633,8 @@ theme Appearance Ulkoasu
Create Graph Luo kaavio
Graph Data Kaavion tiedot
Graph Type Kaavion tyyppi
Graph Type… Kaavion tyyppi…
Graph Data… Kaavion tiedot…
Graph Options Kaavion asetukset
Left Axis Vasen akseli
Right Axis Oikea akseli
Can't render this file because it contains an unexpected character in line 2 and column 73.
+2
View File
@@ -1426,6 +1426,8 @@ font-technology Variable Variables
Graph Graphe
Graph Data Données du graphe
Graph Type Type de graphe
Graph Type… Type de graphe…
Graph Data… Données du graphe…
Graph Options Options du graphe
Left Axis Axe gauche
Right Axis Axe droit
Can't render this file because it is too large.
+2
View File
@@ -1548,6 +1548,8 @@
Graph Design ગ્રાફ ડિઝાઇન
Graph Marker ગ્રાફ માર્કર
Graph Type ગ્રાફ પ્રકાર
Graph Type… ગ્રાફ પ્રકાર…
Graph Data… ગ્રાફ ડેટા…
Graph Options ગ્રાફ વિકલ્પો
Left Axis ડાબી અક્ષ
Right Axis જમણી અક્ષ
Can't render this file because it contains an unexpected character in line 72 and column 5.
+2
View File
@@ -2125,6 +2125,8 @@ antiAlias Sharp शार्प
Graph Design ग्राफ़ डिजाइन
Graph Marker ग्राफ़ मार्कर
Graph Type ग्राफ़ टाइप
Graph Type… ग्राफ़ टाइप…
Graph Data… ग्राफ़ डेटा…
Graph Options ग्राफ़ विकल्प
Left Axis बायाँ एक्सिस
Right Axis दायाँ एक्सिस
Can't render this file because it is too large.
+2
View File
@@ -1784,6 +1784,8 @@ file-filter Templates Sablonok
Graph Diagram
Graph Data Diagramadatok
Graph Type Diagramtípus
Graph Type… Diagramtípus…
Graph Data… Diagramadatok…
Graph Options Diagrambeállítások
Left Axis Bal tengely
Right Axis Jobb tengely
Can't render this file because it is too large.
+2
View File
@@ -3376,6 +3376,8 @@ theme Appearance Tampilan
Create Graph Buat grafik
Graph Data Data grafik
Graph Type Jenis grafik
Graph Type… Jenis grafik…
Graph Data… Data grafik…
Graph Options Opsi grafik
Left Axis Sumbu kiri
Right Axis Sumbu kanan
Can't render this file because it contains an unexpected character in line 2473 and column 5.
+2
View File
@@ -1451,6 +1451,8 @@ file-filter Templates Modelli
Graph Grafico
Graph Data Dati grafico
Graph Type Tipo di grafico
Graph Type… Tipo di grafico…
Graph Data… Dati grafico…
Graph Options Opzioni grafico
Left Axis Asse sinistro
Right Axis Asse destro
Can't render this file because it is too large.
+2
View File
@@ -3874,6 +3874,8 @@ file-filter Templates テンプレート
Gradient (. or Shift+.) グラデーション (. または Shift+.)
Graph Data グラフデータ
Graph Type グラフの種類
Graph Type… グラフの種類…
Graph Data… グラフデータ…
Graph Options グラフオプション
Left Axis 左軸
Right Axis 右軸
Can't render this file because it is too large.
+2
View File
@@ -5349,6 +5349,8 @@ theme Appearance იერსახე
Create Graph დიაგრამის შექმნა
Graph Data დიაგრამის მონაცემები
Graph Type დიაგრამის ტიპი
Graph Type… გრაფიკის ტიპი…
Graph Data… გრაფიკის მონაცემები…
Graph Options გრაფიკის პარამეტრები
Left Axis მარცხენა ღერძი
Right Axis მარჯვენა ღერძი
Can't render this file because it is too large.
+2
View File
@@ -3862,6 +3862,8 @@ file-filter Templates 템플릿
Gradient (. or Shift+.) 그레이디언트 (. 또는 Shift+.)
Graph Data 그래프 데이터
Graph Type 그래프 유형
Graph Type… 그래프 유형…
Graph Data… 그래프 데이터…
Graph Options 그래프 옵션
Left Axis 왼쪽 축
Right Axis 오른쪽 축
Can't render this file because it is too large.
+2
View File
@@ -3938,6 +3938,8 @@ theme Appearance Vormgeving
Create Graph Diagram maken
Graph Data Diagramgegevens
Graph Type Diagramtype
Graph Type… Diagramtype…
Graph Data… Diagramgegevens…
Graph Options Diagramopties
Left Axis Linkeras
Right Axis Rechteras
Can't render this file because it is too large.
+2
View File
@@ -3574,6 +3574,8 @@ theme Appearance Wygląd
Create Graph Utwórz wykres
Graph Data Dane wykresu
Graph Type Typ wykresu
Graph Type… Typ wykresu…
Graph Data… Dane wykresu…
Graph Options Opcje wykresu
Left Axis Lewa oś
Right Axis Prawa oś
Can't render this file because it is too large.
+2
View File
@@ -4993,6 +4993,8 @@ axis Both Ambos
Gradient (. or Shift+.) Gradiente (. ou Shift+.)
Graph Data Dados do Gráfico
Graph Type Tipo de Gráfico
Graph Type… Tipo de Gráfico…
Graph Data… Dados do Gráfico…
Graph Options Opções do Gráfico
Left Axis Eixo Esquerdo
Right Axis Eixo Direito
Can't render this file because it is too large.
+2
View File
@@ -1442,6 +1442,8 @@ file-filter Templates Шаблоны
Graph Диаграмма
Graph Data Данные диаграммы
Graph Type Тип диаграммы
Graph Type… Тип диаграммы…
Graph Data… Данные диаграммы…
Graph Options Параметры диаграммы
Left Axis Левая ось
Right Axis Правая ось
Can't render this file because it is too large.
+2
View File
@@ -1389,6 +1389,8 @@ font-technology Variable Variabla
Graph Diagram
Graph Data Diagramdata
Graph Type Diagramtyp
Graph Type… Diagramtyp…
Graph Data… Diagramdata…
Graph Options Diagramalternativ
Left Axis Vänster axel
Right Axis Höger axel
Can't render this file because it is too large.
+2
View File
@@ -1357,6 +1357,8 @@ font-technology Variable Değişken
Graph Grafik
Graph Data Grafik Verileri
Graph Type Grafik Türü
Graph Type… Grafik Türü…
Graph Data… Grafik Verileri…
Graph Options Grafik Seçenekleri
Left Axis Sol Eksen
Right Axis Sağ Eksen
Can't render this file because it is too large.
+2
View File
@@ -1445,6 +1445,8 @@ file-filter Templates Шаблони
Graph Діаграма
Graph Data Дані діаграми
Graph Type Тип діаграми
Graph Type… Тип діаграми…
Graph Data… Дані діаграми…
Graph Options Параметри діаграми
Left Axis Ліва вісь
Right Axis Права вісь
Can't render this file because it is too large.
+2
View File
@@ -1704,6 +1704,8 @@ file-filter Templates Mẫu
Chop Design Cắt thiết kế
Scale Design Co giãn thiết kế
Graph Type Loại biểu đồ
Graph Type… Loại biểu đồ…
Graph Data… Dữ liệu biểu đồ…
Graph Options Tùy chọn biểu đồ
Left Axis Trục trái
Right Axis Trục phải
Can't render this file because it contains an unexpected character in line 205 and column 5.
+2
View File
@@ -1380,6 +1380,8 @@ file-filter Templates 模板
Graph 图表
Graph Data 图表数据
Graph Type 图表类型
Graph Type… 图表类型…
Graph Data… 图表数据…
Graph Options 图表选项
Left Axis 左轴
Right Axis 右轴
Can't render this file because it is too large.
+2
View File
@@ -1415,6 +1415,8 @@ file-filter Templates 範本
Graph 圖表
Graph Data 圖表資料
Graph Type 圖表類型
Graph Type… 圖表類型…
Graph Data… 圖表資料…
Graph Options 圖表選項
Left Axis 左軸
Right Axis 右軸
Can't render this file because it is too large.
+2
View File
@@ -69,6 +69,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
objects_on_path_section(app, ui, &oop);
divider(ui);
}
graph::section(app, ui);
if matches!(first.as_ref().map(|n| &n.kind), Some(NodeKind::Text(_))) {
type_sections(app, ui);
divider(ui);
@@ -1050,6 +1051,7 @@ pub fn type_sections(app: &mut VectorcraftApp, ui: &mut Ui) {
}
pub(crate) mod dynamic_text;
pub(crate) mod graph;
pub(crate) mod vertical_align;
#[cfg(test)]
@@ -0,0 +1,110 @@
//! The Properties panel's Graph section, for one selected graph or series of one graph picked with
//! Group Selection: Graph Type… and Graph Data… open the dialogs of Object › Graph › Type… and
//! Data… ([Format pie graphs](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/visualize-data/format-pie-graphs.html)
//! opens Graph Type from the Properties panel). Column… shows when every series it would change
//! draws columns or bars, and Marker… when every one draws lines, scatter points or radar lines;
//! both run the same route as their Object › Graph items.
use egui::Ui;
use serde_json::json;
use vectorcraft_doc::{Document, GraphKind, MAX_GRAPH_SERIES, NodeId};
use crate::VectorcraftApp;
use crate::widgets::{self, divider, section_header};
/// The Graph section's optional buttons for the selection.
#[derive(Clone, Copy, Debug, PartialEq)]
pub(crate) struct Shown {
/// Column… takes the series it would change.
pub(crate) column: bool,
/// Marker… takes the series it would change.
pub(crate) marker: bool,
}
/// What the Graph section shows for the selection; `None` unless everything selected is one graph
/// or lies inside the same graph.
pub(crate) fn shown(app: &VectorcraftApp) -> Option<Shown> {
let st = app.session.active()?;
let doc = &st.doc;
let mut graph = None;
for id in &st.selection.objects {
let g = graph_of(doc, *id)?;
if graph.is_some_and(|x| x != g) {
return None;
}
graph = Some(g);
}
let graph = graph?;
let spec = doc.node(graph)?.extras().graph.as_deref()?;
let count = spec.rows.iter().map(Vec::len).max().unwrap_or(0).min(MAX_GRAPH_SERIES);
// The series Column… and Marker… change: those picked with Group Selection when the selection is
// only series, else every series (as `graph.column` and `graph.marker` pick them).
let picked: Option<Vec<usize>> = st.selection.objects.iter().map(|id| series_of(doc, graph, *id).filter(|i| *i < count)).collect();
let series = picked.unwrap_or_else(|| (0..count).collect());
let kinds: Vec<GraphKind> = series.iter().map(|i| spec.series_kind(*i)).collect();
let all = |ks: &[GraphKind]| !kinds.is_empty() && kinds.iter().all(|k| ks.contains(k));
Some(Shown {
column: all(&[GraphKind::Column, GraphKind::StackedColumn, GraphKind::Bar, GraphKind::StackedBar]),
marker: all(&[GraphKind::Line, GraphKind::Scatter, GraphKind::Radar]),
})
}
/// The graph `id` is or lies in.
fn graph_of(doc: &Document, id: NodeId) -> Option<NodeId> {
let mut cur = Some(id);
while let Some(c) = cur {
if doc.node(c).is_some_and(|n| n.extras().graph.is_some()) {
return Some(c);
}
cur = doc.parent_of(c);
}
None
}
/// The index of the series of `graph` that `id` is or lies in; `None` for the graph itself, its
/// axes and its legend.
fn series_of(doc: &Document, graph: NodeId, id: NodeId) -> Option<usize> {
let mut cur = id;
loop {
let parent = doc.parent_of(cur)?;
if parent == graph {
return doc.node(cur)?.extras().series_index.and_then(|i| usize::try_from(i).ok());
}
cur = parent;
}
}
/// The Graph section for the selection, with the divider after it; nothing without a graph.
pub(crate) fn section(app: &mut VectorcraftApp, ui: &mut Ui) {
let Some(s) = shown(app) else { return };
section_header(ui, tl!("Graph"));
let mut buttons = vec![(tl!("Graph Type…"), "graph.setType"), (tl!("Graph Data…"), "graph.setData")];
if s.column {
buttons.push((tl!("Column…"), "graph.column"));
}
if s.marker {
buttons.push((tl!("Marker…"), "graph.marker"));
}
let full = ui.available_width();
let w = (full - 6.0) / 2.0;
for pair in buttons.chunks(2) {
// Two buttons share a row while both labels fit in half of it; a longer translated label
// puts each button of the pair on a row of its own.
if pair.iter().all(|(label, _)| widgets::flat_button_fit_width(ui, label, 0.0) <= w) {
ui.horizontal(|ui| {
for (label, id) in pair {
if widgets::flat_button(ui, label, w).clicked() {
crate::menus::invoke(app, id, json!({}));
}
}
});
} else {
for (label, id) in pair {
if widgets::flat_button_fit(ui, label, full).clicked() {
crate::menus::invoke(app, id, json!({}));
}
}
}
}
divider(ui);
}
@@ -2014,3 +2014,154 @@ fn dynamic_text_rows_follow_the_selected_area_type() {
app.run("text.thread.create", json!({})).unwrap();
assert_eq!(dynamic_text::shown(&app).map(|s| (s.on, s.enabled)), Some((Some(false), false)));
}
/// A document with a graph of `kind` and three series, selected → the graph's id.
fn graph_doc(app: &mut VectorcraftApp, kind: &str, x: f64) -> u64 {
if app.session.active().is_none() {
app.run("file.new", json!({"width": 800, "height": 400})).unwrap();
}
let csv = ",a,b,c\nQ1,1,2,3\nQ2,3,4,5";
app.run("graph.create", json!({"type": kind, "x": x, "y": 0, "width": 200, "height": 150, "csv": csv})).unwrap()["id"].as_u64().unwrap()
}
/// The ids of graph `graph`'s series groups, in series order.
fn series_groups(app: &VectorcraftApp, graph: u64) -> Vec<u64> {
let st = app.session.active().unwrap();
let mut groups: Vec<(u32, u64)> = st
.doc
.node(vectorcraft_doc::NodeId(graph))
.and_then(vectorcraft_doc::Node::children)
.into_iter()
.flatten()
.filter_map(|c| c.extras().series_index.map(|i| (i, c.id.0)))
.collect();
groups.sort_unstable();
groups.into_iter().map(|(_, id)| id).collect()
}
/// One selected column graph has a Graph section with Graph Type…, Graph Data… and Column…, and
/// each button opens its Object › Graph dialog for the graph.
#[test]
fn one_selected_graph_has_a_graph_section_whose_buttons_open_the_graph_dialogs() {
let mut app = VectorcraftApp::new(Session::new(), Default::default());
graph_doc(&mut app, "column", 0.0);
assert_eq!(graph::shown(&app), Some(graph::Shown { column: true, marker: false }));
let ctx = egui::Context::default();
let texts = frame(&mut app, &ctx, vec![]);
for label in ["Graph", "Graph Type…", "Graph Data…", "Column…"] {
assert!(texts.iter().any(|(t, _)| t == label), "no {label:?} in {texts:?}");
}
assert!(!texts.iter().any(|(t, _)| t == "Marker…"), "{texts:?}");
let press = |app: &mut VectorcraftApp, label: &str| {
let texts = panel_frame(app, &ctx, vec![], graph::section);
let at = texts.iter().find(|(t, _)| t == label).map(|(_, r)| r.center()).unwrap_or_else(|| panic!("no {label:?} in {texts:?}"));
let b = |pressed| Event::PointerButton { pos: at, button: PointerButton::Primary, pressed, modifiers: Default::default() };
panel_frame(app, &ctx, vec![Event::PointerMoved(at), b(true)], graph::section);
panel_frame(app, &ctx, vec![b(false)], graph::section);
app.ui.dialog.take().unwrap_or_else(|| panic!("{label:?} opened no dialog"))
};
let d = press(&mut app, "Graph Type…");
assert_eq!((d.kind.as_str(), d.str("type")), (crate::dialogs::graph_type::KIND, "column".to_string()));
assert_eq!(press(&mut app, "Graph Data…").kind, crate::dialogs::graph_data::KIND);
assert_eq!(press(&mut app, "Column…").kind, crate::dialogs::graph_design::COLUMN);
}
/// At the panel's narrowest, Graph Type… and Graph Data… share a row in English, and a translated
/// label too long for half of the row puts each of them on a row of its own, drawn whole.
#[test]
fn the_graph_sections_long_labels_get_rows_of_their_own() {
let mut app = VectorcraftApp::new(Session::new(), Default::default());
graph_doc(&mut app, "column", 0.0);
let ctx = egui::Context::default();
let width = 220.0;
let texts = |app: &mut VectorcraftApp| {
let raw = egui::RawInput { screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(width, 700.0))), ..Default::default() };
let mut out = ctx.run_ui(raw, |ui| graph::section(app, ui));
out.textures_delta.clear();
out.shapes
.iter()
.filter_map(|s| {
if let egui::Shape::Text(t) = &s.shape {
Some((t.galley.text().to_string(), Rect::from_min_size(t.pos, t.galley.size())))
} else {
None
}
})
.collect::<Vec<_>>()
};
let rect = |texts: &[(String, Rect)], label: &str| {
texts.iter().find(|(t, _)| t == label).map(|(_, r)| *r).unwrap_or_else(|| panic!("no {label:?} in {texts:?}"))
};
crate::i18n::set_current(crate::i18n::Lang::EN);
let english = texts(&mut app);
assert_eq!(rect(&english, "Graph Type…").center().y, rect(&english, "Graph Data…").center().y, "{english:?}");
crate::i18n::set_current(crate::i18n::Lang::from_code("de").expect("de registered"));
let german = texts(&mut app);
crate::i18n::set_current(crate::i18n::Lang::EN);
let (kind, data) = (rect(&german, "Diagrammtyp…"), rect(&german, "Diagrammdaten…"));
assert!(kind.bottom() <= data.top(), "{german:?}");
for r in [kind, data] {
assert!(r.left() >= 0.0 && r.right() <= width, "{r:?} in {german:?}");
}
}
/// Column… shows when every series it would change draws columns or bars, Marker… when every one
/// draws lines, scatter points or radar lines: series picked with Group Selection count on their
/// own, and a combined graph selected whole shows neither.
#[test]
fn the_graph_sections_column_and_marker_follow_the_series_they_would_change() {
let mut app = VectorcraftApp::new(Session::new(), Default::default());
let g = graph_doc(&mut app, "column", 0.0);
app.run("graph.setType", json!({"seriesIndexes": [1], "type": "line"})).unwrap();
app.run("select.set", json!({"ids": [g]})).unwrap();
assert_eq!(graph::shown(&app), Some(graph::Shown { column: false, marker: false }), "column and line series");
let groups = series_groups(&app, g);
assert_eq!(groups.len(), 3, "{groups:?}");
app.run("select.set", json!({"ids": [groups[1]]})).unwrap();
assert_eq!(graph::shown(&app), Some(graph::Shown { column: false, marker: true }), "the line series");
app.run("select.set", json!({"ids": [groups[0], groups[2]]})).unwrap();
assert_eq!(graph::shown(&app), Some(graph::Shown { column: true, marker: false }), "the column series");
app.run("select.set", json!({"ids": [groups[0], groups[1]]})).unwrap();
assert_eq!(graph::shown(&app), Some(graph::Shown { column: false, marker: false }), "one of each");
for (kind, shown) in [
("line", (false, true)),
("scatter", (false, true)),
("radar", (false, true)),
("bar", (true, false)),
("pie", (false, false)),
("area", (false, false)),
] {
let id = graph_doc(&mut app, kind, 300.0);
app.run("select.set", json!({"ids": [id]})).unwrap();
assert_eq!(graph::shown(&app).map(|s| (s.column, s.marker)), Some(shown), "{kind}");
app.run("edit.clear", json!({})).unwrap();
}
// A graph whose data was cleared has no series for Column… or Marker… to change.
for kind in ["column", "line"] {
let id = graph_doc(&mut app, kind, 300.0);
app.run("graph.setData", json!({"id": id, "series": [], "categories": [], "rows": []})).unwrap();
app.run("select.set", json!({"ids": [id]})).unwrap();
assert_eq!(graph::shown(&app), Some(graph::Shown { column: false, marker: false }), "an empty {kind} graph");
app.run("edit.clear", json!({})).unwrap();
}
}
/// The Graph section shows only while everything selected is one graph or lies in it.
#[test]
fn the_graph_section_needs_one_graph_selected() {
let mut app = VectorcraftApp::new(Session::new(), Default::default());
let a = graph_doc(&mut app, "column", 0.0);
let b = graph_doc(&mut app, "column", 300.0);
let rect = app.run("shape.rectangle", json!({"x": 600, "y": 0, "width": 20, "height": 20})).unwrap()["id"].as_u64().unwrap();
for (ids, what) in [(vec![rect], "a rectangle"), (vec![a, rect], "a graph and a rectangle"), (vec![a, b], "two graphs")] {
app.run("select.set", json!({ "ids": ids })).unwrap();
assert_eq!(graph::shown(&app), None, "{what}");
let texts = frame(&mut app, &egui::Context::default(), vec![]);
assert!(!texts.iter().any(|(t, _)| t == "Graph Type…"), "{what}: {texts:?}");
}
let groups = series_groups(&app, a);
app.run("select.set", json!({"ids": [groups[0], groups[1]]})).unwrap();
assert!(graph::shown(&app).is_some(), "two series of one graph");
app.run("select.set", json!({"ids": [groups[0], series_groups(&app, b)[0]]})).unwrap();
assert_eq!(graph::shown(&app), None, "series of two graphs");
}
+1
View File
@@ -629,6 +629,7 @@ since 2026-10-01.
- **`.ai`/EPS graphic styles that paint with a named gradient:** a graphic style library's style (or a file's listed style) whose fill, or the fill or stroke of a style of one paint, paints with one of the file's gradients by name loads with that gradient at the style's angle, fitted to the bounds of each object it is applied to (VectorCraft's own placement; the style stores only the gradient's name and angle). A style naming a gradient the file doesn't define, or painting with a pattern, is still left out. Evidence: `fileio::tests_aiimport::graphic_styles_in_a_ai_library_that_paint_with_a_named_gradient_load_with_it`, `style::tests::a_style_of_one_paint_reads_as_the_fill_and_stroke_its_xd_turns_on`. Scores unchanged.
- **`.ai`/EPS type laid out closer to the file's page (#6137):** type from the text document keeps auto leading as auto, each line taking the paragraph's Auto Leading share (key 7) of the largest type on it ([Line and character spacing](https://helpx.adobe.com/illustrator/using/line-character-spacing.html)); the paragraph's hyphenation options (keys 10 to 15) are read; area type of one frame whose last lines the file sets, but which don't fit here, may get a frame taller from its bottom, by its lines' deepest descent plus 0.05 pt and only when that shows more of those lines and no more than the file has (`vectorcraft_text::fit_source_lines`), with a warning when it does: the frame can stay as it is, or show only some of them; and a line a soft return ends is justified as a wrapped line is, a paragraph's last line keeping its alignment. Evidence: `ate::tests::auto_leading_follows_the_size_of_each_line`, `ate::tests::a_paragraph_keeps_its_auto_leading`, `ate::tests::a_paragraph_keeps_its_hyphenation_options`, `ate::tests::the_last_lines_the_file_sets_in_its_frame_show`, `tests::fit_source_lines_keeps_the_last_lines_the_source_sets`, `tests::typo::soft_return_in_justified_text_spreads_like_a_wrapped_line`. Limits: frames grow only for area type of one frame, horizontal, by its lines' deepest descent plus 0.05 pt; type in a font that isn't installed, and hyphenation in a language that isn't imported, still lay out differently. Scores unchanged.
- **Graphs saved to `.ai` keep their data and settings:** a grouped column, stacked column, line or area graph is written to a `.ai` file, in either form, with the records the `.ai` reader reads (`crates/eps/src/import/ai/read/graph.rs`, #7311): `%_Gs`, its plot, type, settings, axes and table, its series' groups each tagged `Go`, and `%_GS` ([the specification](https://13thmonkey.org/documentation/fonts/AI7FileFormat.pdf), §17 and appendix A). The file opens again with the same live graph. A graph with settings the reader doesn't keep, graph designs, label formatting, more than 10,000 categories or 256 series, or art the reader doesn't attach a graph to is written as its art, with a warning. `crates/eps/src/legacy_ai/tests.rs` and `crates/eps/src/ai_editing/tests.rs` write and read back each kind of graph; `a_drawn_graph_saved_as_ai_opens_as_a_graph_unless_the_save_warns` checks every graph type the graph tools draw. Scores unchanged.
- **Graph section in the Properties panel:** with one graph selected, or series of one graph picked with Group Selection, the Properties panel shows a Graph section. Its Graph Type… button opens the dialog of Object › Graph › Type… ([Format pie graphs](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/visualize-data/format-pie-graphs.html)). Its Graph Data… button opens the dialog of Object › Graph › Data…; this button is VectorCraft's own. Column… shows when every series it would change draws columns or bars, and Marker… when every one draws lines, scatter points or radar lines; this is VectorCraft's own rule. Regression tests in `crates/ui-egui/src/panels/properties/tests.rs`. Scores unchanged.
- **Selected Grid Repeat handles (#2691):** `tools/src/repeat_grid.rs` tests place the handles outside the grid at zoom 0.5, 1 and 4, preview rows, columns and spacing, leave no undo step for a drag that ends where it began, and give bounding-box handles priority; a headless canvas regression drags the row handle two tiles down in a zoomed view (3 → 5 rows, the source unchanged, one Undo back) and the column-spacing slider. Scores and hours unchanged.
- **Selected Mirror Repeat handles:** a headless canvas regression creates the default mirror repeat and drags its Top bounding-box handle where the axis crosses it; the repeat grows vertically while its width stays fixed. Existing mirror-axis checks cover center movement and end-handle hit priority. The focused UI mirror tests pass. Scores and hours unchanged.
- **Transform effect options (#885):** Effect › Distort & Transform › Transform… has visible Transform Objects, Transform Patterns and Scale Strokes & Effects checkboxes (`distort.transform` params `objects`, `patterns`, `strokes`; files without them draw as before). With Transform Objects off the geometry stays and makes no copies; Scale Strokes & Effects scales stroke weights, dashes and the fills' and strokes' effect distances by the mean scale, and Transform Patterns moves pattern tiles, each copy `k` by the transformation `k` times. Such objects draw, export and expand through the same per-copy art, so the canvas and Expand Appearance agree (engine `tests_transformfx`, effects `tests_transformfx`, the dialog test). A Transform effect in a fill's or stroke's own effects applies the same options to that fill or stroke: its weight and dashes and its pattern follow the transformation, and with copies each copy is an object of its own; the canvas, export, Expand Appearance and Use Preview Bounds use the same art (effects `tests_transformfx`). The effects listed after it in that fill's or stroke's list keep their own distances and apply to the transformed art and to each copy, as an object's later effects do after the object's Transform effect: a Drop Shadow after it keeps its offset, an Offset Path after it offsets by its own distance, and an SVG filter after it keeps its scale and the origin of its user space. With Transform Objects off, the effects before it keep their distances too. Before, Scale Strokes & Effects scaled a fill's or stroke's later effects by the mean scale, so existing documents with such effects draw differently. Effects apply in the order they are listed ([Appearance attributes](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/apply-graphic-styles/appearance-attributes-in-illustrator.html)); how the two options treat the effects after a fill's or stroke's own Transform effect is VectorCraft's own rule, following that order (effects `tests::rasterfollow::a_fills_own_transform_leaves_the_shadow_after_it`, `tests::rasterfollow::a_fills_own_transform_leaves_the_offset_after_it`, `tests::rasterfollow::a_fills_own_transform_leaves_the_svg_filter_after_it`, `tests::transformfx::a_fills_own_transform_with_scale_strokes_and_effects_leaves_its_later_effects`; engine `plugins::a_transform_after_a_painted_fill_effect_leaves_the_later_shadow_on_every_paint`). Public reference: [Scale objects](https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/scale-objects.html), [How to apply effects](https://helpx.adobe.com/illustrator/using/effects.html), [Distort and transform effects](https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/distort-and-transform-effects-in-illustrator.html). Scores and hours unchanged.