improve behavior and test coverage of export fields#692
Open
marqode wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the shared export wizard UX (used by instance/activity exports) to improve attribute grouping, reorder ergonomics, and test coverage—especially around field grouping metadata and search-driven accordion behaviour.
Changes:
- Reorganized instance export attributes into 8 groups (and expanded the available fields) to improve discoverability.
- Added
groupTitlemetadata to export fields so the reorder step can display a per-row group badge, plus added a reset-to-default ordering action. - Improved the attribute search experience by auto-expanding matching accordion groups, and added/updated tests for the new behaviours.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/features/instances/components/InstancesExportForm/constants.ts | Reworks instance export field groups (new grouping + additional fields). |
| src/features/exports/types/ExportForm.ts | Extends ExportField with optional groupTitle metadata. |
| src/features/exports/components/SortableFieldList/SortableFieldList.tsx | Adds group badges in reorder rows and introduces a reset-order action. |
| src/features/exports/components/SortableFieldList/SortableFieldList.test.tsx | New coverage for badges, reset behaviour, and ordering controls. |
| src/features/exports/components/SortableFieldList/SortableFieldList.module.scss | Layout styles for the new reorder header + reset button. |
| src/features/exports/components/ExportForm/ExportForm.tsx | Adds groupTitle when assembling selected fields and auto-expands groups on search via helper renderer. |
| src/features/exports/components/ExportForm/ExportForm.test.tsx | New integration coverage for wizard flow, search auto-expand, badges, and reset behaviour. |
| src/features/activities/components/ActivitiesExportForm/ActivitiesExportForm.test.tsx | Updates expectation to reflect search-driven auto-expansion (no manual accordion open needed). |
Comment on lines
+523
to
+525
| <i className="p-icon--restart" /> | ||
| <span> Reset order</span> | ||
| </Button> |
Comment on lines
+1
to
+7
| import { | ||
| Button, | ||
| Chip, | ||
| Icon, | ||
| Input, | ||
| ModularTable, | ||
| } from "@canonical/react-components"; |
Comment on lines
+363
to
+370
| {groupTitle && ( | ||
| <Chip | ||
| value={groupTitle} | ||
| isReadOnly | ||
| isDense | ||
| className="u-no-margin--bottom" | ||
| /> | ||
| )} |
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.
Summary
Refactors the Instance Export wizard across several dimensions:
Release Impact
Pick the target branch (see RELEASES.md for the full model):
dev— internal testing → publishes toppa-build-devmain— next beta → publishes toppa-buildrelease/YY.MM— point release on a maintained cycle → publishes toppa-build-YY.MM(and toppa-build-stableif this is the currently-promoted branch). Specify cycle:release/____Change type (tick one):
Checklist
pnpm changeset(orpnpm changeset --emptyif no CHANGELOG line is warranted) and committed the resulting.mdfile. Required for PRs targetingmainandrelease/*; enforced by theChangeset checkworkflow.scripts/).Versioning Reminder
Important
Landscape UI uses CalVer (
YY.MM.Point.Build). Version derivation by branch:main/point/*→YY.MM.0.<run>-betadev→YY.MM.0.<run>-devrelease/YY.MM→YY.MM.1.<run>(cycle pinned by branch name)