fix case HotkeyScope to hotkeyScope (#1528)

This commit is contained in:
Charles Bochet
2023-09-09 18:22:53 -07:00
committed by GitHub
parent cfbeac9c56
commit 89fed80537
11 changed files with 35 additions and 35 deletions

View File

@ -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 }}

View File

@ -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],
);

View File

@ -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}

View File

@ -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 &&

View File

@ -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('');
}

View File

@ -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>

View File

@ -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,
[],
);

View File

@ -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}
/>
}

View File

@ -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"

View File

@ -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>

View File

@ -73,7 +73,7 @@ export function Tasks() {
<FilterDropdownButton
key="tasks-filter-dropdown-button"
context={TasksRecoilScopeContext}
HotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
/>
}
/>