Import object categories from files and WoRMS - #1983
Merged
Merged
Conversation
mattdawkins
added a commit
that referenced
this pull request
Sep 25, 2026
mattdawkins
added a commit
that referenced
this pull request
Sep 25, 2026
BryonLewis
self-requested a review
September 25, 2026 18:55
BryonLewis
previously approved these changes
Sep 25, 2026
BryonLewis
left a comment
Collaborator
There was a problem hiding this comment.
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.