Skip to content

The open alternative to Salesforce, designed for AI.

fix case HotkeyScope to hotkeyScope (#1528)

Charles Bochet89fed805370a
diff --git a/front/src/modules/ui/board/components/BoardHeader.tsx b/front/src/modules/ui/board/components/BoardHeader.tsx
index d5c733db93e..2572d948b08 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<SortField>({
<>
<FilterDropdownButton
context={context}
- HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
+ hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
/>
<SortDropdownButton<SortField>
context={context}
availableSorts={availableSorts || []}
- HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
+ hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
/>
<BoardOptionsDropdown
customHotkeyScope={{ scope: BoardOptionsHotkeyScope.Dropdown }}
diff --git a/front/src/modules/ui/view-bar/components/DropdownButton.tsx b/front/src/modules/ui/view-bar/components/DropdownButton.tsx
index 52214c11b57..7ee9734d9fe 100644
--- a/front/src/modules/ui/view-bar/components/DropdownButton.tsx
+++ b/front/src/modules/ui/view-bar/components/DropdownButton.tsx
@@ -15,7 +15,7 @@ type OwnProps = {
icon?: ReactNode;
onIsUnfoldedChange?: (newIsUnfolded: boolean) => 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 2d560d9d5ef..b6803bbffdc 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<string | null>;
- HotkeyScope: FiltersHotkeyScope;
+ hotkeyScope: FiltersHotkeyScope;
isPrimaryButton?: boolean;
icon?: React.ReactNode;
color?: string;
@@ -34,12 +34,12 @@ export function FilterDropdownButton({
return hasOnlyOneEntityFilter ? (
<SingleEntityFilterDropdownButton
context={context}
- HotkeyScope={HotkeyScope}
+ hotkeyScope={hotkeyScope}
/>
) : (
<MultipleFiltersDropdownButton
context={context}
- HotkeyScope={HotkeyScope}
+ hotkeyScope={hotkeyScope}
icon={icon}
isPrimaryButton={isPrimaryButton}
color={color}
diff --git a/front/src/modules/ui/view-bar/components/MultipleFiltersDropdownButton.tsx b/front/src/modules/ui/view-bar/components/MultipleFiltersDropdownButton.tsx
index 40f12c1ac9a..739b05c21f9 100644
--- a/front/src/modules/ui/view-bar/components/MultipleFiltersDropdownButton.tsx
+++ b/front/src/modules/ui/view-bar/components/MultipleFiltersDropdownButton.tsx
@@ -24,14 +24,14 @@ import { FilterDropdownTextSearchInput } from './FilterDropdownTextSearchInput';
export function MultipleFiltersDropdownButton({
context,
- HotkeyScope,
+ hotkeyScope,
isPrimaryButton = false,
color,
icon,
label,
}: {
context: Context<string | null>;
- 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 98bf282b036..cd77454b2a3 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<string | null>;
- 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 d03047b0b75..27e6fa260e5 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<SortField> = {
availableSorts: SortType<SortField>[];
- HotkeyScope: FiltersHotkeyScope;
+ hotkeyScope: FiltersHotkeyScope;
context: Context<string | null>;
isPrimaryButton?: boolean;
};
@@ -25,7 +25,7 @@ const options: Array<SelectedSortType<any>['order']> = ['asc', 'desc'];
export function SortDropdownButton<SortField>({
context,
availableSorts,
- HotkeyScope,
+ hotkeyScope,
}: SortDropdownButtonProps<SortField>) {
const [isUnfolded, setIsUnfolded] = useState(false);
const [isOptionUnfolded, setIsOptionUnfolded] = useState(false);
@@ -77,7 +77,7 @@ export function SortDropdownButton<SortField>({
isActive={isSortSelected}
isUnfolded={isUnfolded}
onIsUnfoldedChange={handleIsUnfoldedChange}
- HotkeyScope={HotkeyScope}
+ hotkeyScope={hotkeyScope}
>
{isOptionUnfolded ? (
<StyledDropdownMenuItemsContainer>
diff --git a/front/src/modules/ui/view-bar/components/UpdateViewButtonGroup.tsx b/front/src/modules/ui/view-bar/components/UpdateViewButtonGroup.tsx
index f2b5c960a63..145c9770a50 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<void>;
scopeContext: Context<string | null>;
@@ -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 ec8e3fd3da0..6a1a7a5c4e5 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 = <SortField,>({
onViewEditModeChange={openOptionsDropdownButton}
onViewsChange={onViewsChange}
onViewSelect={onViewSelect}
- HotkeyScope={ViewsHotkeyScope.ListDropdown}
+ hotkeyScope={ViewsHotkeyScope.ListDropdown}
scopeContext={scopeContext}
/>
}
@@ -86,13 +86,13 @@ export const ViewBar = <SortField,>({
<>
<FilterDropdownButton
context={scopeContext}
- HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
+ hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
isPrimaryButton
/>
<SortDropdownButton<SortField>
context={scopeContext}
availableSorts={availableSorts}
- HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
+ hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
isPrimaryButton
/>
<OptionsDropdownButton />
@@ -109,7 +109,7 @@ export const ViewBar = <SortField,>({
<UpdateViewButtonGroup
onViewEditModeChange={openOptionsDropdownButton}
onViewSubmit={onViewSubmit}
- HotkeyScope={ViewsHotkeyScope.CreateDropdown}
+ hotkeyScope={ViewsHotkeyScope.CreateDropdown}
scopeContext={scopeContext}
/>
}
diff --git a/front/src/modules/ui/view-bar/components/ViewBarDetails.tsx b/front/src/modules/ui/view-bar/components/ViewBarDetails.tsx
index 98403e247c8..67b6edcfd5a 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<SortField>({
<StyledAddFilterContainer>
<FilterDropdownButton
context={context}
- HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
+ hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
color={theme.font.color.tertiary}
icon={<IconPlus size={theme.icon.size.md} />}
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 c25eb2505a8..f6fa901faff 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<void>;
onViewSelect?: (viewId: string) => void | Promise<void>;
@@ -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"
>
<StyledDropdownMenuItemsContainer>
diff --git a/front/src/pages/tasks/Tasks.tsx b/front/src/pages/tasks/Tasks.tsx
index fef557203a0..7cf8b7aa14e 100644
--- a/front/src/pages/tasks/Tasks.tsx
+++ b/front/src/pages/tasks/Tasks.tsx
@@ -73,7 +73,7 @@ export function Tasks() {
<FilterDropdownButton
key="tasks-filter-dropdown-button"
context={TasksRecoilScopeContext}
- HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
+ hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
/>
}
/>