Repository navigation
refactor(engine): Add Data's list of formats that ask copy-or-link lives in asks_link (#2976) - #2983
Conversation
…ves in asks_link (opengeos#2976) link_choice and the dialog's links() both decide by asks_link, so a format added to the sources is asked about and answered with no second edit. asks_link keeps the dialog's suffix rule on the path as given (the dialog trims what was typed); no behaviour change for what the dialog asks about.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewScope: 2 files, a refactor that moves Add Data's copy-or-link format list into Bugs
Security
Performance
Quality
AGENTS.md
Prior reviews
Change sizeCompared with the base branch (merge base 7331389 to PR head eaa2c43).
The stats are not truncated. |
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Summary
Add Data's list of formats that ask copy-or-link now lives in one place. The engine exposes
asks_link(path)next tolink_choice;link_choicereturnsNonewhen it says no and decides the rest by it, and the dialog'slinks()calls it (on the trimmed path, as before) instead of keeping its own list of extensions. A format added todata::source::EXTENSIONSis asked about with no edit in the dialog.No behaviour change for what the dialog asks about today:
.geojson,.shp,.gpkg,.parquet,.geoparquet,.fgb.asks_linkkeeps the dialog's suffix rule, so the only engine-side difference is for paths no dialog sends:link_choice("data.parquet/")now answers nothing instead of a question.Surfaces: the desktop Add Data question is unchanged; the browser never asks (
links()stays false onwasm32); the command line and Python never ask ("link": trueis only sent by the dialog). No command, parameter, saved data or undo step changes, so the command snapshot, the schema and the undo rules don't apply.Testing
asks_link_names_the_formats_read_in_place(the six extensions ask, in upper case;.json,.las,.laz,.csv,.kml,.tif, no extension, an empty path, a trailing separator and a path with spaces don't),asks_link_follows_the_source_extensions(every non-LiDAR source extension asks),link_choice_asks_where_asks_link_doesincrates/engine/src/cmd/layer.rs;the_dialog_asks_by_the_engines_list_of_formatsinlayerchooser.rs(a typed path with spaces and capitals still asks).checks.shonrustgis-engineandrustgis-ui-egui: fmt, clippy, nextest, doctests, layers andschema --check.UI evidence
No visible UI change.
Related issue
Closes #2976.
Summary by CodeRabbit