Addresses #5 (closed).
JSON is used as the serialization format. The Tiles struct from egui_tiles uses a hash map with integers as keys, this limits the usable formats (e.g. TOML does not support integer keys in maps).
The system-dependent path for storing layouts is derived using eframe::storage_dir(app_id: &str)
:
/home/UserName/.local/share/APP_ID/layouts
/Users/UserName/Library/Application Support/APP_ID/layouts
C:\Users\UserName\AppData\Roaming\APP_ID\data\layouts
The layouts folder is scanned when the layout manager opens, and each file is loaded into a BTreeMap, ensuring keys are ordered (otherwise the layouts could change order in the ui seemingly at random). File names are used as keys. Layouts are displayed in a UI list where users can:
Layouts are compared using the PartialEq
trait.
If the layout manager is open, the directory is rescanned at every ui redraw, and new files are loaded.