Feat/view groups fast follow (#9513)
Fix #9512 - 🟠 [Icon should be lighter](https://discord.com/channels/1130383047699738754/1326487470895923222) The current weight is the same as in Figma, waiting for confirmation - 🟠 [None has an unwanted margin left](https://discord.com/channels/1130383047699738754/1326493647796961323) This component is used in lot of places, removing the padding left can brake other places - 🟢 [All cells should have a the same right design](https://discord.com/channels/1130383047699738754/1326489001926066176) - 🔴 [Group Sorting should not "freeze" when mouse is release](https://discord.com/channels/1130383047699738754/1326494381795966996) Can't find a good way to fix it, seems more related to the fact it's running in debug mode. - 🟢 [Alignment issue](https://discord.com/channels/1130383047699738754/1326486523822084140) - 🟢 [View record count error](https://discord.com/channels/1130383047699738754/1326491489466978365) - 🟢 [Vertically align tags and numbers/count](https://discord.com/channels/1130383047699738754/1326490661800902728) - 🟢 [Display "Calculate" only on hover in view groups](https://discord.com/channels/1130383047699738754/1326490411929436191) - 🟢 [Aggregates height in view groups is 28px instead of 32px](https://discord.com/channels/1130383047699738754/1326489587127943188) - 🟠 [Picker under the aggregate](https://discord.com/channels/1130383047699738754/1326487940557439039) Can't reproduce the issue - 🟢 [Icon should not be hoverable](https://discord.com/channels/1130383047699738754/1326477402360123425) - 🟢 [Crop long view titles](https://discord.com/channels/1130383047699738754/1326477009576136755) - 🟢 [Removing the group by on opportunities (group by none) give an white screen](https://discord.com/channels/1130383047699738754/1324651927962910750)
This commit is contained in:
@ -1,13 +0,0 @@
|
||||
import { useSetRecoilComponentStateV2 } from '@/ui/utilities/state/component-state/hooks/useSetRecoilComponentStateV2';
|
||||
import { entityCountInCurrentViewComponentState } from '@/views/states/entityCountInCurrentViewComponentState';
|
||||
|
||||
export const useSetRecordCountInCurrentView = (viewBarComponentId?: string) => {
|
||||
const setEntityCountInCurrentView = useSetRecoilComponentStateV2(
|
||||
entityCountInCurrentViewComponentState,
|
||||
viewBarComponentId,
|
||||
);
|
||||
|
||||
return {
|
||||
setRecordCountInCurrentView: setEntityCountInCurrentView,
|
||||
};
|
||||
};
|
||||
@ -1,10 +0,0 @@
|
||||
import { createComponentStateV2 } from '@/ui/utilities/state/component-state/utils/createComponentStateV2';
|
||||
import { ViewComponentInstanceContext } from '@/views/states/contexts/ViewComponentInstanceContext';
|
||||
|
||||
export const entityCountInCurrentViewComponentState = createComponentStateV2<
|
||||
number | undefined
|
||||
>({
|
||||
key: 'entityCountInCurrentViewComponentState',
|
||||
defaultValue: undefined,
|
||||
componentInstanceContext: ViewComponentInstanceContext,
|
||||
});
|
||||
@ -7,12 +7,12 @@ import {
|
||||
useIcons,
|
||||
} from 'twenty-ui';
|
||||
|
||||
import { recordIndexEntityCountComponentSelector } from '@/object-record/record-index/states/selectors/recordIndexEntityCountComponentSelector';
|
||||
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
||||
import { StyledDropdownButtonContainer } from '@/ui/layout/dropdown/components/StyledDropdownButtonContainer';
|
||||
import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';
|
||||
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
|
||||
import { useGetCurrentView } from '@/views/hooks/useGetCurrentView';
|
||||
import { entityCountInCurrentViewComponentState } from '@/views/states/entityCountInCurrentViewComponentState';
|
||||
import { ViewsHotkeyScope } from '@/views/types/ViewsHotkeyScope';
|
||||
import { ViewPickerContentCreateMode } from '@/views/view-picker/components/ViewPickerContentCreateMode';
|
||||
import { ViewPickerContentEditMode } from '@/views/view-picker/components/ViewPickerContentEditMode';
|
||||
@ -55,8 +55,8 @@ export const ViewPickerDropdown = () => {
|
||||
|
||||
const { updateViewFromCurrentState } = useUpdateViewFromCurrentState();
|
||||
|
||||
const entityCountInCurrentView = useRecoilComponentValueV2(
|
||||
entityCountInCurrentViewComponentState,
|
||||
const entityCount = useRecoilComponentValueV2(
|
||||
recordIndexEntityCountComponentSelector,
|
||||
);
|
||||
|
||||
const { isDropdownOpen: isViewsListDropdownOpen } = useDropdown(
|
||||
@ -94,9 +94,7 @@ export const ViewPickerDropdown = () => {
|
||||
{currentViewWithCombinedFiltersAndSorts?.name ?? 'All'}
|
||||
</StyledViewName>
|
||||
<StyledDropdownLabelAdornments>
|
||||
{isDefined(entityCountInCurrentView) && (
|
||||
<>· {entityCountInCurrentView} </>
|
||||
)}
|
||||
{isDefined(entityCount) && <>· {entityCount} </>}
|
||||
<IconChevronDown size={theme.icon.size.sm} />
|
||||
</StyledDropdownLabelAdornments>
|
||||
</StyledDropdownButtonContainer>
|
||||
|
||||
Reference in New Issue
Block a user