Repository navigation
Conversation
| refetchQueries: ["VersionTasks"], | ||
| }); | ||
|
|
||
| const [scheduleTasksByFilter] = useMutation< | ||
| ScheduleTasksByFilterMutation, | ||
| ScheduleTasksByFilterMutationVariables | ||
| >(SCHEDULE_TASKS_BY_FILTER, { | ||
| onCompleted: (data) => onCompleted(data.scheduleTasksByFilter), | ||
| onError, | ||
| refetchQueries: ["VersionTasks"], |
There was a problem hiding this comment.
Did you find these to be necessary? You're nicely returning the updated tasks from the mutation so I was wondering if the cache would update itself to avoid another fetch.
| @@ -60,6 +62,7 @@ export const ActionButtons: React.FC<ActionButtonProps> = ({ | |||
| {canRefreshGitHubStatuses && ( | |||
| <RefreshGitHubStatuses versionId={versionId} /> | |||
There was a problem hiding this comment.
I think we had thrown out the idea of moving this into the ... menu where we could also provide a description to make it more usable. Any thoughts there?
| useTaskSelectionContext(); | ||
|
|
||
| return ( | ||
| <MenuRoot> |
There was a problem hiding this comment.
We have a ButtonDropdown component that you could maybe use here? It's being migrated to Via in #2125.
There was a problem hiding this comment.
I'll have to add other things in here so I can update it at some point during that time!
| return ( | ||
| <MenuRoot> | ||
| <Button data-testid="modify-tasks" isDisabled={selectedCount === 0}> | ||
| Modify tasks{selectedCount > 0 && ` (${selectedCount})`} |
There was a problem hiding this comment.
[nit] Tabular nums for the count here? 😁
I think another point in favor of moving "Refresh statuses" is it wouldn't shift when a task is first checked.
| } | ||
| if (taskErrors.length > 0) { | ||
| dispatchToast.warning( | ||
| `Unable to schedule ${taskErrors.length} ${pluralize("task", taskErrors.length)}`, |
There was a problem hiding this comment.
When the existing "Schedule" button is used, we do some checking to prevent a user from taking that action and show it in the modal. With multiselect, I feel like this warning toast is a lot less clear. Do you think there's any way we could provide some more context, or block the action altogether? Happy to discuss this further, I feel like it's an interesting problem.
There was a problem hiding this comment.
added a modal and keep the failed rows selected, let me know what you think of it
| data-testid="schedule-selected-tasks" | ||
| id="schedule-selected-tasks" | ||
| onAction={scheduleTasks} | ||
| textValue="Schedule tasks" |
There was a problem hiding this comment.
Do you know the purpose of this prop? I don't see it in the storybook
There was a problem hiding this comment.
tbh IDK what it does but the Via team was using it 🤷
DEVPROD-44209
Description
Adds support for scheduling selected tasks. Hidden behind the feature flag.
Screenshots
Screen.Recording.2026-11-25.at.12.15.52.PM.mov
Testing