From 6fb31a44624bb1f69f93e55cd3701c6c9b037dc2 Mon Sep 17 00:00:00 2001 From: minnakt <47064971+minnakt@users.noreply.github.com> Date: Fri, 30 Aug 2024 09:46:10 -0400 Subject: [PATCH] DEVPROD-1062: Enable jsx-sort-props rule in Spruce (#349) --- apps/parsley/.eslintrc.cjs | 1 - apps/spruce/src/App.tsx | 4 +- .../spruce/src/components/Accordion/index.tsx | 8 +- .../Banners/SlackNotificationBanner.tsx | 12 +- .../src/components/Breadcrumbs/index.tsx | 6 +- apps/spruce/src/components/ButtonDropdown.tsx | 14 +- .../src/components/Buttons/PlusButton.tsx | 2 +- .../src/components/Checkbox/CheckboxGroup.tsx | 8 +- .../src/components/CodeChanges/index.tsx | 10 +- .../src/components/CodeChangesTable/index.tsx | 6 +- .../CommitChartLabel.test.tsx | 8 +- .../src/components/CommitChartLabel/index.tsx | 6 +- .../ConditionalWrapper.test.tsx | 2 +- apps/spruce/src/components/Content/Layout.tsx | 4 +- apps/spruce/src/components/Content/index.tsx | 82 +++---- .../spruce/src/components/DayPicker/index.tsx | 2 +- .../src/components/Dropdown/Dropdown.test.tsx | 2 +- apps/spruce/src/components/Dropdown/index.tsx | 2 +- .../EditableTagField.stories.tsx | 2 +- .../EditableTagField.test.tsx | 10 +- .../components/EditableTagField/TagRow.tsx | 18 +- .../src/components/EditableTagField/index.tsx | 14 +- .../ErrorHandling/ErrorFallback.tsx | 2 +- apps/spruce/src/components/Feedback/index.tsx | 6 +- .../FilterBadges/FilterBadges.stories.tsx | 10 +- .../FilterBadges/FilterBadges.test.tsx | 16 +- .../components/FilterBadges/SeeMoreModal.tsx | 6 +- .../src/components/FilterBadges/index.tsx | 8 +- .../useFilterBadgeQueryParams.test.tsx | 2 +- .../components/FilterInputControls/index.tsx | 4 +- .../GroupedTaskStatusBadge.stories.tsx | 6 +- .../GroupedTaskStatusBadge.test.tsx | 10 +- .../GroupedTaskStatusBadge/index.tsx | 16 +- .../Header/NavDropdown/NavDropdown.test.tsx | 8 +- .../components/Header/NavDropdown/index.tsx | 6 +- apps/spruce/src/components/Header/Navbar.tsx | 14 +- .../HistoryTable/Cell/Cell.test.tsx | 16 +- .../components/HistoryTable/Cell/index.tsx | 8 +- .../HistoryTable/ColumnPaginationButtons.tsx | 8 +- .../HistoryTable/HistoryTable.stories.tsx | 2 +- .../components/HistoryTable/HistoryTable.tsx | 18 +- .../HistoryTableIcon.stories.tsx | 6 +- .../HistoryTableIcon.test.tsx | 4 +- .../HistoryTable/HistoryTableIcon/index.tsx | 8 +- .../FoldedCommit/FoldedCommit.test.tsx | 8 +- .../BaseRow/FoldedCommit/index.tsx | 8 +- .../HistoryTableRow/BaseRow/index.tsx | 6 +- .../HistoryTableTestSearch.stories.tsx | 2 +- .../HistoryTableTestSearch.tsx | 10 +- .../LoadingSection/LoadingRow/index.tsx | 2 +- .../src/components/HostStatusBadge/index.tsx | 2 +- .../src/components/Hosts/HostPopover.tsx | 12 +- .../src/components/Hosts/Reprovision.tsx | 4 +- .../src/components/Hosts/RestartJasper.tsx | 4 +- .../components/Hosts/UpdateStatusModal.tsx | 18 +- .../src/components/Icon/icons/index.tsx | 74 +++--- .../src/components/IconTooltip/index.tsx | 2 +- .../src/components/LinkToReconfigurePage.tsx | 4 +- .../Loading/PatchAndTaskFullPageLoad.tsx | 6 +- apps/spruce/src/components/MetadataCard.tsx | 4 +- .../src/components/Notifications/index.tsx | 10 +- .../PageSizeSelector.stories.tsx | 2 +- .../PageSizeSelector.test.tsx | 2 +- .../src/components/PageSizeSelector/index.tsx | 6 +- .../components/Pagination/Pagination.test.tsx | 24 +- .../src/components/Pagination/index.tsx | 12 +- .../PatchActionButtons/AddNotification.tsx | 4 +- .../PatchActionButtons/EnqueuePatch.tsx | 4 +- .../PatchActionButtons/RestartPatch.tsx | 10 +- .../ScheduleTasks/index.tsx | 2 +- .../ScheduleUndispatchedBaseTasks.tsx | 2 +- .../PatchActionButtons/UnscheduleTasks.tsx | 2 +- .../ListArea/PatchCard/DropdownMenu.tsx | 18 +- .../PatchesPage/ListArea/PatchCard/index.tsx | 18 +- .../components/PatchesPage/ListArea/index.tsx | 4 +- .../PatchesPage/RequesterSelector.tsx | 10 +- .../components/PatchesPage/StatusSelector.tsx | 4 +- .../src/components/PatchesPage/index.tsx | 14 +- .../PerfPlugin/TrendChartsPlugin.tsx | 2 +- .../components/Popconfirm/Popconfirm.test.tsx | 8 +- .../src/components/Popconfirm/index.tsx | 12 +- .../components/ProjectSelect/FavoriteStar.tsx | 2 +- .../ProjectSelect/ProjectOptionGroup.tsx | 8 +- .../ProjectSelect/ProjectSelect.stories.tsx | 4 +- .../ProjectSelect/ProjectSelect.test.tsx | 18 +- .../src/components/ProjectSelect/index.tsx | 24 +- .../components/ScheduleTasksModal/index.tsx | 32 +-- .../SearchableDropdown.stories.tsx | 28 +-- .../SearchableDropdown.test.tsx | 4 +- .../components/SearchableDropdown/index.tsx | 34 +-- .../SetPriority/SetPriority.test.tsx | 2 +- .../src/components/SetPriority/index.tsx | 2 +- .../components/Settings/EventLog/EventLog.tsx | 2 +- .../src/components/Settings/Form.test.tsx | 2 +- .../Settings/NavigationWarningModal.tsx | 2 +- .../components/Spawn/MountVolumeSelect.tsx | 10 +- .../src/components/Spawn/getFormSchema.tsx | 2 +- .../spawnHostModal/Widgets/DistroDropdown.tsx | 24 +- .../ArrayFieldTemplates/index.tsx | 17 +- .../ObjectFieldTemplates.test.tsx | 22 +- .../ObjectFieldTemplates/index.tsx | 14 +- .../SpruceForm/FieldTemplates/index.tsx | 8 +- .../SpruceForm/SpruceForm.stories.tsx | 10 +- .../components/SpruceForm/SpruceForm.test.tsx | 30 +-- .../SpruceForm/Widgets/DateTimePicker.tsx | 26 +-- .../SpruceForm/Widgets/LeafyGreenWidgets.tsx | 68 +++--- .../SpruceForm/Widgets/MultiSelect.tsx | 12 +- .../src/components/SpruceForm/index.tsx | 26 +-- .../components/Table/BaseTable.stories.tsx | 4 +- .../spruce/src/components/Table/BaseTable.tsx | 30 +-- apps/spruce/src/components/Table/Filters.tsx | 40 ++-- .../components/Table/TableControl/index.tsx | 14 +- .../TablePopover/TableFilterPopover.tsx | 14 +- .../TablePopover/TableSearchPopover.tsx | 20 +- .../TaskStatusBadge/TaskStatusBadge.test.tsx | 4 +- .../src/components/TaskStatusBadge/index.tsx | 6 +- .../components/TaskStatusFilters/index.tsx | 12 +- .../TaskStatusIcon/TaskStatusIcon.stories.tsx | 2 +- .../src/components/TaskStatusIcon/index.tsx | 18 +- .../components/TaskStatusIconLegend/index.tsx | 11 +- .../src/components/TasksTable/Columns.tsx | 8 +- .../src/components/TasksTable/index.tsx | 28 +-- .../TestStatusBadge.stories.tsx | 2 +- .../src/components/TestStatusBadge/index.tsx | 2 +- .../TextInputWithValidation.test.tsx | 20 +- .../TextInputWithValidation/index.tsx | 20 +- .../src/components/TimePicker/index.tsx | 2 +- .../TreeSelect/TreeSelect.stories.tsx | 2 +- .../src/components/TreeSelect/TreeSelect.tsx | 22 +- .../TupleSelect/TupleSelect.stories.tsx | 2 +- .../TupleSelect/TupleSelect.test.tsx | 6 +- .../src/components/TupleSelect/index.tsx | 19 +- ...upleSelectWithRegexConditional.stories.tsx | 2 +- .../TupleSelectWithRegexConditional.test.tsx | 10 +- .../TupleSelectWithRegexConditional/index.tsx | 12 +- .../BuildVariantAccordion.tsx | 12 +- .../TaskStatusCheckbox.tsx | 8 +- .../TaskStatusCheckboxContainer.tsx | 12 +- .../VersionRestartModal.tsx | 28 +-- .../VersionRestartModal/VersionTasks.tsx | 8 +- .../components/WelcomeModal/CarouselCard.tsx | 8 +- .../components/WelcomeModal/CarouselDots.tsx | 2 +- .../WelcomeModal/WelcomeModal.stories.tsx | 6 +- .../components/WelcomeModal/WelcomeModal.tsx | 16 +- apps/spruce/src/components/styles/Link.tsx | 2 +- .../useBreadcrumbRoot.test.tsx | 4 +- .../useUpsertQueryParams.test.tsx | 6 +- apps/spruce/src/pages/CommitQueue.tsx | 30 +-- apps/spruce/src/pages/Login.tsx | 12 +- apps/spruce/src/pages/ProjectPatches.tsx | 10 +- apps/spruce/src/pages/Task.tsx | 18 +- apps/spruce/src/pages/UserPatches.tsx | 2 +- apps/spruce/src/pages/Version.tsx | 2 +- .../commitqueue/CommitQueueCard.test.tsx | 4 +- .../src/pages/commitqueue/CommitQueueCard.tsx | 2 +- .../pages/commitqueue/ConfirmPatchButton.tsx | 6 +- .../BuildVariantCard.test.tsx | 8 +- .../VariantGroupedTaskStatusBadges/index.tsx | 4 +- .../WaterfallTaskStatusIcon.test.tsx | 8 +- .../WaterfallTaskStatusIcon/index.tsx | 12 +- .../ActiveCommits/BuildVariantCard/index.tsx | 20 +- .../CommitBarChart/CommitBarChart.stories.tsx | 6 +- .../CommitBarChart/CommitBarChart.test.tsx | 12 +- .../CommitBarChart/CommitChartTooltip.tsx | 16 +- .../ActiveCommits/CommitBarChart/index.tsx | 6 +- .../src/pages/commits/ActiveCommits/index.tsx | 14 +- .../pages/commits/CommitChart/ChartToggle.tsx | 4 +- .../src/pages/commits/CommitChart/index.tsx | 14 +- .../commits/CommitTypeSelector/index.tsx | 6 +- .../src/pages/commits/CommitsWrapper.tsx | 14 +- .../InactiveCommits/InactiveCommits.test.tsx | 2 +- .../pages/commits/InactiveCommits/index.tsx | 14 +- .../src/pages/commits/PaginationButtons.tsx | 8 +- .../pages/commits/ProjectHealth.stories.tsx | 6 +- .../spruce/src/pages/commits/RenderCommit.tsx | 8 +- .../spruce/src/pages/commits/StatusSelect.tsx | 6 +- .../src/pages/commits/WaterfallMenu/index.tsx | 2 +- apps/spruce/src/pages/commits/index.tsx | 30 +-- .../BuildVariantCard.tsx | 2 +- .../ConfigureBuildVariants/index.tsx | 12 +- .../ConfigureTasks/ConfigureTasks.test.tsx | 210 +++++++++--------- .../DisabledVariantTasksList/index.tsx | 4 +- .../ConfigureTasks/index.tsx | 42 ++-- .../configurePatchCore/ParametersContent.tsx | 4 +- .../configurePatchCore/index.tsx | 16 +- .../src/pages/container/EventsTable/index.tsx | 4 +- apps/spruce/src/pages/container/index.tsx | 8 +- .../distroSettings/DeleteDistro/index.tsx | 4 +- .../pages/distroSettings/HeaderButtons.tsx | 4 +- .../src/pages/distroSettings/SaveModal.tsx | 2 +- apps/spruce/src/pages/distroSettings/Tabs.tsx | 14 +- .../spruce/src/pages/distroSettings/index.tsx | 10 +- .../tabs/EventLogTab/EventLogTab.tsx | 2 +- .../tabs/ProviderTab/UnsavedModal.tsx | 2 +- apps/spruce/src/pages/host/HostCard.tsx | 2 +- .../spruce/src/pages/host/HostEventString.tsx | 38 ++-- apps/spruce/src/pages/host/HostTable.tsx | 8 +- apps/spruce/src/pages/host/index.tsx | 40 ++-- apps/spruce/src/pages/hosts/HostsTable.tsx | 6 +- apps/spruce/src/pages/hosts/index.tsx | 20 +- .../src/pages/image/DistrosTable/index.tsx | 6 +- .../image/ImageEventLog/ImageEventLog.tsx | 4 +- .../ImageEventLog/ImageEventLogTable.tsx | 4 +- .../src/pages/image/ImageSelect/index.tsx | 8 +- .../src/pages/image/PackagesTable/index.tsx | 6 +- apps/spruce/src/pages/image/Tabs.tsx | 6 +- apps/spruce/src/pages/image/index.tsx | 6 +- .../image/tabs/BuildInformationTab/index.tsx | 6 +- .../image/tabs/EventLogTab/EventLogTab.tsx | 4 +- .../spruce/src/pages/jobLogs/JobLogsTable.tsx | 10 +- apps/spruce/src/pages/jobLogs/Metadata.tsx | 2 +- apps/spruce/src/pages/jobLogs/index.tsx | 28 +-- .../src/pages/preferences/PreferencesTabs.tsx | 14 +- apps/spruce/src/pages/preferences/index.tsx | 12 +- .../preferences/preferencesTabs/NewUITab.tsx | 8 +- .../preferencesTabs/NotificationsTab.tsx | 8 +- .../preferencesTabs/ProfileTab.tsx | 42 ++-- .../preferencesTabs/PublicKeysTab.tsx | 2 +- .../cliTab/AuthenticationCard.tsx | 2 +- .../preferencesTabs/cliTab/DownloadCard.tsx | 18 +- .../cliTab/NodeList.stories.tsx | 2 +- .../preferencesTabs/cliTab/NodeList.tsx | 2 +- .../notificationTab/ClearSubscriptions.tsx | 12 +- .../notificationTab/NotificationField.tsx | 2 +- .../notificationTab/UserSubscriptions.tsx | 12 +- .../publicKeysTab/EditModal.tsx | 16 +- .../publicKeysTab/PublicKeysTable.tsx | 4 +- .../CreateDuplicateProjectButton.tsx | 6 +- .../projectSettings/CreateProjectModal.tsx | 2 +- .../DefaultSectionToRepoModal.tsx | 2 +- .../pages/projectSettings/HeaderButtons.tsx | 6 +- .../spruce/src/pages/projectSettings/Tabs.tsx | 42 ++-- .../createDuplicateModalSchema.tsx | 2 +- .../src/pages/projectSettings/index.tsx | 12 +- .../tabs/EventLogTab/EventLogTab.test.tsx | 2 +- .../Fields/DeactivateStepbackTaskField.tsx | 4 +- .../GeneralTab/Fields/DeleteProjectField.tsx | 6 +- .../Fields/RepoConfigField.test.tsx | 4 +- .../GeneralTab/Fields/RepoConfigField.tsx | 8 +- .../GeneralTab/Fields/RepotrackerField.tsx | 2 +- .../tabs/GeneralTab/GeneralTab.tsx | 2 +- .../GithubAppSettingsTab/AppSettingsTab.tsx | 2 +- .../GithubTriggerAliasField.tsx | 4 +- .../FieldTemplates.tsx | 6 +- .../PermissionGroupsTab.tsx | 2 +- .../getFormSchema.tsx | 2 +- .../VariablesTab/PromoteVariablesModal.tsx | 4 +- .../tabs/VariablesTab/VariablesTab.tsx | 4 +- apps/spruce/src/pages/spawn/SpawnVolume.tsx | 2 +- apps/spruce/src/pages/spawn/index.tsx | 12 +- .../spawn/spawnHost/EditSpawnHostButton.tsx | 6 +- .../spawnHost/EditSpawnHostModal.test.tsx | 20 +- .../spawn/spawnHost/EditSpawnHostModal.tsx | 12 +- .../spawnHost/PauseSleepScheduleModal.tsx | 2 +- .../spawn/spawnHost/SpawnHostActionButton.tsx | 8 +- .../pages/spawn/spawnHost/SpawnHostButton.tsx | 6 +- .../pages/spawn/spawnHost/SpawnHostTable.tsx | 2 +- .../spawnHost/SpawnHostTableActions.test.tsx | 12 +- .../spawn/spawnHost/SpawnHostTableActions.tsx | 6 +- .../spawnHostButton/SpawnHostModal.tsx | 12 +- .../spawn/spawnVolume/SpawnVolumeButton.tsx | 8 +- .../spawnVolume/SpawnVolumeModal.test.tsx | 10 +- .../spawn/spawnVolume/SpawnVolumeModal.tsx | 12 +- .../spawn/spawnVolume/SpawnVolumeTable.tsx | 2 +- .../DeleteVolumeButton.tsx | 4 +- .../spawnVolumeTableActions/EditButton.tsx | 4 +- .../EditVolumeModal.tsx | 14 +- .../spawnVolumeTableActions/MigrateButton.tsx | 2 +- .../MigrateVolumeModal.tsx | 14 +- .../spawnVolumeTableActions/MountButton.tsx | 4 +- .../MountVolumeModal.tsx | 10 +- .../spawnVolumeTableActions/UnmountButton.tsx | 24 +- apps/spruce/src/pages/task/ActionButtons.tsx | 28 +-- apps/spruce/src/pages/task/TaskTabs.tsx | 40 ++-- .../executionDropdown/ExecutionSelector.tsx | 4 +- .../task/metadata/ETATimer/ETATimer.test.tsx | 6 +- .../pages/task/metadata/Metadata.stories.tsx | 10 +- .../src/pages/task/metadata/Metadata.test.tsx | 12 +- apps/spruce/src/pages/task/metadata/index.tsx | 38 ++-- .../taskTabs/ExecutionTasksTable.stories.tsx | 8 +- .../task/taskTabs/ExecutionTasksTable.tsx | 2 +- .../FileTable/GroupedFileTable/index.tsx | 18 +- .../pages/task/taskTabs/FileTable/index.tsx | 4 +- apps/spruce/src/pages/task/taskTabs/Logs.tsx | 12 +- .../src/pages/task/taskTabs/TestsTable.tsx | 16 +- .../AddIssueModal/AddIssueModal.test.tsx | 12 +- .../AddIssueModal/index.tsx | 20 +- .../AnnotationNote.tsx | 20 +- .../AnnotationTicketRow.stories.tsx | 2 +- .../AnnotationTicketRow/index.tsx | 4 +- .../AnnotationTicketRowWithActions/index.tsx | 8 +- .../AnnotationTicketsList.test.tsx | 10 +- .../AnnotationTicketsList/index.tsx | 8 +- .../BuildBaron.test.tsx | 24 +- .../buildBaronAndAnnotations/BuildBaron.tsx | 6 +- .../BuildBaronContent.tsx | 22 +- .../CreatedTicketsTable/BBCreatedTickets.tsx | 2 +- .../CustomCreatedTickets.tsx | 4 +- .../FileTicketButton.tsx | 2 +- .../Issues/AnnotationTickets.tsx | 20 +- .../Issues/Issues.tsx | 10 +- .../Issues/SuspectedIssues.tsx | 10 +- .../JiraTicketList/JiraTicketRow/index.tsx | 2 +- .../JiraTicketList/index.tsx | 2 +- .../src/pages/task/taskTabs/logs/LogTypes.tsx | 2 +- .../task/taskTabs/testsTable/LogsColumn.tsx | 18 +- .../testsTable/getColumnsTemplate.tsx | 2 +- .../logsColumn/TaskHistoryTestsButton.tsx | 6 +- .../taskHistory/BuildVariantSelector.tsx | 12 +- .../pages/taskHistory/ColumnHeaders/index.tsx | 10 +- .../TaskHistoryRow/TaskHistoryRow.test.tsx | 12 +- .../taskHistory/TaskHistoryRow/index.tsx | 14 +- apps/spruce/src/pages/taskHistory/index.tsx | 12 +- .../src/pages/taskQueue/DistroOption.tsx | 2 +- .../pages/taskQueue/TaskQueueTable/index.tsx | 14 +- apps/spruce/src/pages/taskQueue/index.tsx | 36 +-- .../pages/variantHistory/ColumnHeaders.tsx | 4 +- .../src/pages/variantHistory/TaskSelector.tsx | 6 +- .../variantHistory/VariantHistoryRow.test.tsx | 12 +- .../variantHistory/VariantHistoryRow.tsx | 12 +- .../spruce/src/pages/variantHistory/index.tsx | 16 +- .../src/pages/version/ActionButtons.tsx | 20 +- .../VariantTaskGroup.test.tsx | 4 +- .../VariantTaskGroup/index.tsx | 28 +-- .../src/pages/version/DownstreamTasks.tsx | 8 +- .../spruce/src/pages/version/EnqueueModal.tsx | 14 +- apps/spruce/src/pages/version/Metadata.tsx | 4 +- .../pages/version/NameChangeModal/index.tsx | 10 +- .../pages/version/ParametersModal/index.tsx | 2 +- .../spruce/src/pages/version/TaskDuration.tsx | 18 +- apps/spruce/src/pages/version/Tasks.tsx | 10 +- apps/spruce/src/pages/version/VersionTabs.tsx | 22 +- .../DownstreamProjectAccordion.tsx | 14 +- .../TaskDurationTable.stories.tsx | 4 +- .../taskDuration/TaskDurationTable.test.tsx | 4 +- .../taskDuration/TaskDurationTable.tsx | 8 +- .../pages/version/tasks/PatchTasksTable.tsx | 26 +-- apps/spruce/src/utils/string/jiraLinkify.tsx | 4 +- packages/eslint-config/index.js | 2 + 339 files changed, 1870 insertions(+), 1866 deletions(-) diff --git a/apps/parsley/.eslintrc.cjs b/apps/parsley/.eslintrc.cjs index dafb0b2b6..2477fe870 100644 --- a/apps/parsley/.eslintrc.cjs +++ b/apps/parsley/.eslintrc.cjs @@ -8,7 +8,6 @@ module.exports = { plugins: ["sort-keys-plus"], root: true, rules: { - "react/jsx-sort-props": WARN, // Sort props alphabetically "sort-imports": [ ERROR, { diff --git a/apps/spruce/src/App.tsx b/apps/spruce/src/App.tsx index b85ec32f0..00e943ccf 100644 --- a/apps/spruce/src/App.tsx +++ b/apps/spruce/src/App.tsx @@ -18,15 +18,15 @@ const browserRouter = createBrowserRouter( createRoutesFromElements( <> {(isDevelopmentBuild() || isLocal()) && ( - } /> + } path={routes.login} /> )} } + path="/*" /> , ), diff --git a/apps/spruce/src/components/Accordion/index.tsx b/apps/spruce/src/components/Accordion/index.tsx index 1b60bcbba..563abdd8c 100644 --- a/apps/spruce/src/components/Accordion/index.tsx +++ b/apps/spruce/src/components/Accordion/index.tsx @@ -48,10 +48,10 @@ export const Accordion: React.FC = ({
{toggleFromBottom && ( {children} @@ -71,10 +71,10 @@ export const Accordion: React.FC = ({ )} {!toggleFromBottom && ( {children} diff --git a/apps/spruce/src/components/Banners/SlackNotificationBanner.tsx b/apps/spruce/src/components/Banners/SlackNotificationBanner.tsx index a549573ae..52db93172 100644 --- a/apps/spruce/src/components/Banners/SlackNotificationBanner.tsx +++ b/apps/spruce/src/components/Banners/SlackNotificationBanner.tsx @@ -88,16 +88,16 @@ export const SlackNotificationBanner = () => { return shouldShowSlackBanner ? ( You can receive a Slack notification when your patch is ready.{" "} saveNotificationSettings()} - confirmDisabled={!slackUsername || loadingUpdateUserSettings} trigger={ Subscribe @@ -105,13 +105,13 @@ export const SlackNotificationBanner = () => { } > setSlackUsername(e.target.value)} onKeyPress={(e) => e.key === "Enter" && saveNotificationSettings()} - autoFocus + // @ts-expect-error: FIXME. This comment was added by an automated script. + value={slackUsername} /> diff --git a/apps/spruce/src/components/Breadcrumbs/index.tsx b/apps/spruce/src/components/Breadcrumbs/index.tsx index 4b5ded2ea..2bc706ade 100644 --- a/apps/spruce/src/components/Breadcrumbs/index.tsx +++ b/apps/spruce/src/components/Breadcrumbs/index.tsx @@ -26,8 +26,8 @@ const Breadcrumbs: React.FC = ({ breadcrumbs }) => ( {breadcrumbs.length - 1 !== index && ( )} @@ -49,12 +49,12 @@ const BreadcrumbFragment: React.FC = ({ - + {message}
diff --git a/apps/spruce/src/components/ButtonDropdown.tsx b/apps/spruce/src/components/ButtonDropdown.tsx index c279607ff..f612b9e15 100644 --- a/apps/spruce/src/components/ButtonDropdown.tsx +++ b/apps/spruce/src/components/ButtonDropdown.tsx @@ -23,22 +23,22 @@ export const ButtonDropdown: React.FC = ({ size = "small", }) => ( } - data-cy="card-dropdown" - popoverZIndex={zIndex.popover} - adjustOnMutation - open={open} - // @ts-expect-error: FIXME. This comment was added by an automated script. - setOpen={setOpen} > {dropdownItems} diff --git a/apps/spruce/src/components/Buttons/PlusButton.tsx b/apps/spruce/src/components/Buttons/PlusButton.tsx index 0fefe37f4..795aaf625 100644 --- a/apps/spruce/src/components/Buttons/PlusButton.tsx +++ b/apps/spruce/src/components/Buttons/PlusButton.tsx @@ -9,8 +9,8 @@ export const PlusButton: ExtendableBox< > = forwardRef(({ leftGlyph, ...rest }: ButtonProps, ref) => ( } as="button" + leftGlyph={} {...rest} /> )); diff --git a/apps/spruce/src/components/Checkbox/CheckboxGroup.tsx b/apps/spruce/src/components/Checkbox/CheckboxGroup.tsx index bf41b936a..f87d21fbd 100644 --- a/apps/spruce/src/components/Checkbox/CheckboxGroup.tsx +++ b/apps/spruce/src/components/Checkbox/CheckboxGroup.tsx @@ -18,12 +18,12 @@ export const CheckboxGroup: React.FC = ({ {data.map(({ key, title, value: checkboxValue }) => ( ) => onChange(e, key)} - label={title} - checked={value.includes(checkboxValue)} bold={false} + checked={value.includes(checkboxValue)} + className="cy-checkbox" data-cy={title} + label={title} + onChange={(e: React.ChangeEvent) => onChange(e, key)} /> ))} diff --git a/apps/spruce/src/components/CodeChanges/index.tsx b/apps/spruce/src/components/CodeChanges/index.tsx index 896a0e441..306063f9e 100644 --- a/apps/spruce/src/components/CodeChanges/index.tsx +++ b/apps/spruce/src/components/CodeChanges/index.tsx @@ -36,7 +36,7 @@ export const CodeChanges: React.FC = ({ patchId }) => { const { moduleCodeChanges } = data?.patch ?? {}; if (loading) { - return ; + return ; } if (error) { return
{error.message}
; @@ -93,19 +93,19 @@ export const CodeChanges: React.FC = ({ patchId }) => { Changes on {branchName}: HTML Raw diff --git a/apps/spruce/src/components/CodeChangesTable/index.tsx b/apps/spruce/src/components/CodeChangesTable/index.tsx index 65747f52e..408a8a18c 100644 --- a/apps/spruce/src/components/CodeChangesTable/index.tsx +++ b/apps/spruce/src/components/CodeChangesTable/index.tsx @@ -24,8 +24,8 @@ export const CodeChangesTable: React.FC = ({ ); }; @@ -57,12 +57,12 @@ const columns = [ accessorKey: "additions", header: "Additions", // @ts-expect-error: FIXME. This comment was added by an automated script. - cell: ({ getValue }) => , + cell: ({ getValue }) => , }, { accessorKey: "deletions", header: "Deletions", // @ts-expect-error: FIXME. This comment was added by an automated script. - cell: ({ getValue }) => , + cell: ({ getValue }) => , }, ]; diff --git a/apps/spruce/src/components/CommitChartLabel/CommitChartLabel.test.tsx b/apps/spruce/src/components/CommitChartLabel/CommitChartLabel.test.tsx index cd72e7b0f..74a226872 100644 --- a/apps/spruce/src/components/CommitChartLabel/CommitChartLabel.test.tsx +++ b/apps/spruce/src/components/CommitChartLabel/CommitChartLabel.test.tsx @@ -8,15 +8,15 @@ import CommitChartLabel from "."; const RenderCommitChartLabel = ({ version }) => ( ); diff --git a/apps/spruce/src/components/CommitChartLabel/index.tsx b/apps/spruce/src/components/CommitChartLabel/index.tsx index 0e27a21c0..354e60020 100644 --- a/apps/spruce/src/components/CommitChartLabel/index.tsx +++ b/apps/spruce/src/components/CommitChartLabel/index.tsx @@ -59,9 +59,9 @@ const CommitChartLabel: React.FC = ({ {shortenGithash(githash)} {" "} @@ -102,9 +102,9 @@ const CommitChartLabel: React.FC = ({ {shortenMessage && ( )} {gitTags && ( diff --git a/apps/spruce/src/components/ConditionalWrapper/ConditionalWrapper.test.tsx b/apps/spruce/src/components/ConditionalWrapper/ConditionalWrapper.test.tsx index 5fe4d0488..d82e20ace 100644 --- a/apps/spruce/src/components/ConditionalWrapper/ConditionalWrapper.test.tsx +++ b/apps/spruce/src/components/ConditionalWrapper/ConditionalWrapper.test.tsx @@ -36,9 +36,9 @@ describe("conditionalWrapper", () => { it("should render the element surrounded by the secondary wrapper when the conditional is false and a secondary wrapper is supplied", () => { render( {children}} condition={false} wrapper={(children) => {children}} - altWrapper={(children) => {children}} > Some Element , diff --git a/apps/spruce/src/components/Content/Layout.tsx b/apps/spruce/src/components/Content/Layout.tsx index 6e870453e..7e61721d7 100644 --- a/apps/spruce/src/components/Content/Layout.tsx +++ b/apps/spruce/src/components/Content/Layout.tsx @@ -49,9 +49,9 @@ export const Layout: React.FC = () => { {!shouldDisableForTest && !hasUsedSpruceBefore && ( )} diff --git a/apps/spruce/src/components/Content/index.tsx b/apps/spruce/src/components/Content/index.tsx index 9683d043d..eeeb71384 100644 --- a/apps/spruce/src/components/Content/index.tsx +++ b/apps/spruce/src/components/Content/index.tsx @@ -34,77 +34,77 @@ import { Layout } from "./Layout"; export const Content: React.FC = () => ( }> - } /> - }> - + } path="/" /> + } path={routes.commits}> + - } /> + } path={routes.container} /> } + path={redirectRoutes.waterfall} /> - }> - + } path={routes.configurePatch}> + - }> - + } path={`${routes.distroSettings}/*`}> + } + path={redirectRoutes.distroSettings} /> - } /> - } /> + } path={routes.host} /> + } path={routes.hosts} /> {showImageVisibilityPage && ( - }> - + } path={`${routes.image}/*`}> + )} - - }> - + + } path={`:${slugs.buildId}`}> + } + path={`:${slugs.taskId}/:${slugs.execution}/:${slugs.groupId}`} /> - } /> - }> - + } path={routes.myPatches} /> + } path={redirectRoutes.patch}> + - }> - + } path={`${routes.preferences}/*`}> + - } /> - }> - + } path={routes.projectPatches} /> + } path={`${routes.projectSettings}/*`}> + } + path={redirectRoutes.projectSettings} /> - }> - + } path={`${routes.spawn}/*`}> + - } /> - }> - + } path={routes.commitQueue} /> + } path={routes.task}> + - } /> - }> - + } path={routes.taskHistory} /> + } path={routes.taskQueue}> + - } /> + } path={routes.userPatches} /> } + path={redirectRoutes.userPatches} /> - } /> - }> - + } path={routes.variantHistory} /> + } path={routes.version}> + - } /> + } path="*" /> ); diff --git a/apps/spruce/src/components/DayPicker/index.tsx b/apps/spruce/src/components/DayPicker/index.tsx index 1ec9fac0f..cc54528b0 100644 --- a/apps/spruce/src/components/DayPicker/index.tsx +++ b/apps/spruce/src/components/DayPicker/index.tsx @@ -43,10 +43,10 @@ export const DayPicker: React.FC<{ {days.map((day, i) => ( handleClick(i)} - key={day} selected={selectedDays[i]} /> ))} diff --git a/apps/spruce/src/components/Dropdown/Dropdown.test.tsx b/apps/spruce/src/components/Dropdown/Dropdown.test.tsx index e0258f356..80eb0d204 100644 --- a/apps/spruce/src/components/Dropdown/Dropdown.test.tsx +++ b/apps/spruce/src/components/Dropdown/Dropdown.test.tsx @@ -49,7 +49,7 @@ describe("dropdown", () => { it("renders a custom button contents when custom buttonRenderer is passed in", () => { const customButtonRenderer = () =>
Custom Button
; render( - + {children()} , ); diff --git a/apps/spruce/src/components/Dropdown/index.tsx b/apps/spruce/src/components/Dropdown/index.tsx index 753e4ba2e..e08b8865b 100644 --- a/apps/spruce/src/components/Dropdown/index.tsx +++ b/apps/spruce/src/components/Dropdown/index.tsx @@ -48,9 +48,9 @@ const Dropdown: React.FC = ({ setIsOpen(!isOpen)} data-cy={dataCy} disabled={disabled} + onClick={() => setIsOpen(!isOpen)} rightGlyph={} > diff --git a/apps/spruce/src/components/EditableTagField/EditableTagField.stories.tsx b/apps/spruce/src/components/EditableTagField/EditableTagField.stories.tsx index c64c1385d..9ecad75b3 100644 --- a/apps/spruce/src/components/EditableTagField/EditableTagField.stories.tsx +++ b/apps/spruce/src/components/EditableTagField/EditableTagField.stories.tsx @@ -9,9 +9,9 @@ export default { export const Default: CustomStoryObj = { render: () => ( ), }; diff --git a/apps/spruce/src/components/EditableTagField/EditableTagField.test.tsx b/apps/spruce/src/components/EditableTagField/EditableTagField.test.tsx index a1917eda4..535858c18 100644 --- a/apps/spruce/src/components/EditableTagField/EditableTagField.test.tsx +++ b/apps/spruce/src/components/EditableTagField/EditableTagField.test.tsx @@ -27,9 +27,9 @@ describe("editableTagField", () => { render( , ); @@ -47,9 +47,9 @@ describe("editableTagField", () => { const user = userEvent.setup(); render( , ); @@ -84,9 +84,9 @@ describe("editableTagField", () => { const user = userEvent.setup(); render( , ); @@ -109,9 +109,9 @@ describe("editableTagField", () => { const user = userEvent.setup(); render( , ); @@ -146,9 +146,9 @@ describe("editableTagField", () => { const user = userEvent.setup(); render( , ); diff --git a/apps/spruce/src/components/EditableTagField/TagRow.tsx b/apps/spruce/src/components/EditableTagField/TagRow.tsx index 19730fdf1..69192761c 100644 --- a/apps/spruce/src/components/EditableTagField/TagRow.tsx +++ b/apps/spruce/src/components/EditableTagField/TagRow.tsx @@ -38,26 +38,26 @@ export const TagRow: React.FC = ({