diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 85aea31a464..c20352cbc42 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -76,6 +76,8 @@ image:doc/screenshots/inside_outside_labels.png[Isinde outside label example, 70 - https://github.com/eclipse-sirius/sirius-web/issues/3279[#3279] [gantt] The expressions `TaskDescription#startTimeExpression` and `TaskDescription#endTimeExpression` can now both accept `String` values as a result if those values can be parsed by `java.timeInstant#parse`. They still support returning an `java.time.Instant` object directly. - https://github.com/eclipse-sirius/sirius-web/issues/3309[#3309] [diagram] Hide header border-bottom when the node is collapsed +- https://github.com/eclipse-sirius/sirius-web/issues/3312[#3312] Make the details view more compact + == v2024.3.0 diff --git a/packages/forms/frontend/sirius-components-forms/src/propertysections/ButtonPropertySection.tsx b/packages/forms/frontend/sirius-components-forms/src/propertysections/ButtonPropertySection.tsx index 69cbfe88257..0e11ed9daec 100644 --- a/packages/forms/frontend/sirius-components-forms/src/propertysections/ButtonPropertySection.tsx +++ b/packages/forms/frontend/sirius-components-forms/src/propertysections/ButtonPropertySection.tsx @@ -58,6 +58,11 @@ const useStyle = makeStyles((theme) => ({ icon: { marginRight: ({ iconOnly }) => (iconOnly ? theme.spacing(0) : theme.spacing(2)), }, + propertySection: { + display: 'flex', + flexDirection: 'row', + gap: theme.spacing(2), + }, })); export const pushButtonMutation = gql` @@ -194,7 +199,7 @@ export const ButtonPropertySection: PropertySectionComponent = ({ }; return ( -
+
((theme) => ({ fontWeight: ({ bold }) => (bold ? 'bold' : null), textDecorationLine: ({ underline, strikeThrough }) => getTextDecorationLineValue(underline, strikeThrough), verticalAlign: 'baseline', - 'align-items': 'center', + alignItems: 'center', display: 'flex', - margingLeft: theme.spacing(2), + }, + propertySection: { + display: 'flex', + flexDirection: 'row', + gap: theme.spacing(2), }, })); @@ -49,7 +53,7 @@ export const LabelWidgetPropertySection: PropertySectionComponent +
({ display: 'flex', flexDirection: 'row', alignItems: 'center', - marginRight: theme.spacing(2), }, subscribers: { marginLeft: 'auto', @@ -46,21 +45,26 @@ const usePropertySectionLabelStyles = makeStyles((theme) => ({ export const PropertySectionLabel = ({ editingContextId, formId, widget, subscribers }: PropertySectionLabelProps) => { const classes = usePropertySectionLabelStyles(); - return ( -
- - {widget.label} - - {widget.hasHelpText ? ( - - ) : null} -
- {subscribers.map((subscriber) => ( - - {subscriber.username.substring(0, 1).toUpperCase()} - - ))} + + if (!widget.label && subscribers.length == 0 && !widget.hasHelpText) { + return null; + } else { + return ( +
+ + {widget.label} + + {widget.hasHelpText ? ( + + ) : null} +
+ {subscribers.map((subscriber) => ( + + {subscriber.username.substring(0, 1).toUpperCase()} + + ))} +
-
- ); + ); + } }; diff --git a/packages/forms/frontend/sirius-components-forms/src/propertysections/SplitButtonPropertySection.tsx b/packages/forms/frontend/sirius-components-forms/src/propertysections/SplitButtonPropertySection.tsx index 4651812112a..4da8a7c4601 100644 --- a/packages/forms/frontend/sirius-components-forms/src/propertysections/SplitButtonPropertySection.tsx +++ b/packages/forms/frontend/sirius-components-forms/src/propertysections/SplitButtonPropertySection.tsx @@ -78,6 +78,14 @@ const useStyle = makeStyles((theme) => ({ }, })); +const useContainerStyle = makeStyles((theme) => ({ + style: { + display: 'flex', + flexDirection: 'row', + gap: theme.spacing(2), + }, +})); + export const updateWidgetFocusMutation = gql` mutation updateWidgetFocus($input: UpdateWidgetFocusInput!) { updateWidgetFocus(input: $input) { @@ -161,6 +169,8 @@ export const SplitButtonPropertySection = ({ return useStyle(props); }); + const containerClasses = useContainerStyle(); + const [pushButton, { loading, data, error }] = useMutation( pushButtonMutation ); @@ -245,7 +255,7 @@ export const SplitButtonPropertySection = ({ }; return ( -
+