Skip to content

Import object categories from files and WoRMS - #1983

Merged
BryonLewis merged 7 commits into
mainfrom
dev/import-category-files
Sep 25, 2026
Merged

BryonLewis merged 7 commits into
mainfrom
dev/import-category-files

Conversation

@mattdawkins

@mattdawkins mattdawkins commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Add shared desktop/web object-category imports from COCO/VIAME JSON, TXT, CSV, pasted lists, and WoRMS. Imports validate additive hierarchy changes before applying them and preserve imported WoRMS source records when saving.

WoRMS supports paginated name search, child browsing, accepted-name resolution, and optional taxonomic parents. Add on WoRMS stages the selection on File or pasted list alongside pending categories; Add there confirms the import. Hierarchy previews show parent → child. Native browser fetch is wrapped to preserve its required receiver.

Keep the type settings popup readable and close it before opening the import dialog. Bound the bottom type list with flex layout, prevent reactive props from unwrapping the filter controller’s internal refs, and reveal imported unused types after confirmation.

Validation: 194 relevant import, hierarchy, and filter tests pass, with ESLint, TypeScript, and desktop/web production builds. An Electron browser check exercised the settings popup, staging without mutation, final confirmation, and a visible, scrollable bottom hierarchy list afterward. Live Electron WoRMS search and parent retrieval also passed. Tests cover two-step confirmation, preserving pending categories, hierarchy conflicts, arrows, read-only behavior, and importing a hierarchy through reactive panel props.

@BryonLewis
BryonLewis self-requested a review September 25, 2026 18:55
BryonLewis
BryonLewis previously approved these changes Sep 25, 2026

@BryonLewis BryonLewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Compact WoRMS synonym feedback — synonyms resolve into a summary (“N synonyms → M accepted names”) with optional expandable details, instead of one alert per remap.
  • Multi-accepted synonym warning — if one original name maps to multiple accepted taxa, show a single warning listing those targets.
  • Staged hierarchy tree preview — review page shows an indented parent/child tree (with ranks when from WoRMS) instead of a flat name + edge list.
  • Remove types before applying — pruning a staged type drops it and unused parents above it; children become roots; shared ancestors used by other branches are kept.
  • Prune keeps synonym UI in sync — removing a staged accepted name also drops its synonym remaps and multi-accepted warnings so the preview doesn’t mention taxa that are no longer staged.
  • Docs — Import-Categories.md updated for the tree preview and prune-before-Add behavior.

@BryonLewis
BryonLewis merged commit 49ceed8 into main Sep 25, 2026
3 checks passed
@BryonLewis
BryonLewis deleted the dev/import-category-files branch September 25, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants