Skip to content

Migrate DatasetIndex from BTable to GTable and Add Local Sorting to GTable#21728

Merged
davelopez merged 12 commits intogalaxyproject:devfrom
itisAliRH:btable-to-gtable-dataset-index
Feb 5, 2026
Merged

Migrate DatasetIndex from BTable to GTable and Add Local Sorting to GTable#21728
davelopez merged 12 commits intogalaxyproject:devfrom
itisAliRH:btable-to-gtable-dataset-index

Conversation

@itisAliRH
Copy link
Copy Markdown
Member

This PR migrates DatasetIndex.vue from Bootstrap-Vue's BTable to our custom GTable component, as part of the ongoing effort tracked in #21703.

required #21727

Before After
image image

Summary

  • Migrate DatasetIndex to use GTable.
  • Add local sorting to GTable with new noLocalSorting prop (default false) so sortable columns work out of the box.
  • Add a simple unit test for DatasetIndex.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. Upload a composite dataset
    2. Create/edit a page
    3. Click on Insert Markdown Objects -> History -> Dataset Index and select the composite dataset
    4. Save and view the page

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@itisAliRH itisAliRH changed the title Migrate ExportRecordTable from BTable to GTable and Add Local Sorting to GCard Migrate DatasetIndex from BTable to GTable and Add Local Sorting to GCard Feb 3, 2026
@github-actions github-actions Bot added this to the 26.1 milestone Feb 3, 2026
@itisAliRH itisAliRH added the kind/refactoring cleanup or refactoring of existing code, no functional changes label Feb 3, 2026
Comment thread client/src/components/Dataset/DatasetIndex/DatasetIndex.test.ts Outdated
Comment thread client/src/components/Dataset/DatasetIndex/DatasetIndex.test.ts Outdated
Comment thread client/src/components/Dataset/DatasetIndex/DatasetIndex.test.ts Outdated
Comment thread client/src/components/Dataset/DatasetIndex/DatasetIndex.test.ts Outdated
Comment thread client/src/components/Dataset/DatasetIndex/DatasetIndex.test.ts Outdated
Comment thread client/src/components/Dataset/DatasetIndex/DatasetIndex.test.ts Outdated
Comment thread client/src/components/Dataset/DatasetIndex/DatasetIndex.test.ts Outdated
@itisAliRH itisAliRH force-pushed the btable-to-gtable-dataset-index branch from 2a9f986 to e4bf353 Compare February 4, 2026 13:50
itisAliRH and others added 11 commits February 4, 2026 15:06
- Add noLocalSorting prop (default: false) to enable/disable local sorting
- Implement local sorting logic that sorts items by the selected column
- Support string, number, and mixed type comparisons with localeCompare
- Handle null/undefined values properly in sorting
- Apply field formatters before comparison if available
- When noLocalSorting=true, emit sort-changed event only (current behavior)
- When noLocalSorting=false, sort items locally and emit event
- Replace b-table with GTable component
- Add TableField type import for proper typing
- Add CSS to hide table header using scoped styles and :deep()
- Update fields definition with proper type annotation
- Maintain backward compatibility with directory listing display

ref galaxyproject#21703
- Add tests for table rendering with valid dataset content
- Add tests for error states (not composite, not directory, not found)
- Add test for fields configuration
- Add test for subdirectory filtering
- Ensure error messages display without table rendering
- Mock datasetPathDestination composable and computedAsync
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
@itisAliRH itisAliRH force-pushed the btable-to-gtable-dataset-index branch from e4bf353 to 9cc2a21 Compare February 4, 2026 14:06
Change prop from negative to positive naming convention for better
readability. The prop now defaults to true (local sorting enabled)
and uses positive boolean logic instead of double negatives.
Copy link
Copy Markdown
Contributor

@davelopez davelopez left a comment

Choose a reason for hiding this comment

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

Thank you!

@davelopez davelopez merged commit f017677 into galaxyproject:dev Feb 5, 2026
28 of 32 checks passed
@itisAliRH itisAliRH deleted the btable-to-gtable-dataset-index branch February 5, 2026 09:49
@itisAliRH itisAliRH changed the title Migrate DatasetIndex from BTable to GTable and Add Local Sorting to GCard Migrate DatasetIndex from BTable to GTable and Add Local Sorting to GTable Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/UI-UX kind/refactoring cleanup or refactoring of existing code, no functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants