feat(DT-3657): Support shift click for bulk selection in workflow table#3344
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
82757c2 to
b865fe8
Compare
69c00bd to
4a645c6
Compare
| > | ||
| <slot name="cloud" slot="cloud" /> | ||
| </WorkflowsSummaryConfigurableTable> | ||
| {cloud} |
There was a problem hiding this comment.
This change requires a small update in cloud-ui to pass in a snippet instead of a slot
There was a problem hiding this comment.
We'll just want to make sure we have a commit ready to add to the generated Cloud release PR that updates this.
laurakwhit
left a comment
There was a problem hiding this comment.
This is looking great ⌨️ 🎉 Nothing major, but a few things to clarify.
| > | ||
| <slot name="cloud" slot="cloud" /> | ||
| </WorkflowsSummaryConfigurableTable> | ||
| {cloud} |
There was a problem hiding this comment.
We'll just want to make sure we have a commit ready to add to the generated Cloud release PR that updates this.
| data-track-name="checkbox" | ||
| data-track-intent="toggle" | ||
| data-track-text={label} | ||
| bind:checked |
There was a problem hiding this comment.
Should this no longer be bind:checked (and instead just be {checked}) since it's computed from $selectedWorkflows?
There was a problem hiding this comment.
Other uses of holocene checkbox might want to bind to checked
laurakwhit
left a comment
There was a problem hiding this comment.
Two small comments r.e. keyed by (column), but otherwise 🚀
|
|
||
| inFlightChildRequests.add(workflow.runId); | ||
| try { | ||
| const children = await fetchAllChildWorkflows( |
There was a problem hiding this comment.
Perhaps out of scope for this PR and probably not causing any bugs atm, but wondering what you think about having some kind of AbortSignal for fetchAllChildWorkflows. Seems like it might be possible to expand, collapse, and then expand child workflows again before the first fetch has resolved.
There was a problem hiding this comment.
yeah an abort signal would be nice. I didn't want to go down that rabbit hole for this PR though.
Co-authored-by: Laura Whitaker <laura.k.whitaker@gmail.com>
…le (#3344) * Fix eslint warning * Migrate to Svelte 5 syntax * Add multiselect via shift key * Clear prev index after page selected or all selected trigger * Make onClickBatchSelect optional, disable checkbox if child * Do not set child disabled * Support shift+click select within child workflows * Update shift+click logic. Instead of multiple scopes, treat all visible items as one scope. * Remove console log * Fixup type * Add tests * Account for prevClickedRow being nullish * Fix type * Fix some warnings * Fix type * Fix type for onClickBatchSelect * Fix type check * Use early return * More warning fixes * Undo prop type change * Fix warning * Default query to empty string * Move comment to inside handler :\ * Move isChecked higher * Fix race condition * Fix the fix :P * Use runId as key * use runId for check * Show root rows as checked if allSelected * Use map instead of set so we rely on runId for equality * Fix header checkmark status * Address PR comments * Apply suggestions from code review Co-authored-by: Laura Whitaker <laura.k.whitaker@gmail.com> --------- Co-authored-by: Laura Whitaker <laura.k.whitaker@gmail.com>
* Enable Svelte 5 runes on files not using legacy features * Migrate components to Svelte 5 runes syntax * Trivial migrations * More simple migrations * feat(DT-3657): Support shift click for bulk selection in workflow table (#3344) * Fix eslint warning * Migrate to Svelte 5 syntax * Add multiselect via shift key * Clear prev index after page selected or all selected trigger * Make onClickBatchSelect optional, disable checkbox if child * Do not set child disabled * Support shift+click select within child workflows * Update shift+click logic. Instead of multiple scopes, treat all visible items as one scope. * Remove console log * Fixup type * Add tests * Account for prevClickedRow being nullish * Fix type * Fix some warnings * Fix type * Fix type for onClickBatchSelect * Fix type check * Use early return * More warning fixes * Undo prop type change * Fix warning * Default query to empty string * Move comment to inside handler :\ * Move isChecked higher * Fix race condition * Fix the fix :P * Use runId as key * use runId for check * Show root rows as checked if allSelected * Use map instead of set so we rely on runId for equality * Fix header checkmark status * Address PR comments * Apply suggestions from code review Co-authored-by: Laura Whitaker <laura.k.whitaker@gmail.com> --------- Co-authored-by: Laura Whitaker <laura.k.whitaker@gmail.com> * Delete unused file --------- Co-authored-by: Laura Whitaker <laura.k.whitaker@gmail.com>
Description & motivation 💭
The workflow table supports selecting multiple workflows in order to perform batch actions on the selections. Right now, you can either select all workflows, the entire page of workflows, or individual workflows (one at a time).
A common pattern is to allow multi select by selecting an item, pressing (and holding shift key), and selecting another item. All items between the two (including the two) will either be selected or deselected based on the selection state of the item.
Screenshots (if applicable) 📸
Screen.Recording.2026-04-24.at.12.59.20.PM.mov
Holding shift key after having selected or deselected a workflow, all workflows between the previously clicked workflow and the next clicked workflow will be selected (if the next clicked workflow is currently unselected) or deselected (if the next clicked workflow is currently selected).
Screen.Recording.2026-04-24.at.1.05.55.PM.mov
Clear memory of prev clicked workflow when selected or deselecting all or page. (It's not intuitive to maintain the index after making a different bulk selection change).
Screen.Recording.2026-04-27.at.12.05.08.PM.mov
There is a single shift+click scope.
Design Considerations 🎨
N/A (no visual change)
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
DT-3657
Docs
Any docs updates needed?