Skip to content

feat(DT-3657): Support shift click for bulk selection in workflow table#3344

Merged
tegan-temporal merged 34 commits intocodefreeze-05.01.26from
DT-3657-support-shift-click-for-bulk-selection-in-table
May 2, 2026
Merged

feat(DT-3657): Support shift click for bulk selection in workflow table#3344
tegan-temporal merged 34 commits intocodefreeze-05.01.26from
DT-3657-support-shift-click-for-bulk-selection-in-table

Conversation

@tegan-temporal
Copy link
Copy Markdown
Contributor

@tegan-temporal tegan-temporal commented Apr 24, 2026

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.

  • Children that are not visible are ignored by the shift+click scope.
  • Children that are collapsed are deselected.
  • All visible children are in the same shift+click scope as the parents (selection range does not have parent/child boundaries).

Design Considerations 🎨

N/A (no visual change)

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

  • Go to page with workflow summary table
  • Select a workflow
  • Press and hold shift key
  • Select a different workflow
  • See that all workflows within the range are now selected.

Checklists

Draft Checklist

  • Figure out if child workflows need to be supported and if so, how.

Merge Checklist

Issue(s) closed

DT-3657

Docs

Any docs updates needed?

@tegan-temporal tegan-temporal self-assigned this Apr 24, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment May 2, 2026 0:06am

Request Review

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 24, 2026

CLA assistant check
All committers have signed the CLA.

@temporal-cicd
Copy link
Copy Markdown
Contributor

temporal-cicd Bot commented Apr 24, 2026

Warnings
⚠️

📊 Strict Mode: 4 errors in 2 files (0.4% of 990 total)

src/lib/holocene/checkbox.svelte (3)
  • L33:13: Type 'undefined' is not assignable to type 'T'.
  • L34:13: Type 'undefined' is not assignable to type 'T[]'.
  • L13:12: Argument of type '$$Props' is not assignable to parameter of type '{ id?: string | undefined; checked?: boolean | undefined; label?: string | undefined; labelHidden?: boolean | undefined; indeterminate?: boolean | undefined; disabled?: boolean | undefined; ... 5 more ...; class?: string | undefined; }'.
src/lib/components/workflow/workflows-summary-configurable-table/table-row.svelte (1)
  • L82:10: Type 'string | undefined' is not assignable to type 'string'.

Generated by 🚫 dangerJS against fa8c671

@tegan-temporal tegan-temporal force-pushed the DT-3657-support-shift-click-for-bulk-selection-in-table branch from 82757c2 to b865fe8 Compare April 27, 2026 20:42
@tegan-temporal tegan-temporal marked this pull request as ready for review April 27, 2026 20:57
@tegan-temporal tegan-temporal requested a review from a team as a code owner April 27, 2026 20:57
@tegan-temporal tegan-temporal force-pushed the DT-3657-support-shift-click-for-bulk-selection-in-table branch from 69c00bd to 4a645c6 Compare April 28, 2026 15:02
Comment thread src/lib/holocene/checkbox.svelte
Comment thread src/lib/holocene/checkbox.svelte
Comment thread src/lib/holocene/checkbox.svelte
Comment thread src/lib/pages/workflows-with-new-search.svelte
Comment thread src/lib/pages/workflows-with-new-search.svelte
>
<slot name="cloud" slot="cloud" />
</WorkflowsSummaryConfigurableTable>
{cloud}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change requires a small update in cloud-ui to pass in a snippet instead of a slot

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We'll just want to make sure we have a commit ready to add to the generated Cloud release PR that updates this.

Comment thread src/lib/components/workflow/workflows-summary-configurable-table.svelte Outdated
Comment thread src/lib/components/workflow/workflows-summary-configurable-table/table-row.svelte Outdated
Copy link
Copy Markdown
Collaborator

@laurakwhit laurakwhit left a comment

Choose a reason for hiding this comment

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

This is looking great ⌨️ 🎉 Nothing major, but a few things to clarify.

Comment thread src/lib/holocene/checkbox.svelte
>
<slot name="cloud" slot="cloud" />
</WorkflowsSummaryConfigurableTable>
{cloud}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We'll just want to make sure we have a commit ready to add to the generated Cloud release PR that updates this.

Comment thread src/lib/components/workflow/workflows-summary-configurable-table.svelte Outdated
Comment thread src/lib/components/workflow/workflows-summary-configurable-table.svelte Outdated
Comment thread src/lib/components/workflow/workflows-summary-configurable-table.svelte Outdated
Comment thread src/lib/components/workflow/workflows-summary-configurable-table/table-row.svelte Outdated
data-track-name="checkbox"
data-track-intent="toggle"
data-track-text={label}
bind:checked
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this no longer be bind:checked (and instead just be {checked}) since it's computed from $selectedWorkflows?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Other uses of holocene checkbox might want to bind to checked

Comment thread src/lib/components/workflow/workflows-summary-configurable-table.svelte Outdated
@tegan-temporal tegan-temporal changed the base branch from main to codefreeze-05.01.26 May 1, 2026 16:33
Copy link
Copy Markdown
Collaborator

@laurakwhit laurakwhit left a comment

Choose a reason for hiding this comment

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

Two small comments r.e. keyed by (column), but otherwise 🚀

Comment thread src/lib/components/workflow/workflows-summary-configurable-table.svelte Outdated
Comment thread src/lib/components/workflow/workflows-summary-configurable-table.svelte Outdated

inFlightChildRequests.add(workflow.runId);
try {
const children = await fetchAllChildWorkflows(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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>
@tegan-temporal tegan-temporal merged commit b458e11 into codefreeze-05.01.26 May 2, 2026
13 of 15 checks passed
@tegan-temporal tegan-temporal deleted the DT-3657-support-shift-click-for-bulk-selection-in-table branch May 2, 2026 00:08
tegan-temporal added a commit that referenced this pull request May 4, 2026
…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>
tegan-temporal added a commit that referenced this pull request May 4, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants