Prefer pilot.json for Canvas Pilot projects
This commit is contained in:
parent
9ae5271569
commit
05a1cef556
|
|
@ -67,7 +67,7 @@ pub fn parse_values(text: &str) -> Result<ImportDocument, String> {
|
|||
return crate::geometry_formats::parse_json(text);
|
||||
}
|
||||
return Err(
|
||||
"This JSON is not a geometry exchange. Use Open project for .capi.json files (or legacy .midra.json projects).".into(),
|
||||
"This JSON is not a geometry exchange. Use Open project for .pilot.json files (or legacy .midra.json projects).".into(),
|
||||
);
|
||||
}
|
||||
if crate::geometry_formats::looks_like_csv(text) {
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ impl Editor {
|
|||
Ok(contents) => {
|
||||
if let Some(path) = rfd::FileDialog::new()
|
||||
.add_filter("Canvas Pilot project", &["json"])
|
||||
.set_file_name("layout.capi.json")
|
||||
.set_file_name("layout.pilot.json")
|
||||
.save_file()
|
||||
{
|
||||
self.queue_write(path, contents);
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ fn exported_svg_roundtrips_rounded_geometry_including_full_screen_layers() {
|
|||
}
|
||||
#[test]
|
||||
fn publication_requires_overwrite_and_read_matches_written_document() {
|
||||
for filename in ["layout.capi.json", "layout.midra.json"] {
|
||||
for filename in ["layout.pilot.json", "layout.capi.json", "layout.midra.json"] {
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
let path = dir.path().join(filename);
|
||||
let p = Project::from_layout(&Layout::default());
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
- New project saves suggest `.capi.json` (Canvas Pilot). Existing `.midra.json`
|
||||
- New project saves suggest `.pilot.json` (Canvas Pilot). Existing `.capi.json` and `.midra.json`
|
||||
projects remain readable and are not renamed automatically. Updated the manual
|
||||
and checked read/write and overwrite protection with both filenames; JSON
|
||||
and checked read/write and overwrite protection with all three filenames; JSON
|
||||
contents and schema version are unchanged.
|
||||
|
||||
- Added user-guide feature matrices for all eleven exchange formats, project saves
|
||||
|
|
|
|||
|
|
@ -139,10 +139,10 @@ user confirmed actual draw.io copy/paste working on 2026-11-15.
|
|||
## Save, open and export
|
||||
|
||||
Use the **Project** toolbar menu to **Save project…** or **Open project…**.
|
||||
Existing `.midra.json` projects still open normally and are not renamed
|
||||
automatically. **Save project…** suggests a `.capi.json` name.
|
||||
Existing `.capi.json` and `.midra.json` projects still open normally and are not renamed
|
||||
automatically. **Save project…** suggests a `.pilot.json` name.
|
||||
|
||||
Projects use readable, versioned `.capi.json` files and preserve applied output,
|
||||
Projects use readable, versioned `.pilot.json` files and preserve applied output,
|
||||
inputs, layer bounds/crops, source assignments, locks, visibility, selection,
|
||||
viewport preferences, and all embedded reference images. Apply pending edits
|
||||
before saving. Opening asks before replacing current work and starts a fresh
|
||||
|
|
@ -171,7 +171,7 @@ are supported. SVG rendered by draw.io Desktop is recognized through its retaine
|
|||
cell IDs; generated HTML labels and raster text fallbacks are ignored. Draw.io
|
||||
may crop and rebase that SVG unless the exported diagram includes the background
|
||||
layer. These exports round-trip whole-pixel visible-box geometry, not
|
||||
source/crop settings; the separate `.capi.json` project format preserves the full project. See the
|
||||
source/crop settings; the separate `.pilot.json` project format preserves the full project. See the
|
||||
[geometry exchange contract and native draw.io checks](../../interfaces/canvas-pilot-exchange.md)
|
||||
and [project save contract](../../interfaces/canvas-pilot.md).
|
||||
|
||||
|
|
@ -383,5 +383,5 @@ service. A missing converter produces an error without changing the project.
|
|||
Use SVG if you do not want to install or configure the converter.
|
||||
|
||||
AI exchanges layer geometry and optional artwork, not the complete editor project.
|
||||
Use a `.capi.json` project to preserve all settings. See the
|
||||
Use a `.pilot.json` project to preserve all settings. See the
|
||||
[AI format contract and round-trip checks](../../interfaces/canvas-pilot-exchange.md#illustrator-ai).
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ and layer labels can help identify the boxes; they do not rename destinations.
|
|||
|
||||
| File | Import | Export | Layer names in export | Background picture | Crop/mask preview pictures | Extra settings snapshot |
|
||||
| --- | :---: | :---: | :---: | :---: | :---: | :---: |
|
||||
| Canvas Pilot project (`.capi.json`) | ☑* | ☑* | ☑ | ☑* | ☑* | ☑* |
|
||||
| Canvas Pilot project (`.pilot.json`) | ☑* | ☑* | ☑ | ☑* | ☑* | ☑* |
|
||||
| SVG (`.svg`) | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ |
|
||||
| draw.io (`.drawio`, XML) | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ |
|
||||
| Geometry JSON (`.json`) | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ |
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ You can skip this step if you only need rectangle positions.
|
|||
## 4. Save the editable project
|
||||
|
||||
Apply any pending property edits, then choose **Project → Save project…** and
|
||||
save as `first-layout.capi.json`. This is the file to reopen when you want to continue
|
||||
save as `first-layout.pilot.json`. This is the file to reopen when you want to continue
|
||||
editing: it retains the project, including source/crop settings and reference images.
|
||||
|
||||
Use **Project → Open project…** to load it later.
|
||||
|
|
@ -62,7 +62,7 @@ Choose **Project → Export → Export layers…**, select **SVG** and **All lay
|
|||
and save the export. For plain layer boxes, leave the background and placeholder
|
||||
pictures disabled. The SVG can be opened in a vector editor.
|
||||
|
||||
Keep the `.capi.json` project as well: a geometry export does not retain all editor
|
||||
Keep the `.pilot.json` project as well: a geometry export does not retain all editor
|
||||
settings. The [starter-file catalog](../../templates/canvas-pilot/catalog.md) has
|
||||
matching layouts in every supported format if you prefer to start in another app.
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ See [formats and crop](guide/formats-and-crop.md) and
|
|||
|
||||
## Save, exchange or send a layout
|
||||
|
||||
- **Save your work:** use **Project → Save project…** for a `.capi.json` file
|
||||
- **Save your work:** use **Project → Save project…** for a `.pilot.json` file
|
||||
that retains the full editor project.
|
||||
- **Work with another application:** drop a supported geometry file into the window,
|
||||
use **Import → Geometry file…**, or **Project → Export → Export layers…**. The [starter-file catalog](../templates/canvas-pilot/catalog.md)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ examples and tests in the same change as any save/export schema change.
|
|||
|
||||
## Project JSON, version 15
|
||||
|
||||
Suggested filename: `layout.capi.json`. Legacy `.midra.json` projects remain
|
||||
readable through **Open project**; both names contain the same JSON representation.
|
||||
Suggested filename: `layout.pilot.json`. Earlier `.capi.json` and legacy `.midra.json` projects remain
|
||||
readable through **Open project**; all names contain the same JSON representation.
|
||||
The file dialog accepts `.json`, and validation uses file contents rather than the
|
||||
filename. **Save project…** suggests the new name and lets the user choose the path;
|
||||
existing files are not renamed automatically. This filename change requires no schema migration.
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ CLI to import or export them. See [AI setup](../../canvas-pilot/guide/files.md#i
|
|||
These files exchange visible layer boxes. They do not store the complete editor
|
||||
state, source assignments, crop settings or device links. In particular, the
|
||||
`.json` starter is **geometry JSON**, not a saved Midra project. Use **Project →
|
||||
Save project…** for a full `.capi.json` project; see the
|
||||
Save project…** for a full `.pilot.json` project; see the
|
||||
[project format](../../interfaces/canvas-pilot.md). Versioned schema and migration
|
||||
examples stay beside their [interface contracts](../../interfaces/README.md).
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue