fix case HotkeyScope to hotkeyScope (#1528)
This commit is contained in:
@ -56,12 +56,12 @@ export function BoardHeader<SortField>({
|
|||||||
<>
|
<>
|
||||||
<FilterDropdownButton
|
<FilterDropdownButton
|
||||||
context={context}
|
context={context}
|
||||||
HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
||||||
/>
|
/>
|
||||||
<SortDropdownButton<SortField>
|
<SortDropdownButton<SortField>
|
||||||
context={context}
|
context={context}
|
||||||
availableSorts={availableSorts || []}
|
availableSorts={availableSorts || []}
|
||||||
HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
||||||
/>
|
/>
|
||||||
<BoardOptionsDropdown
|
<BoardOptionsDropdown
|
||||||
customHotkeyScope={{ scope: BoardOptionsHotkeyScope.Dropdown }}
|
customHotkeyScope={{ scope: BoardOptionsHotkeyScope.Dropdown }}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ type OwnProps = {
|
|||||||
icon?: ReactNode;
|
icon?: ReactNode;
|
||||||
onIsUnfoldedChange?: (newIsUnfolded: boolean) => void;
|
onIsUnfoldedChange?: (newIsUnfolded: boolean) => void;
|
||||||
resetState?: () => void;
|
resetState?: () => void;
|
||||||
HotkeyScope: string;
|
hotkeyScope: string;
|
||||||
color?: string;
|
color?: string;
|
||||||
menuWidth?: `${string}px` | 'auto' | number;
|
menuWidth?: `${string}px` | 'auto' | number;
|
||||||
};
|
};
|
||||||
@ -64,7 +64,7 @@ function DropdownButton({
|
|||||||
children,
|
children,
|
||||||
isUnfolded = false,
|
isUnfolded = false,
|
||||||
onIsUnfoldedChange,
|
onIsUnfoldedChange,
|
||||||
HotkeyScope,
|
hotkeyScope,
|
||||||
icon,
|
icon,
|
||||||
color,
|
color,
|
||||||
menuWidth,
|
menuWidth,
|
||||||
@ -74,7 +74,7 @@ function DropdownButton({
|
|||||||
() => {
|
() => {
|
||||||
onIsUnfoldedChange?.(false);
|
onIsUnfoldedChange?.(false);
|
||||||
},
|
},
|
||||||
HotkeyScope,
|
hotkeyScope,
|
||||||
[onIsUnfoldedChange],
|
[onIsUnfoldedChange],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -10,14 +10,14 @@ import { SingleEntityFilterDropdownButton } from './SingleEntityFilterDropdownBu
|
|||||||
|
|
||||||
export function FilterDropdownButton({
|
export function FilterDropdownButton({
|
||||||
context,
|
context,
|
||||||
HotkeyScope,
|
hotkeyScope,
|
||||||
isPrimaryButton = false,
|
isPrimaryButton = false,
|
||||||
color,
|
color,
|
||||||
icon,
|
icon,
|
||||||
label,
|
label,
|
||||||
}: {
|
}: {
|
||||||
context: Context<string | null>;
|
context: Context<string | null>;
|
||||||
HotkeyScope: FiltersHotkeyScope;
|
hotkeyScope: FiltersHotkeyScope;
|
||||||
isPrimaryButton?: boolean;
|
isPrimaryButton?: boolean;
|
||||||
icon?: React.ReactNode;
|
icon?: React.ReactNode;
|
||||||
color?: string;
|
color?: string;
|
||||||
@ -34,12 +34,12 @@ export function FilterDropdownButton({
|
|||||||
return hasOnlyOneEntityFilter ? (
|
return hasOnlyOneEntityFilter ? (
|
||||||
<SingleEntityFilterDropdownButton
|
<SingleEntityFilterDropdownButton
|
||||||
context={context}
|
context={context}
|
||||||
HotkeyScope={HotkeyScope}
|
hotkeyScope={hotkeyScope}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<MultipleFiltersDropdownButton
|
<MultipleFiltersDropdownButton
|
||||||
context={context}
|
context={context}
|
||||||
HotkeyScope={HotkeyScope}
|
hotkeyScope={hotkeyScope}
|
||||||
icon={icon}
|
icon={icon}
|
||||||
isPrimaryButton={isPrimaryButton}
|
isPrimaryButton={isPrimaryButton}
|
||||||
color={color}
|
color={color}
|
||||||
|
|||||||
@ -24,14 +24,14 @@ import { FilterDropdownTextSearchInput } from './FilterDropdownTextSearchInput';
|
|||||||
|
|
||||||
export function MultipleFiltersDropdownButton({
|
export function MultipleFiltersDropdownButton({
|
||||||
context,
|
context,
|
||||||
HotkeyScope,
|
hotkeyScope,
|
||||||
isPrimaryButton = false,
|
isPrimaryButton = false,
|
||||||
color,
|
color,
|
||||||
icon,
|
icon,
|
||||||
label,
|
label,
|
||||||
}: {
|
}: {
|
||||||
context: Context<string | null>;
|
context: Context<string | null>;
|
||||||
HotkeyScope: FiltersHotkeyScope;
|
hotkeyScope: FiltersHotkeyScope;
|
||||||
isPrimaryButton?: boolean;
|
isPrimaryButton?: boolean;
|
||||||
icon?: React.ReactNode;
|
icon?: React.ReactNode;
|
||||||
color?: string;
|
color?: string;
|
||||||
@ -90,13 +90,13 @@ export function MultipleFiltersDropdownButton({
|
|||||||
unfolded &&
|
unfolded &&
|
||||||
((isPrimaryButton && !isFilterSelected) || !isPrimaryButton)
|
((isPrimaryButton && !isFilterSelected) || !isPrimaryButton)
|
||||||
) {
|
) {
|
||||||
setHotkeyScope(HotkeyScope);
|
setHotkeyScope(hotkeyScope);
|
||||||
setIsUnfolded(true);
|
setIsUnfolded(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filterDefinitionUsedInDropdown?.type === 'entity') {
|
if (filterDefinitionUsedInDropdown?.type === 'entity') {
|
||||||
setHotkeyScope(HotkeyScope);
|
setHotkeyScope(hotkeyScope);
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsUnfolded(false);
|
setIsUnfolded(false);
|
||||||
@ -110,7 +110,7 @@ export function MultipleFiltersDropdownButton({
|
|||||||
isUnfolded={isUnfolded}
|
isUnfolded={isUnfolded}
|
||||||
icon={icon}
|
icon={icon}
|
||||||
onIsUnfoldedChange={handleIsUnfoldedChange}
|
onIsUnfoldedChange={handleIsUnfoldedChange}
|
||||||
HotkeyScope={HotkeyScope}
|
hotkeyScope={hotkeyScope}
|
||||||
color={color}
|
color={color}
|
||||||
menuWidth={
|
menuWidth={
|
||||||
selectedOperandInDropdown &&
|
selectedOperandInDropdown &&
|
||||||
|
|||||||
@ -29,10 +29,10 @@ const StyledDropdownButtonContainer = styled.div`
|
|||||||
|
|
||||||
export function SingleEntityFilterDropdownButton({
|
export function SingleEntityFilterDropdownButton({
|
||||||
context,
|
context,
|
||||||
HotkeyScope,
|
hotkeyScope,
|
||||||
}: {
|
}: {
|
||||||
context: Context<string | null>;
|
context: Context<string | null>;
|
||||||
HotkeyScope: FiltersHotkeyScope;
|
hotkeyScope: FiltersHotkeyScope;
|
||||||
}) {
|
}) {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
@ -75,10 +75,10 @@ export function SingleEntityFilterDropdownButton({
|
|||||||
|
|
||||||
function handleIsUnfoldedChange(newIsUnfolded: boolean) {
|
function handleIsUnfoldedChange(newIsUnfolded: boolean) {
|
||||||
if (newIsUnfolded) {
|
if (newIsUnfolded) {
|
||||||
setHotkeyScope(HotkeyScope);
|
setHotkeyScope(hotkeyScope);
|
||||||
setIsUnfolded(true);
|
setIsUnfolded(true);
|
||||||
} else {
|
} else {
|
||||||
setHotkeyScope(HotkeyScope);
|
setHotkeyScope(hotkeyScope);
|
||||||
setIsUnfolded(false);
|
setIsUnfolded(false);
|
||||||
setFilterDropdownSearchInput('');
|
setFilterDropdownSearchInput('');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import DropdownButton from './DropdownButton';
|
|||||||
|
|
||||||
export type SortDropdownButtonProps<SortField> = {
|
export type SortDropdownButtonProps<SortField> = {
|
||||||
availableSorts: SortType<SortField>[];
|
availableSorts: SortType<SortField>[];
|
||||||
HotkeyScope: FiltersHotkeyScope;
|
hotkeyScope: FiltersHotkeyScope;
|
||||||
context: Context<string | null>;
|
context: Context<string | null>;
|
||||||
isPrimaryButton?: boolean;
|
isPrimaryButton?: boolean;
|
||||||
};
|
};
|
||||||
@ -25,7 +25,7 @@ const options: Array<SelectedSortType<any>['order']> = ['asc', 'desc'];
|
|||||||
export function SortDropdownButton<SortField>({
|
export function SortDropdownButton<SortField>({
|
||||||
context,
|
context,
|
||||||
availableSorts,
|
availableSorts,
|
||||||
HotkeyScope,
|
hotkeyScope,
|
||||||
}: SortDropdownButtonProps<SortField>) {
|
}: SortDropdownButtonProps<SortField>) {
|
||||||
const [isUnfolded, setIsUnfolded] = useState(false);
|
const [isUnfolded, setIsUnfolded] = useState(false);
|
||||||
const [isOptionUnfolded, setIsOptionUnfolded] = useState(false);
|
const [isOptionUnfolded, setIsOptionUnfolded] = useState(false);
|
||||||
@ -77,7 +77,7 @@ export function SortDropdownButton<SortField>({
|
|||||||
isActive={isSortSelected}
|
isActive={isSortSelected}
|
||||||
isUnfolded={isUnfolded}
|
isUnfolded={isUnfolded}
|
||||||
onIsUnfoldedChange={handleIsUnfoldedChange}
|
onIsUnfoldedChange={handleIsUnfoldedChange}
|
||||||
HotkeyScope={HotkeyScope}
|
hotkeyScope={hotkeyScope}
|
||||||
>
|
>
|
||||||
{isOptionUnfolded ? (
|
{isOptionUnfolded ? (
|
||||||
<StyledDropdownMenuItemsContainer>
|
<StyledDropdownMenuItemsContainer>
|
||||||
|
|||||||
@ -29,7 +29,7 @@ const StyledContainer = styled.div`
|
|||||||
|
|
||||||
export type UpdateViewButtonGroupProps = {
|
export type UpdateViewButtonGroupProps = {
|
||||||
canPersistViewFields?: boolean;
|
canPersistViewFields?: boolean;
|
||||||
HotkeyScope: string;
|
hotkeyScope: string;
|
||||||
onViewEditModeChange?: () => void;
|
onViewEditModeChange?: () => void;
|
||||||
onViewSubmit?: () => void | Promise<void>;
|
onViewSubmit?: () => void | Promise<void>;
|
||||||
scopeContext: Context<string | null>;
|
scopeContext: Context<string | null>;
|
||||||
@ -37,7 +37,7 @@ export type UpdateViewButtonGroupProps = {
|
|||||||
|
|
||||||
export const UpdateViewButtonGroup = ({
|
export const UpdateViewButtonGroup = ({
|
||||||
canPersistViewFields,
|
canPersistViewFields,
|
||||||
HotkeyScope,
|
hotkeyScope,
|
||||||
onViewEditModeChange,
|
onViewEditModeChange,
|
||||||
onViewSubmit,
|
onViewSubmit,
|
||||||
scopeContext,
|
scopeContext,
|
||||||
@ -91,7 +91,7 @@ export const UpdateViewButtonGroup = ({
|
|||||||
useScopedHotkeys(
|
useScopedHotkeys(
|
||||||
[Key.Enter, Key.Escape],
|
[Key.Enter, Key.Escape],
|
||||||
handleDropdownClose,
|
handleDropdownClose,
|
||||||
HotkeyScope,
|
hotkeyScope,
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ export const ViewBar = <SortField,>({
|
|||||||
onViewEditModeChange={openOptionsDropdownButton}
|
onViewEditModeChange={openOptionsDropdownButton}
|
||||||
onViewsChange={onViewsChange}
|
onViewsChange={onViewsChange}
|
||||||
onViewSelect={onViewSelect}
|
onViewSelect={onViewSelect}
|
||||||
HotkeyScope={ViewsHotkeyScope.ListDropdown}
|
hotkeyScope={ViewsHotkeyScope.ListDropdown}
|
||||||
scopeContext={scopeContext}
|
scopeContext={scopeContext}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
@ -86,13 +86,13 @@ export const ViewBar = <SortField,>({
|
|||||||
<>
|
<>
|
||||||
<FilterDropdownButton
|
<FilterDropdownButton
|
||||||
context={scopeContext}
|
context={scopeContext}
|
||||||
HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
||||||
isPrimaryButton
|
isPrimaryButton
|
||||||
/>
|
/>
|
||||||
<SortDropdownButton<SortField>
|
<SortDropdownButton<SortField>
|
||||||
context={scopeContext}
|
context={scopeContext}
|
||||||
availableSorts={availableSorts}
|
availableSorts={availableSorts}
|
||||||
HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
||||||
isPrimaryButton
|
isPrimaryButton
|
||||||
/>
|
/>
|
||||||
<OptionsDropdownButton />
|
<OptionsDropdownButton />
|
||||||
@ -109,7 +109,7 @@ export const ViewBar = <SortField,>({
|
|||||||
<UpdateViewButtonGroup
|
<UpdateViewButtonGroup
|
||||||
onViewEditModeChange={openOptionsDropdownButton}
|
onViewEditModeChange={openOptionsDropdownButton}
|
||||||
onViewSubmit={onViewSubmit}
|
onViewSubmit={onViewSubmit}
|
||||||
HotkeyScope={ViewsHotkeyScope.CreateDropdown}
|
hotkeyScope={ViewsHotkeyScope.CreateDropdown}
|
||||||
scopeContext={scopeContext}
|
scopeContext={scopeContext}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -200,7 +200,7 @@ function ViewBarDetails<SortField>({
|
|||||||
<StyledAddFilterContainer>
|
<StyledAddFilterContainer>
|
||||||
<FilterDropdownButton
|
<FilterDropdownButton
|
||||||
context={context}
|
context={context}
|
||||||
HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
||||||
color={theme.font.color.tertiary}
|
color={theme.font.color.tertiary}
|
||||||
icon={<IconPlus size={theme.icon.size.md} />}
|
icon={<IconPlus size={theme.icon.size.md} />}
|
||||||
label="Add filter"
|
label="Add filter"
|
||||||
|
|||||||
@ -72,7 +72,7 @@ const StyledViewName = styled.span`
|
|||||||
|
|
||||||
export type ViewsDropdownButtonProps = {
|
export type ViewsDropdownButtonProps = {
|
||||||
defaultViewName: string;
|
defaultViewName: string;
|
||||||
HotkeyScope: ViewsHotkeyScope;
|
hotkeyScope: ViewsHotkeyScope;
|
||||||
onViewEditModeChange?: () => void;
|
onViewEditModeChange?: () => void;
|
||||||
onViewsChange?: (views: View[]) => void | Promise<void>;
|
onViewsChange?: (views: View[]) => void | Promise<void>;
|
||||||
onViewSelect?: (viewId: string) => void | Promise<void>;
|
onViewSelect?: (viewId: string) => void | Promise<void>;
|
||||||
@ -81,7 +81,7 @@ export type ViewsDropdownButtonProps = {
|
|||||||
|
|
||||||
export const ViewsDropdownButton = ({
|
export const ViewsDropdownButton = ({
|
||||||
defaultViewName,
|
defaultViewName,
|
||||||
HotkeyScope,
|
hotkeyScope,
|
||||||
onViewEditModeChange,
|
onViewEditModeChange,
|
||||||
onViewsChange,
|
onViewsChange,
|
||||||
onViewSelect,
|
onViewSelect,
|
||||||
@ -163,10 +163,10 @@ export const ViewsDropdownButton = ({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
isUnfolded
|
isUnfolded
|
||||||
? setHotkeyScopeAndMemorizePreviousScope(HotkeyScope)
|
? setHotkeyScopeAndMemorizePreviousScope(hotkeyScope)
|
||||||
: goBackToPreviousHotkeyScope();
|
: goBackToPreviousHotkeyScope();
|
||||||
}, [
|
}, [
|
||||||
HotkeyScope,
|
hotkeyScope,
|
||||||
goBackToPreviousHotkeyScope,
|
goBackToPreviousHotkeyScope,
|
||||||
isUnfolded,
|
isUnfolded,
|
||||||
setHotkeyScopeAndMemorizePreviousScope,
|
setHotkeyScopeAndMemorizePreviousScope,
|
||||||
@ -189,7 +189,7 @@ export const ViewsDropdownButton = ({
|
|||||||
isUnfolded={isUnfolded}
|
isUnfolded={isUnfolded}
|
||||||
onIsUnfoldedChange={setIsUnfolded}
|
onIsUnfoldedChange={setIsUnfolded}
|
||||||
anchor="left"
|
anchor="left"
|
||||||
HotkeyScope={HotkeyScope}
|
hotkeyScope={hotkeyScope}
|
||||||
menuWidth="auto"
|
menuWidth="auto"
|
||||||
>
|
>
|
||||||
<StyledDropdownMenuItemsContainer>
|
<StyledDropdownMenuItemsContainer>
|
||||||
|
|||||||
@ -73,7 +73,7 @@ export function Tasks() {
|
|||||||
<FilterDropdownButton
|
<FilterDropdownButton
|
||||||
key="tasks-filter-dropdown-button"
|
key="tasks-filter-dropdown-button"
|
||||||
context={TasksRecoilScopeContext}
|
context={TasksRecoilScopeContext}
|
||||||
HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user