Skip to content

feat: consistent sorting for spaces and resources - #3432

Merged
AlexAndBear merged 9 commits into
mainfrom
fix/spaces-sort-by-status
Sep 23, 2026
Merged

AlexAndBear merged 9 commits into
mainfrom
fix/spaces-sort-by-status

Conversation

@AlexAndBear

@AlexAndBear AlexAndBear commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Description

Makes spaces sortable by status (enabled / disabled) and makes the sort options for spaces and resources consistent.

  • Status column is sortable in the files spaces table and the admin settings spaces list, sorted by enabled/disabled state instead of the label
  • Separate sort fields for resources and spaces, for both table (resourceTableSortFields, spaceTableSortFields, chosen by resource type) and tiles (resourceTilesSortFields, spaceTilesSortFields)
  • Space tiles: added "Enabled first" / "Disabled first", both directions for quotas and members, removed "Largest" / "Smallest" (a space's size equals its used quota)
  • Renamed "Newest" / "Oldest" to "Recently modified" / "Least recently modified", since they sort by modification date
  • Tile sort options follow the column order of the corresponding table
  • Search tiles view offers all available sort options instead of only A-Z / Z-A

The sortFields export of web-pkg is deprecated in favor of resourceTilesSortFields and spaceTilesSortFields.

Related Issue

  • Fixes <issue_link>

How Has This Been Tested?

  • test environment: unit tests (Vitest)
  • test case 1: sorting spaces by status ascending/descending
  • test case 2: status column is sortable for spaces but not for files in the resource table
  • test case 3: search tiles view receives all available sort fields
  • test case 4: existing sorting tests for resource tiles, spaces table and admin settings spaces list

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear AlexAndBear self-assigned this Sep 23, 2026
@AlexAndBear
AlexAndBear requested review from JammingBen and a lite review from Copilot September 23, 2026 08:19
@github-project-automation github-project-automation Bot moved this to Qualification in OpenCloud Team Board Sep 23, 2026
@AlexAndBear AlexAndBear moved this from Qualification to In Progress in OpenCloud Team Board Sep 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Synchronize table and tile sort fields and provide a user-facing accessible label for Status.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds sortable Status columns for spaces, ordering enabled spaces before disabled ones in files and admin settings.

Changes:

  • Adds shared status sorting based on disabled.
  • Enables sorting for space tables only.
  • Adds unit tests and updates snapshots.
File Summary
packages/​web-pkg/​tests/​unit/​composables/​sort/​useSort.spec.ts Tests enabled/disabled status ordering.
packages/​web-pkg/​tests/​unit/​components/​FilesList/​ResourceTable.spec.ts Tests sortable status behavior by resource type.
packages/​web-pkg/​src/​helpers/​ui/​resourceTable.ts Defines shared status sorting; the control needs a user-facing accessible label.
packages/​web-pkg/​src/​components/​FilesList/​ResourceTable.vue Enables status sorting for spaces only.
packages/​web-app-files/​tests/​unit/​views/​spaces/​__snapshots__/​Projects.spec.ts.snap Updates the files spaces snapshot.
packages/​web-app-files/​src/​views/​spaces/​Projects.vue Adds status sorting; table-to-tile sort fields need synchronization.
packages/​web-app-admin-settings/​tests/​unit/​components/​Spaces/​__snapshots__/​SpacesList.spec.ts.snap Updates the admin spaces snapshot.
packages/​web-app-admin-settings/​src/​components/​Spaces/​SpacesList.vue Adds status sorting to admin spaces.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@AlexAndBear
AlexAndBear marked this pull request as draft September 23, 2026 08:29
@AlexAndBear AlexAndBear changed the title fix: make spaces sortable by status fix: consistent sorting for spaces and resources Sep 23, 2026
@AlexAndBear
AlexAndBear marked this pull request as ready for review September 23, 2026 08:53
@AlexAndBear
AlexAndBear merged commit 3a5bfbc into main Sep 23, 2026
31 checks passed
@AlexAndBear
AlexAndBear deleted the fix/spaces-sort-by-status branch September 23, 2026 12:57
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenCloud Team Board Sep 23, 2026
@openclouders openclouders mentioned this pull request Sep 23, 2026
1 task
@AlexAndBear AlexAndBear changed the title fix: consistent sorting for spaces and resources feat: consistent sorting for spaces and resources Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants