Clarify non-implemented calendar layouts (#16937)

## Context
Some users are confused with the dropdown showing other calendar
layouts. We've decided to hide it for now since their implementation is
not planned yet.

Before
<img width="1292" height="845" alt="Screenshot 2026-01-05 at 15 06 36"
src="https://github.com/user-attachments/assets/e12e064a-1f58-454c-8933-b3ae2537378a"
/>

After
<img width="1301" height="839" alt="Screenshot 2026-01-05 at 15 00 15"
src="https://github.com/user-attachments/assets/f4a65fb1-ac2e-4068-b7da-1b7ef55b174c"
/>
This commit is contained in:
Weiko
2026-01-05 16:54:51 +01:00
committed by GitHub
parent 3b05375419
commit e83b9c9eb6
2 changed files with 5 additions and 29 deletions
@@ -12,6 +12,7 @@ import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/ho
import { useUpdateCurrentView } from '@/views/hooks/useUpdateCurrentView';
import { t } from '@lingui/core/macro';
import { useRecoilValue, useSetRecoilState } from 'recoil';
import { Pill } from 'twenty-ui/components';
import {
IconCalendarMonth,
IconCalendarWeek,
@@ -81,6 +82,8 @@ export const ObjectOptionsDropdownCalendarViewContent = () => {
text={t`Week`}
selected={recordIndexCalendarLayout === ViewCalendarLayout.WEEK}
focused={selectedItemId === ViewCalendarLayout.WEEK}
contextualText={<Pill label={t`Soon`} />}
contextualTextPosition="right"
disabled
/>
</SelectableListItem>
@@ -105,6 +108,8 @@ export const ObjectOptionsDropdownCalendarViewContent = () => {
text={t`Timeline`}
selected={recordIndexCalendarLayout === ViewCalendarLayout.DAY}
focused={selectedItemId === ViewCalendarLayout.DAY}
contextualText={<Pill label={t`Soon`} />}
contextualTextPosition="right"
disabled
/>
</SelectableListItem>
@@ -1,9 +1,7 @@
import { RecordCalendarComponentInstanceContext } from '@/object-record/record-calendar/states/contexts/RecordCalendarComponentInstanceContext';
import { recordCalendarSelectedDateComponentState } from '@/object-record/record-calendar/states/recordCalendarSelectedDateComponentState';
import { recordIndexCalendarLayoutState } from '@/object-record/record-index/states/recordIndexCalendarLayoutState';
import { DatePickerWithoutCalendar } from '@/ui/input/components/internal/date/components/DatePickerWithoutCalendar';
import { TimeZoneAbbreviation } from '@/ui/input/components/internal/date/components/TimeZoneAbbreviation';
import { Select } from '@/ui/input/components/Select';
import { SelectControl } from '@/ui/input/components/SelectControl';
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
@@ -14,7 +12,6 @@ import { useRecoilComponentState } from '@/ui/utilities/state/component-state/ho
import styled from '@emotion/styled';
import { t } from '@lingui/core/macro';
import { format } from 'date-fns';
import { useRecoilValue } from 'recoil';
import { Temporal } from 'temporal-polyfill';
import { type Nullable } from 'twenty-shared/types';
import {
@@ -23,7 +20,6 @@ import {
} from 'twenty-shared/utils';
import { IconChevronLeft, IconChevronRight } from 'twenty-ui/display';
import { Button } from 'twenty-ui/input';
import { ViewCalendarLayout } from '~/generated/graphql';
const StyledContainer = styled.div`
align-items: center;
@@ -55,10 +51,6 @@ export const RecordCalendarTopBar = () => {
RecordCalendarComponentInstanceContext,
);
const recordIndexCalendarLayout = useRecoilValue(
recordIndexCalendarLayoutState,
);
const [recordCalendarSelectedDate, setRecordCalendarSelectedDate] =
useRecoilComponentState(recordCalendarSelectedDateComponentState);
@@ -98,27 +90,6 @@ export const RecordCalendarTopBar = () => {
return (
<StyledContainer>
<StyledLeftSection>
<Select
dropdownId={`record-calendar-top-bar-layout-select-${recordCalendarId}`}
selectSizeVariant="small"
options={[
{
label: t`Month`,
value: ViewCalendarLayout.MONTH,
},
{
label: t`Week`,
value: ViewCalendarLayout.WEEK,
},
{
label: t`Timeline`,
value: ViewCalendarLayout.DAY,
},
]}
disabled
value={recordIndexCalendarLayout}
onChange={() => {}}
/>
<Dropdown
dropdownId={datePickerDropdownId}
clickableComponent={