MM-51091: Fixed the checkmarks bug (#28287)
* Fixed the checkmarks bug * Fixed indentation * Fixing the snapshots * resolving the comments * check-lint issues * react fragment removal * Fixing the .snap files
Этот коммит содержится в:
@@ -65,6 +65,11 @@ exports[`components/sidebar/sidebar_category/sidebar_category_sorting_menu shoul
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
trailingElements={
|
||||||
|
<CheckIcon
|
||||||
|
size={16}
|
||||||
|
/>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
id="sortByMostRecent-category_id"
|
id="sortByMostRecent-category_id"
|
||||||
@@ -75,6 +80,7 @@ exports[`components/sidebar/sidebar_category/sidebar_category_sorting_menu shoul
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
trailingElements={null}
|
||||||
/>
|
/>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<SubMenu
|
<SubMenu
|
||||||
@@ -111,6 +117,11 @@ exports[`components/sidebar/sidebar_category/sidebar_category_sorting_menu shoul
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
trailingElements={
|
||||||
|
<CheckIcon
|
||||||
|
size={16}
|
||||||
|
/>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
id="showDmCount-category_id-15"
|
id="showDmCount-category_id-15"
|
||||||
@@ -121,6 +132,7 @@ exports[`components/sidebar/sidebar_category/sidebar_category_sorting_menu shoul
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
trailingElements={null}
|
||||||
/>
|
/>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
id="showDmCount-category_id-20"
|
id="showDmCount-category_id-20"
|
||||||
@@ -131,6 +143,7 @@ exports[`components/sidebar/sidebar_category/sidebar_category_sorting_menu shoul
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
trailingElements={null}
|
||||||
/>
|
/>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
id="showDmCount-category_id-40"
|
id="showDmCount-category_id-40"
|
||||||
@@ -141,6 +154,7 @@ exports[`components/sidebar/sidebar_category/sidebar_category_sorting_menu shoul
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
trailingElements={null}
|
||||||
/>
|
/>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<MenuItemSeparator />
|
<MenuItemSeparator />
|
||||||
|
|||||||
@@ -95,6 +95,11 @@ exports[`components/sidebar/sidebar_category/sidebar_category_menu should match
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
trailingElements={
|
||||||
|
<CheckIcon
|
||||||
|
size={16}
|
||||||
|
/>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
id="sortByMostRecent-test_category_id"
|
id="sortByMostRecent-test_category_id"
|
||||||
@@ -105,6 +110,7 @@ exports[`components/sidebar/sidebar_category/sidebar_category_menu should match
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
trailingElements={null}
|
||||||
/>
|
/>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
id="sortManual-test_category_id"
|
id="sortManual-test_category_id"
|
||||||
@@ -115,6 +121,7 @@ exports[`components/sidebar/sidebar_category/sidebar_category_menu should match
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
trailingElements={null}
|
||||||
/>
|
/>
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
<MenuItemSeparator />
|
<MenuItemSeparator />
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import {
|
|||||||
SortAlphabeticalAscendingIcon,
|
SortAlphabeticalAscendingIcon,
|
||||||
ClockOutlineIcon,
|
ClockOutlineIcon,
|
||||||
ChevronRightIcon,
|
ChevronRightIcon,
|
||||||
|
CheckIcon,
|
||||||
} from '@mattermost/compass-icons/components';
|
} from '@mattermost/compass-icons/components';
|
||||||
import type {ChannelCategory} from '@mattermost/types/channel_categories';
|
import type {ChannelCategory} from '@mattermost/types/channel_categories';
|
||||||
import {CategorySorting} from '@mattermost/types/channel_categories';
|
import {CategorySorting} from '@mattermost/types/channel_categories';
|
||||||
@@ -49,7 +50,6 @@ const SidebarCategoryMenu = ({
|
|||||||
const showUnreadsCategory = useSelector(shouldShowUnreadsCategory);
|
const showUnreadsCategory = useSelector(shouldShowUnreadsCategory);
|
||||||
const getUnreadsIdsForCategory = useMemo(makeGetUnreadIdsForCategory, [category]);
|
const getUnreadsIdsForCategory = useMemo(makeGetUnreadIdsForCategory, [category]);
|
||||||
const unreadsIds = useSelector((state: GlobalState) => getUnreadsIdsForCategory(state, category));
|
const unreadsIds = useSelector((state: GlobalState) => getUnreadsIdsForCategory(state, category));
|
||||||
|
|
||||||
const {formatMessage} = useIntl();
|
const {formatMessage} = useIntl();
|
||||||
|
|
||||||
let muteUnmuteCategoryMenuItem: JSX.Element | null = null;
|
let muteUnmuteCategoryMenuItem: JSX.Element | null = null;
|
||||||
@@ -194,6 +194,7 @@ const SidebarCategoryMenu = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
onClick={() => handleSortChannels(CategorySorting.Alphabetical)}
|
onClick={() => handleSortChannels(CategorySorting.Alphabetical)}
|
||||||
|
trailingElements={category.sorting === CategorySorting.Alphabetical ? <CheckIcon size={16}/> : null}
|
||||||
/>
|
/>
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
id={`sortByMostRecent-${category.id}`}
|
id={`sortByMostRecent-${category.id}`}
|
||||||
@@ -204,6 +205,7 @@ const SidebarCategoryMenu = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
onClick={() => handleSortChannels(CategorySorting.Recency)}
|
onClick={() => handleSortChannels(CategorySorting.Recency)}
|
||||||
|
trailingElements={category.sorting === CategorySorting.Recency ? <CheckIcon size={16}/> : null}
|
||||||
/>
|
/>
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
id={`sortManual-${category.id}`}
|
id={`sortManual-${category.id}`}
|
||||||
@@ -214,6 +216,7 @@ const SidebarCategoryMenu = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
onClick={() => handleSortChannels(CategorySorting.Manual)}
|
onClick={() => handleSortChannels(CategorySorting.Manual)}
|
||||||
|
trailingElements={category.sorting === CategorySorting.Manual ? <CheckIcon size={16}/> : null}
|
||||||
/>
|
/>
|
||||||
</Menu.SubMenu>
|
</Menu.SubMenu>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
AccountPlusOutlineIcon,
|
AccountPlusOutlineIcon,
|
||||||
DotsVerticalIcon,
|
DotsVerticalIcon,
|
||||||
ChevronRightIcon,
|
ChevronRightIcon,
|
||||||
|
CheckIcon,
|
||||||
} from '@mattermost/compass-icons/components';
|
} from '@mattermost/compass-icons/components';
|
||||||
import type {ChannelCategory} from '@mattermost/types/channel_categories';
|
import type {ChannelCategory} from '@mattermost/types/channel_categories';
|
||||||
import {CategorySorting} from '@mattermost/types/channel_categories';
|
import {CategorySorting} from '@mattermost/types/channel_categories';
|
||||||
@@ -95,6 +96,7 @@ const SidebarCategorySortingMenu = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
onClick={() => handleSortDirectMessages(CategorySorting.Alphabetical)}
|
onClick={() => handleSortDirectMessages(CategorySorting.Alphabetical)}
|
||||||
|
trailingElements={category.sorting === CategorySorting.Alphabetical ? <CheckIcon size={16}/> : null}
|
||||||
/>
|
/>
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
id={`sortByMostRecent-${category.id}`}
|
id={`sortByMostRecent-${category.id}`}
|
||||||
@@ -105,6 +107,7 @@ const SidebarCategorySortingMenu = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
onClick={() => handleSortDirectMessages(CategorySorting.Recency)}
|
onClick={() => handleSortDirectMessages(CategorySorting.Recency)}
|
||||||
|
trailingElements={category.sorting === CategorySorting.Recency ? <CheckIcon size={16}/> : null}
|
||||||
/>
|
/>
|
||||||
</Menu.SubMenu>
|
</Menu.SubMenu>
|
||||||
|
|
||||||
@@ -153,6 +156,7 @@ const SidebarCategorySortingMenu = ({
|
|||||||
key={`showDmCount-${category.id}-${dmGmShowCount}`}
|
key={`showDmCount-${category.id}-${dmGmShowCount}`}
|
||||||
labels={<span>{dmGmShowCount}</span>}
|
labels={<span>{dmGmShowCount}</span>}
|
||||||
onClick={() => handlelimitVisibleDMsGMs(dmGmShowCount)}
|
onClick={() => handlelimitVisibleDMsGMs(dmGmShowCount)}
|
||||||
|
trailingElements={selectedDmNumber === dmGmShowCount ? <CheckIcon size={16}/> : null}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Menu.SubMenu>
|
</Menu.SubMenu>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user