From a53c176e36f23f9925376a63861cc6820136913f Mon Sep 17 00:00:00 2001 From: vargajoe Date: Mon, 24 Jul 2023 16:41:47 +0200 Subject: [PATCH 01/15] single column mui --- packages/sn-controls-react/src/viewcontrols/browse-view.tsx | 6 +++--- packages/sn-controls-react/src/viewcontrols/edit-view.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/sn-controls-react/src/viewcontrols/browse-view.tsx b/packages/sn-controls-react/src/viewcontrols/browse-view.tsx index 5b336c69d..3c9f31899 100644 --- a/packages/sn-controls-react/src/viewcontrols/browse-view.tsx +++ b/packages/sn-controls-react/src/viewcontrols/browse-view.tsx @@ -81,9 +81,9 @@ export const BrowseView: React.FC = (props) => { item={true} xs={12} sm={12} - md={isFullWidth ? 12 : 6} - lg={isFullWidth ? 12 : 6} - xl={isFullWidth ? 12 : 6} + md={12} + lg={12} + xl={12} key={field.fieldSettings.Name} className={classes.fieldWrapper}>
diff --git a/packages/sn-controls-react/src/viewcontrols/edit-view.tsx b/packages/sn-controls-react/src/viewcontrols/edit-view.tsx index 77fa6fdc7..945ee5917 100644 --- a/packages/sn-controls-react/src/viewcontrols/edit-view.tsx +++ b/packages/sn-controls-react/src/viewcontrols/edit-view.tsx @@ -153,9 +153,9 @@ export const EditView: React.FC = (props) => { item={true} xs={12} sm={12} - md={isFullWidth ? 12 : 6} - lg={isFullWidth ? 12 : 6} - xl={isFullWidth ? 12 : 6} + md={12} + lg={12} + xl={12} key={field.fieldSettings.Name} className={classes.fieldWrapper}>
{fieldControl}
From 37198ea7f5128bbfbaf048c4988431b72d23d7cb Mon Sep 17 00:00:00 2001 From: vargajoe Date: Thu, 28 Sep 2023 14:34:52 +0200 Subject: [PATCH 02/15] set field full width everywhere --- apps/sensenet/src/components/view-controls/common/styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sensenet/src/components/view-controls/common/styles.ts b/apps/sensenet/src/components/view-controls/common/styles.ts index c00915f4e..cbb9f6f46 100644 --- a/apps/sensenet/src/components/view-controls/common/styles.ts +++ b/apps/sensenet/src/components/view-controls/common/styles.ts @@ -18,7 +18,7 @@ const useStyles = makeStyles(() => { position: 'relative', }, field: { - width: '75%', + width: '88%', position: 'relative', }, fieldFullWidth: { From cde78c75f652bf8f25b91c49f003e52f07d7bb62 Mon Sep 17 00:00:00 2001 From: vargajoe Date: Fri, 29 Sep 2023 11:50:56 +0200 Subject: [PATCH 03/15] fix reference width --- .../src/fieldcontrols/reference-grid/reference-grid.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/sn-controls-react/src/fieldcontrols/reference-grid/reference-grid.tsx b/packages/sn-controls-react/src/fieldcontrols/reference-grid/reference-grid.tsx index e021236e2..c02c33f44 100644 --- a/packages/sn-controls-react/src/fieldcontrols/reference-grid/reference-grid.tsx +++ b/packages/sn-controls-react/src/fieldcontrols/reference-grid/reference-grid.tsx @@ -22,10 +22,12 @@ const styles = { root: { display: 'flex', flexWrap: 'wrap', + alignItems: 'flex-start', }, listContainer: { - display: 'block', + display: 'inline-block', marginTop: 10, + minWidth: 250, }, } From d3859efd745999ea94fd68a0a5c62fb06ae8490c Mon Sep 17 00:00:00 2001 From: vargajoe Date: Fri, 29 Sep 2023 14:20:55 +0200 Subject: [PATCH 04/15] set datetime width --- packages/sn-controls-react/src/fieldcontrols/date-picker.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/sn-controls-react/src/fieldcontrols/date-picker.tsx b/packages/sn-controls-react/src/fieldcontrols/date-picker.tsx index 8b8ff3924..ece38f31e 100644 --- a/packages/sn-controls-react/src/fieldcontrols/date-picker.tsx +++ b/packages/sn-controls-react/src/fieldcontrols/date-picker.tsx @@ -99,6 +99,7 @@ export const DatePicker: React.FC> required={settings.Compulsory} fullWidth={true} format="yyyy MMMM dd" + style={{ width: 220 }} /> ) : ( > required={settings.Compulsory} fullWidth={true} format="yyyy MMMM dd hh:mm aaaa" + style={{ width: 220 }} /> )} {!hideDescription && {settings.Description}} From 832b2d48794a54272fcc5d3b02a59a4350b32c66 Mon Sep 17 00:00:00 2001 From: vargajoe Date: Fri, 29 Sep 2023 14:53:07 +0200 Subject: [PATCH 05/15] date field auto width --- .../src/fieldcontrols/date-picker.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/sn-controls-react/src/fieldcontrols/date-picker.tsx b/packages/sn-controls-react/src/fieldcontrols/date-picker.tsx index ece38f31e..790a24593 100644 --- a/packages/sn-controls-react/src/fieldcontrols/date-picker.tsx +++ b/packages/sn-controls-react/src/fieldcontrols/date-picker.tsx @@ -95,11 +95,10 @@ export const DatePicker: React.FC> label={settings.DisplayName} id={settings.Name} disabled={settings.ReadOnly} - placeholder={settings.DisplayName} + // placeholder={settings.DisplayName} + InputLabelProps={{ shrink: true }} required={settings.Compulsory} - fullWidth={true} format="yyyy MMMM dd" - style={{ width: 220 }} /> ) : ( > name={settings.Name} id={settings.Name} disabled={settings.ReadOnly} - placeholder={settings.DisplayName} + // placeholder={settings.DisplayName} + InputLabelProps={{ shrink: true }} required={settings.Compulsory} - fullWidth={true} format="yyyy MMMM dd hh:mm aaaa" - style={{ width: 220 }} /> )} {!hideDescription && {settings.Description}} From 2d2e56d1bcfecb1b18b38b3915e7bdefe8dc3947 Mon Sep 17 00:00:00 2001 From: vargajoe Date: Fri, 29 Sep 2023 15:05:35 +0200 Subject: [PATCH 06/15] set switcher auto width --- packages/sn-controls-react/src/fieldcontrols/switcher.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sn-controls-react/src/fieldcontrols/switcher.tsx b/packages/sn-controls-react/src/fieldcontrols/switcher.tsx index 00c841fb9..93fcdb48e 100644 --- a/packages/sn-controls-react/src/fieldcontrols/switcher.tsx +++ b/packages/sn-controls-react/src/fieldcontrols/switcher.tsx @@ -89,7 +89,7 @@ const useStyles = makeStyles(() => alignItems: 'flex-start', }, alignedCenter: { - alignItems: 'center', + alignItems: 'flex-start', }, }), ) From ba4c49e5b65e582bc38d85bbeeb6e5851cd074c8 Mon Sep 17 00:00:00 2001 From: vargajoe Date: Fri, 29 Sep 2023 15:09:27 +0200 Subject: [PATCH 07/15] set number auto width --- packages/sn-controls-react/src/fieldcontrols/number.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sn-controls-react/src/fieldcontrols/number.tsx b/packages/sn-controls-react/src/fieldcontrols/number.tsx index 885887ccc..9a3ebf34f 100644 --- a/packages/sn-controls-react/src/fieldcontrols/number.tsx +++ b/packages/sn-controls-react/src/fieldcontrols/number.tsx @@ -65,7 +65,8 @@ export const NumberField: React.FC% : null, @@ -76,7 +77,6 @@ export const NumberField: React.FC {!props.hideDescription && {props.settings.Description}} From 7a2eb992f08745722a6d3a2976adc3d65876a145 Mon Sep 17 00:00:00 2001 From: vargajoe Date: Fri, 29 Sep 2023 15:31:18 +0200 Subject: [PATCH 08/15] set dropdown auto width --- .../sn-controls-react/src/fieldcontrols/dropdown-list.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/sn-controls-react/src/fieldcontrols/dropdown-list.tsx b/packages/sn-controls-react/src/fieldcontrols/dropdown-list.tsx index 9b5c51e4b..abf23f442 100644 --- a/packages/sn-controls-react/src/fieldcontrols/dropdown-list.tsx +++ b/packages/sn-controls-react/src/fieldcontrols/dropdown-list.tsx @@ -56,7 +56,10 @@ export const DropDownList: React.FC> case 'edit': case 'new': return ( - + {props.settings.DisplayName}