[WEB-4552] fix: stickies layout + minified layout filter (#7466)
This commit is contained in:
parent
b7be45d08a
commit
3c6e2b4447
5 changed files with 22 additions and 6 deletions
|
|
@ -228,7 +228,13 @@ export const CycleIssuesHeader: React.FC = observer(() => {
|
|||
</div>
|
||||
<div className="flex @4xl:hidden">
|
||||
<MobileLayoutSelection
|
||||
layouts={[EIssueLayoutTypes.LIST, EIssueLayoutTypes.KANBAN, EIssueLayoutTypes.CALENDAR]}
|
||||
layouts={[
|
||||
EIssueLayoutTypes.LIST,
|
||||
EIssueLayoutTypes.KANBAN,
|
||||
EIssueLayoutTypes.CALENDAR,
|
||||
EIssueLayoutTypes.SPREADSHEET,
|
||||
EIssueLayoutTypes.GANTT,
|
||||
]}
|
||||
onChange={(layout) => handleLayoutChange(layout)}
|
||||
activeLayout={activeLayout}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -219,7 +219,13 @@ export const ModuleIssuesHeader: React.FC = observer(() => {
|
|||
</div>
|
||||
<div className="flex @4xl:hidden">
|
||||
<MobileLayoutSelection
|
||||
layouts={[EIssueLayoutTypes.LIST, EIssueLayoutTypes.KANBAN, EIssueLayoutTypes.CALENDAR]}
|
||||
layouts={[
|
||||
EIssueLayoutTypes.LIST,
|
||||
EIssueLayoutTypes.KANBAN,
|
||||
EIssueLayoutTypes.CALENDAR,
|
||||
EIssueLayoutTypes.SPREADSHEET,
|
||||
EIssueLayoutTypes.GANTT,
|
||||
]}
|
||||
onChange={(layout) => handleLayoutChange(layout)}
|
||||
activeLayout={activeLayout}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export const MobileLayoutSelection = ({
|
|||
className="flex items-center gap-2"
|
||||
>
|
||||
<IssueLayoutIcon layout={layout.key} className="h-3 w-3" />
|
||||
<div className="text-custom-text-300">{t(layout.i18n_title)}</div>
|
||||
<div className="text-custom-text-300">{t(layout.i18n_label)}</div>
|
||||
</CustomMenu.MenuItem>
|
||||
))}
|
||||
</CustomMenu>
|
||||
|
|
|
|||
|
|
@ -182,10 +182,13 @@ export const StickiesLayout = (props: TStickiesLayout) => {
|
|||
}, []);
|
||||
|
||||
const getColumnCount = (width: number | null): number => {
|
||||
if (width === null) return 3;
|
||||
if (width === null) return 4;
|
||||
|
||||
if (width < 640) return 2;
|
||||
return 3;
|
||||
if (width < 640) return 2; // sm
|
||||
if (width < 850) return 3; // md
|
||||
if (width < 1024) return 4; // lg
|
||||
if (width < 1280) return 5; // xl
|
||||
return 6; // 2xl and above
|
||||
};
|
||||
const columnCount = getColumnCount(containerWidth);
|
||||
|
||||
|
|
|
|||
|
|
@ -62,4 +62,5 @@ export const ISSUE_LAYOUT_MAP: TIssueLayoutMap = {
|
|||
export const ISSUE_LAYOUTS: {
|
||||
key: EIssueLayoutTypes;
|
||||
i18n_title: string;
|
||||
i18n_label: string;
|
||||
}[] = Object.values(ISSUE_LAYOUT_MAP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue