From 89fed805370a731f90d904af6edff4a590fc5c33 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Sat, 9 Sep 2023 18:22:53 -0700 Subject: [PATCH] fix case HotkeyScope to hotkeyScope (#1528) --- front/src/modules/ui/board/components/BoardHeader.tsx | 4 ++-- .../modules/ui/view-bar/components/DropdownButton.tsx | 6 +++--- .../ui/view-bar/components/FilterDropdownButton.tsx | 8 ++++---- .../components/MultipleFiltersDropdownButton.tsx | 10 +++++----- .../components/SingleEntityFilterDropdownButton.tsx | 8 ++++---- .../ui/view-bar/components/SortDropdownButton.tsx | 6 +++--- .../ui/view-bar/components/UpdateViewButtonGroup.tsx | 6 +++--- front/src/modules/ui/view-bar/components/ViewBar.tsx | 8 ++++---- .../modules/ui/view-bar/components/ViewBarDetails.tsx | 2 +- .../ui/view-bar/components/ViewsDropdownButton.tsx | 10 +++++----- front/src/pages/tasks/Tasks.tsx | 2 +- 11 files changed, 35 insertions(+), 35 deletions(-) diff --git a/front/src/modules/ui/board/components/BoardHeader.tsx b/front/src/modules/ui/board/components/BoardHeader.tsx index d5c733db9..2572d948b 100644 --- a/front/src/modules/ui/board/components/BoardHeader.tsx +++ b/front/src/modules/ui/board/components/BoardHeader.tsx @@ -56,12 +56,12 @@ export function BoardHeader({ <> context={context} availableSorts={availableSorts || []} - HotkeyScope={FiltersHotkeyScope.FilterDropdownButton} + hotkeyScope={FiltersHotkeyScope.FilterDropdownButton} /> void; resetState?: () => void; - HotkeyScope: string; + hotkeyScope: string; color?: string; menuWidth?: `${string}px` | 'auto' | number; }; @@ -64,7 +64,7 @@ function DropdownButton({ children, isUnfolded = false, onIsUnfoldedChange, - HotkeyScope, + hotkeyScope, icon, color, menuWidth, @@ -74,7 +74,7 @@ function DropdownButton({ () => { onIsUnfoldedChange?.(false); }, - HotkeyScope, + hotkeyScope, [onIsUnfoldedChange], ); diff --git a/front/src/modules/ui/view-bar/components/FilterDropdownButton.tsx b/front/src/modules/ui/view-bar/components/FilterDropdownButton.tsx index 2d560d9d5..b6803bbff 100644 --- a/front/src/modules/ui/view-bar/components/FilterDropdownButton.tsx +++ b/front/src/modules/ui/view-bar/components/FilterDropdownButton.tsx @@ -10,14 +10,14 @@ import { SingleEntityFilterDropdownButton } from './SingleEntityFilterDropdownBu export function FilterDropdownButton({ context, - HotkeyScope, + hotkeyScope, isPrimaryButton = false, color, icon, label, }: { context: Context; - HotkeyScope: FiltersHotkeyScope; + hotkeyScope: FiltersHotkeyScope; isPrimaryButton?: boolean; icon?: React.ReactNode; color?: string; @@ -34,12 +34,12 @@ export function FilterDropdownButton({ return hasOnlyOneEntityFilter ? ( ) : ( ; - HotkeyScope: FiltersHotkeyScope; + hotkeyScope: FiltersHotkeyScope; isPrimaryButton?: boolean; icon?: React.ReactNode; color?: string; @@ -90,13 +90,13 @@ export function MultipleFiltersDropdownButton({ unfolded && ((isPrimaryButton && !isFilterSelected) || !isPrimaryButton) ) { - setHotkeyScope(HotkeyScope); + setHotkeyScope(hotkeyScope); setIsUnfolded(true); return; } if (filterDefinitionUsedInDropdown?.type === 'entity') { - setHotkeyScope(HotkeyScope); + setHotkeyScope(hotkeyScope); } setIsUnfolded(false); @@ -110,7 +110,7 @@ export function MultipleFiltersDropdownButton({ isUnfolded={isUnfolded} icon={icon} onIsUnfoldedChange={handleIsUnfoldedChange} - HotkeyScope={HotkeyScope} + hotkeyScope={hotkeyScope} color={color} menuWidth={ selectedOperandInDropdown && diff --git a/front/src/modules/ui/view-bar/components/SingleEntityFilterDropdownButton.tsx b/front/src/modules/ui/view-bar/components/SingleEntityFilterDropdownButton.tsx index 98bf282b0..cd77454b2 100644 --- a/front/src/modules/ui/view-bar/components/SingleEntityFilterDropdownButton.tsx +++ b/front/src/modules/ui/view-bar/components/SingleEntityFilterDropdownButton.tsx @@ -29,10 +29,10 @@ const StyledDropdownButtonContainer = styled.div` export function SingleEntityFilterDropdownButton({ context, - HotkeyScope, + hotkeyScope, }: { context: Context; - HotkeyScope: FiltersHotkeyScope; + hotkeyScope: FiltersHotkeyScope; }) { const theme = useTheme(); @@ -75,10 +75,10 @@ export function SingleEntityFilterDropdownButton({ function handleIsUnfoldedChange(newIsUnfolded: boolean) { if (newIsUnfolded) { - setHotkeyScope(HotkeyScope); + setHotkeyScope(hotkeyScope); setIsUnfolded(true); } else { - setHotkeyScope(HotkeyScope); + setHotkeyScope(hotkeyScope); setIsUnfolded(false); setFilterDropdownSearchInput(''); } diff --git a/front/src/modules/ui/view-bar/components/SortDropdownButton.tsx b/front/src/modules/ui/view-bar/components/SortDropdownButton.tsx index d03047b0b..27e6fa260 100644 --- a/front/src/modules/ui/view-bar/components/SortDropdownButton.tsx +++ b/front/src/modules/ui/view-bar/components/SortDropdownButton.tsx @@ -15,7 +15,7 @@ import DropdownButton from './DropdownButton'; export type SortDropdownButtonProps = { availableSorts: SortType[]; - HotkeyScope: FiltersHotkeyScope; + hotkeyScope: FiltersHotkeyScope; context: Context; isPrimaryButton?: boolean; }; @@ -25,7 +25,7 @@ const options: Array['order']> = ['asc', 'desc']; export function SortDropdownButton({ context, availableSorts, - HotkeyScope, + hotkeyScope, }: SortDropdownButtonProps) { const [isUnfolded, setIsUnfolded] = useState(false); const [isOptionUnfolded, setIsOptionUnfolded] = useState(false); @@ -77,7 +77,7 @@ export function SortDropdownButton({ isActive={isSortSelected} isUnfolded={isUnfolded} onIsUnfoldedChange={handleIsUnfoldedChange} - HotkeyScope={HotkeyScope} + hotkeyScope={hotkeyScope} > {isOptionUnfolded ? ( diff --git a/front/src/modules/ui/view-bar/components/UpdateViewButtonGroup.tsx b/front/src/modules/ui/view-bar/components/UpdateViewButtonGroup.tsx index f2b5c960a..145c9770a 100644 --- a/front/src/modules/ui/view-bar/components/UpdateViewButtonGroup.tsx +++ b/front/src/modules/ui/view-bar/components/UpdateViewButtonGroup.tsx @@ -29,7 +29,7 @@ const StyledContainer = styled.div` export type UpdateViewButtonGroupProps = { canPersistViewFields?: boolean; - HotkeyScope: string; + hotkeyScope: string; onViewEditModeChange?: () => void; onViewSubmit?: () => void | Promise; scopeContext: Context; @@ -37,7 +37,7 @@ export type UpdateViewButtonGroupProps = { export const UpdateViewButtonGroup = ({ canPersistViewFields, - HotkeyScope, + hotkeyScope, onViewEditModeChange, onViewSubmit, scopeContext, @@ -91,7 +91,7 @@ export const UpdateViewButtonGroup = ({ useScopedHotkeys( [Key.Enter, Key.Escape], handleDropdownClose, - HotkeyScope, + hotkeyScope, [], ); diff --git a/front/src/modules/ui/view-bar/components/ViewBar.tsx b/front/src/modules/ui/view-bar/components/ViewBar.tsx index ec8e3fd3d..6a1a7a5c4 100644 --- a/front/src/modules/ui/view-bar/components/ViewBar.tsx +++ b/front/src/modules/ui/view-bar/components/ViewBar.tsx @@ -77,7 +77,7 @@ export const ViewBar = ({ onViewEditModeChange={openOptionsDropdownButton} onViewsChange={onViewsChange} onViewSelect={onViewSelect} - HotkeyScope={ViewsHotkeyScope.ListDropdown} + hotkeyScope={ViewsHotkeyScope.ListDropdown} scopeContext={scopeContext} /> } @@ -86,13 +86,13 @@ export const ViewBar = ({ <> context={scopeContext} availableSorts={availableSorts} - HotkeyScope={FiltersHotkeyScope.FilterDropdownButton} + hotkeyScope={FiltersHotkeyScope.FilterDropdownButton} isPrimaryButton /> @@ -109,7 +109,7 @@ export const ViewBar = ({ } diff --git a/front/src/modules/ui/view-bar/components/ViewBarDetails.tsx b/front/src/modules/ui/view-bar/components/ViewBarDetails.tsx index 98403e247..67b6edcfd 100644 --- a/front/src/modules/ui/view-bar/components/ViewBarDetails.tsx +++ b/front/src/modules/ui/view-bar/components/ViewBarDetails.tsx @@ -200,7 +200,7 @@ function ViewBarDetails({ } label="Add filter" diff --git a/front/src/modules/ui/view-bar/components/ViewsDropdownButton.tsx b/front/src/modules/ui/view-bar/components/ViewsDropdownButton.tsx index c25eb2505..f6fa901fa 100644 --- a/front/src/modules/ui/view-bar/components/ViewsDropdownButton.tsx +++ b/front/src/modules/ui/view-bar/components/ViewsDropdownButton.tsx @@ -72,7 +72,7 @@ const StyledViewName = styled.span` export type ViewsDropdownButtonProps = { defaultViewName: string; - HotkeyScope: ViewsHotkeyScope; + hotkeyScope: ViewsHotkeyScope; onViewEditModeChange?: () => void; onViewsChange?: (views: View[]) => void | Promise; onViewSelect?: (viewId: string) => void | Promise; @@ -81,7 +81,7 @@ export type ViewsDropdownButtonProps = { export const ViewsDropdownButton = ({ defaultViewName, - HotkeyScope, + hotkeyScope, onViewEditModeChange, onViewsChange, onViewSelect, @@ -163,10 +163,10 @@ export const ViewsDropdownButton = ({ useEffect(() => { isUnfolded - ? setHotkeyScopeAndMemorizePreviousScope(HotkeyScope) + ? setHotkeyScopeAndMemorizePreviousScope(hotkeyScope) : goBackToPreviousHotkeyScope(); }, [ - HotkeyScope, + hotkeyScope, goBackToPreviousHotkeyScope, isUnfolded, setHotkeyScopeAndMemorizePreviousScope, @@ -189,7 +189,7 @@ export const ViewsDropdownButton = ({ isUnfolded={isUnfolded} onIsUnfoldedChange={setIsUnfolded} anchor="left" - HotkeyScope={HotkeyScope} + hotkeyScope={hotkeyScope} menuWidth="auto" > diff --git a/front/src/pages/tasks/Tasks.tsx b/front/src/pages/tasks/Tasks.tsx index fef557203..7cf8b7aa1 100644 --- a/front/src/pages/tasks/Tasks.tsx +++ b/front/src/pages/tasks/Tasks.tsx @@ -73,7 +73,7 @@ export function Tasks() { } />