Mobile: Panes: larger items

This commit is contained in:
Enrico Ros
2025-06-10 11:00:14 -07:00
parent c2e0cd844b
commit f8d80730fe
2 changed files with 8 additions and 2 deletions
@@ -5,6 +5,7 @@ import { Box, List, Sheet, styled } from '@mui/joy';
import { NavItemApp } from '~/common/app.nav';
import { themeScalingMap, themeZIndexDesktopPanel } from '~/common/app.theme';
import { useIsMobile } from '~/common/components/useMatchMedia';
import { useUIContentScaling } from '~/common/stores/store-ui';
import { PanelContentPortal } from './PanelContentPortal';
@@ -64,7 +65,9 @@ const sheetClosedSx: SxProps = {
export function DesktopPanel(props: { component: React.ElementType, currentApp?: NavItemApp }) {
// external state
const contentScaling = useUIContentScaling();
const isMobile = useIsMobile();
const _contentScaling = useUIContentScaling();
const contentScaling = isMobile ? 'md' : _contentScaling;
const { panelShownAsPanel: isOpen, panelAsPopup } = useOptimaPanelOpen(false, props.currentApp);
// Close the panel if the current page goes for a popup instead
@@ -5,6 +5,7 @@ import { Box, Checkbox, MenuList } from '@mui/joy';
import { ExpanderControlledBox } from '~/common/components/ExpanderControlledBox';
import { themeScalingMap } from '~/common/app.theme';
import { useIsMobile } from '~/common/components/useMatchMedia';
import { useUIContentScaling } from '~/common/stores/store-ui';
import { OPTIMA_PANEL_GROUPS_SPACING } from '../optima.config';
@@ -97,7 +98,9 @@ export function OptimaPanelGroupedList(props: {
const [_expanded, setExpanded] = React.useState(props.startExpanded === true);
// external state
const contentScaling = useUIContentScaling();
const isMobile = useIsMobile();
const _contentScaling = useUIContentScaling();
const contentScaling = isMobile ? 'md' : _contentScaling;
// derived state
const isCollapsible = !!props.persistentCollapsibleId;