-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Introduce reusable GTable component #21635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
davelopez
merged 39 commits into
galaxyproject:dev
from
itisAliRH:init-g-table-component
Jan 30, 2026
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
a5be981
Add GTable component with loading and empty states
itisAliRH c7b67bf
Refactor DatasetList to use GTable component
itisAliRH 0fef8ba
Add configurable sort options and column toggles
itisAliRH 3b3da05
add overlay and load-more loading states
itisAliRH 9176cbb
Add deleteDataset with optional purge flag
itisAliRH 0f1d30c
Add bulk selection, delete actions, and UI controls
itisAliRH fb8c5a9
Replace GTable custom styles with utilities
itisAliRH 70c9bd2
Refactor actions and selection slots in GTable
itisAliRH 8f733ee
Move row actions to GTable and add link navigation
itisAliRH b3def84
Extend TableAction with link props and context
itisAliRH 6936c10
Remove unused dataset name component
itisAliRH f5cccfd
Refactor GTable sorting state and sort event API
itisAliRH ff2f6fa
Remove header sort options and fix query ref usage
itisAliRH b4eef69
Remove unused sort reset prop and clean up types
itisAliRH 6368010
Reorganize props definitions and defaults
itisAliRH 6bd7086
Remove local sorting and use items directly
itisAliRH d6b9817
Reorder refs and computed fields
itisAliRH 211a38e
Add title attribute to action component links
itisAliRH f93778b
Add composable for dataset table actions
itisAliRH 5a304e6
Use useDatasetTableActions composable
itisAliRH 9047c07
Add breadcrumb navigation to dataset list view
itisAliRH 5e69780
Add select-all checkbox and update actions menu UI
itisAliRH 3a1cb09
Add loadDatasets helper with pagination and search
itisAliRH 52b5305
Switch dataset list to paginated loading
itisAliRH e84893c
Replace delete modal with confirm dialog for bulk delete
itisAliRH f9f8dac
Replace dataset error alerts with toast notifications
itisAliRH 19cc91e
Replace Columns text with cog dropdown and group
itisAliRH f081998
Add RowIcon type and remove html field
itisAliRH aa144bd
Add optional row status icon support to GTable
itisAliRH f47c938
Add dataset status icons to list rows
itisAliRH 2e69e7e
Remove history navigation link
itisAliRH c283ac9
Refresh list after copy and delete actions
itisAliRH 48c566b
Clarify switch link title for owned histories
itisAliRH dd79b52
Ensure default sort when no options
itisAliRH ab7baca
Add reset columns action to settings menu
itisAliRH 72a5631
Add reset columns handler to list view
itisAliRH 386b950
Fix compute status icon per row in first cell
itisAliRH 936113e
Update expected tooltip text for switch action
itisAliRH 5b74186
Update sort selector titles to match UI
itisAliRH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| import type { SizeProp } from "@fortawesome/fontawesome-svg-core"; | ||
| import type { IconDefinition } from "@fortawesome/free-solid-svg-icons"; | ||
|
|
||
| import type { BootstrapVariant } from "@/components/Common"; | ||
|
|
||
| /** Bootstrap component sizes */ | ||
| export type BootstrapSize = "xs" | "sm" | "md" | "lg" | "xl"; | ||
|
|
||
| /** Table field sorting order */ | ||
| export type SortOrder = "asc" | "desc"; | ||
|
|
||
| /** Table field alignment options */ | ||
| export type FieldAlignment = "left" | "center" | "right"; | ||
|
|
||
| /** Table field definition */ | ||
| export interface TableField { | ||
| /** Unique key for the field (matches data property name) */ | ||
| key: string; | ||
| /** Display label for the column header */ | ||
| label?: string; | ||
| /** Whether the column is sortable */ | ||
| sortable?: boolean; | ||
| /** Custom CSS classes for the column */ | ||
| class?: string; | ||
| /** Custom CSS classes for the header cell */ | ||
| headerClass?: string; | ||
| /** Custom CSS classes for data cells */ | ||
| cellClass?: string; | ||
| /** Column alignment */ | ||
| align?: FieldAlignment; | ||
| /** Width of the column (CSS value) */ | ||
| width?: string; | ||
| /** Whether to hide the column on small screens */ | ||
| hideOnSmall?: boolean; | ||
| /** Custom formatter function for cell values */ | ||
| formatter?: (value: any, key: string, item: any) => string; | ||
| } | ||
|
|
||
| /** Sort change event payload */ | ||
| export interface SortChangeEvent { | ||
| /** The field key being sorted */ | ||
| sortBy: string; | ||
| /** Whether sorting in descending order */ | ||
| sortDesc: boolean; | ||
| } | ||
|
|
||
| /** Row click event payload */ | ||
| export interface RowClickEvent<T = any> { | ||
| /** The row item data */ | ||
| item: T; | ||
| /** The row index */ | ||
| index: number; | ||
| /** The original mouse/keyboard event */ | ||
| event: MouseEvent | KeyboardEvent; | ||
| } | ||
|
|
||
| /** Row selection event payload */ | ||
| export interface RowSelectEvent<T = any> { | ||
| /** The selected row item */ | ||
| item: T; | ||
| /** The row index */ | ||
| index: number; | ||
| /** Whether the row is now selected */ | ||
| selected: boolean; | ||
| } | ||
|
|
||
| /** Table action button configuration */ | ||
| export interface TableAction { | ||
| /** Unique identifier for the action */ | ||
| id: string; | ||
| /** Display label for the action */ | ||
| label: string; | ||
| /** Tooltip text */ | ||
| title: string; | ||
| /** FontAwesome icon */ | ||
| icon?: IconDefinition; | ||
| /** Bootstrap variant */ | ||
| variant?: BootstrapVariant; | ||
| /** Whether the action is disabled */ | ||
| disabled?: boolean; | ||
| /** Whether the action is visible */ | ||
| visible?: boolean; | ||
| /** Bootstrap component size */ | ||
| size?: BootstrapSize; | ||
| /** Vue Router route to navigate to */ | ||
| to?: string; | ||
| /** Hyperlink reference */ | ||
| href?: string; | ||
| /** Link target attribute */ | ||
| target?: string; | ||
| /** Whether link opens in new tab/window */ | ||
| externalLink?: boolean; | ||
| /** Click handler function */ | ||
| handler?: (item: any, index: number) => void; | ||
| } | ||
|
|
||
| /** Empty state configuration */ | ||
| export interface TableEmptyState { | ||
| /** Message to display when no data */ | ||
| message: string; | ||
| /** Optional icon to display */ | ||
| icon?: IconDefinition; | ||
| /** Bootstrap variant for styling */ | ||
| variant?: BootstrapVariant; | ||
| } | ||
|
|
||
| /** Row status icon configuration */ | ||
| export interface RowIcon { | ||
| /** FontAwesome icon (required) */ | ||
| icon: IconDefinition; | ||
| /** Additional CSS classes */ | ||
| class?: string; | ||
| /** Icon size (FontAwesome SizeProp) */ | ||
| size?: SizeProp; | ||
| /** Tooltip text */ | ||
| title?: string; | ||
| /** Whether icon should spin (loading state) */ | ||
| spin?: boolean; | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.