diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index c7d86e968bd..32699950e3c 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -192,6 +192,7 @@ This will allow to integrate the command palette in other contexts than the work * Duplicate an object * Duplicate a representation As a result, some of those menu items are not contributed anymore on invalid use cases such as being able to create a new object in a read only library. +- https://github.com/eclipse-sirius/sirius-web/issues/5702[#5702] [table] Improve the rendering of components used in table cells == 2025.10.0 diff --git a/packages/tables/frontend/sirius-components-tables/src/cells/Cell.tsx b/packages/tables/frontend/sirius-components-tables/src/cells/Cell.tsx index dade1278b3e..b852dec7784 100644 --- a/packages/tables/frontend/sirius-components-tables/src/cells/Cell.tsx +++ b/packages/tables/frontend/sirius-components-tables/src/cells/Cell.tsx @@ -41,7 +41,8 @@ const isIconLabelCell = (cell: GQLCell): cell is GQLIconLabelCell => cell.__type const useStyles = makeStyles()((theme) => ({ wrapper: { - padding: theme.spacing(2), + paddingRight: theme.spacing(1), + paddingLeft: theme.spacing(1), height: '100%', width: '100%', cursor: 'pointer', diff --git a/packages/tables/frontend/sirius-components-tables/src/cells/IconLabelCell.tsx b/packages/tables/frontend/sirius-components-tables/src/cells/IconLabelCell.tsx index dd7b4968186..3578498267b 100644 --- a/packages/tables/frontend/sirius-components-tables/src/cells/IconLabelCell.tsx +++ b/packages/tables/frontend/sirius-components-tables/src/cells/IconLabelCell.tsx @@ -20,7 +20,7 @@ export const IconLabelCell = ({ cell }: IconLabelCellProps) => { const theme = useTheme(); return ( - + {cell.label} diff --git a/packages/tables/frontend/sirius-components-tables/src/cells/MultiSelectCell.tsx b/packages/tables/frontend/sirius-components-tables/src/cells/MultiSelectCell.tsx index 16a9c4bfaaf..e268014a329 100644 --- a/packages/tables/frontend/sirius-components-tables/src/cells/MultiSelectCell.tsx +++ b/packages/tables/frontend/sirius-components-tables/src/cells/MultiSelectCell.tsx @@ -53,7 +53,10 @@ export const MultiSelectCell = ({ disabled={disabled || loading} multiple size="small" - fullWidth> + disableUnderline={true} + fullWidth + variant="standard" + sx={{ height: '100%' }}> {cell.options.map((option) => { return ( diff --git a/packages/tables/frontend/sirius-components-tables/src/cells/SelectCell.tsx b/packages/tables/frontend/sirius-components-tables/src/cells/SelectCell.tsx index 57b1f188b3b..f0d9d8e72be 100644 --- a/packages/tables/frontend/sirius-components-tables/src/cells/SelectCell.tsx +++ b/packages/tables/frontend/sirius-components-tables/src/cells/SelectCell.tsx @@ -25,7 +25,15 @@ export const SelectCell = ({ editingContextId, representationId, tableId, cell, }; return ( - {cell.options.map((option) => { return ( diff --git a/packages/tables/frontend/sirius-components-tables/src/cells/TextareaCell.tsx b/packages/tables/frontend/sirius-components-tables/src/cells/TextareaCell.tsx index 730d834b579..7455eb3f34b 100644 --- a/packages/tables/frontend/sirius-components-tables/src/cells/TextareaCell.tsx +++ b/packages/tables/frontend/sirius-components-tables/src/cells/TextareaCell.tsx @@ -12,20 +12,10 @@ *******************************************************************************/ import TextField from '@mui/material/TextField'; import React, { useEffect, useState } from 'react'; -import { makeStyles } from 'tss-react/mui'; import { TextareaCellProps, TextareaCellState } from './TextareaCell.types'; import { useEditTextareaCell } from './useEditTextareaCell'; -const useTextareaCellStyles = makeStyles()(() => ({ - wrapper: { - overflow: 'auto', - width: '100%', - height: '100%', - }, -})); - export const TextareaCell = ({ editingContextId, representationId, tableId, cell, disabled }: TextareaCellProps) => { - const { classes } = useTextareaCellStyles(); const [state, setState] = useState({ value: cell.stringValue, }); @@ -46,29 +36,31 @@ export const TextareaCell = ({ editingContextId, representationId, tableId, cell }; return ( -
- -
+ }, + }} + /> ); }; diff --git a/packages/tables/frontend/sirius-components-tables/src/cells/TextfieldCell.tsx b/packages/tables/frontend/sirius-components-tables/src/cells/TextfieldCell.tsx index 06bb3ecec68..72d6baf47b3 100644 --- a/packages/tables/frontend/sirius-components-tables/src/cells/TextfieldCell.tsx +++ b/packages/tables/frontend/sirius-components-tables/src/cells/TextfieldCell.tsx @@ -53,18 +53,14 @@ export const TextfieldCell = ({ editingContextId, representationId, tableId, cel fullWidth variant="standard" sx={{ height: '100%' }} - InputProps={{ - disableUnderline: true, - sx: { - marginBottom: 0, - padding: '0px', - height: '100%', - }, - }} - inputProps={{ - sx: { - padding: '0px', - height: '100%', + slotProps={{ + input: { + disableUnderline: true, + sx: { + marginBottom: 0, + padding: '0px', + height: '100%', + }, }, }} />