diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b09b1748..9ae362f29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,5 +42,7 @@ All notable, unreleased changes to this project will be documented in this file. - Fix empty attribute values - #218 by @dominik-zeglen - Add language switch - #213 by @dominik-zeglen - Fix copy - #223, #224 by @dominik-zeglen +- Fix ui improvements - #226 by @benekex2 - Fix attribute errors - #216 by @dominik-zeglen +- Fix column picker - #228 by @dominik-zeglen - Add readonly mode - #229 by @dominik-zeglen diff --git a/src/attributes/components/AttributeProperties/AttributeProperties.tsx b/src/attributes/components/AttributeProperties/AttributeProperties.tsx index 45cdd9906..0e5d2d958 100644 --- a/src/attributes/components/AttributeProperties/AttributeProperties.tsx +++ b/src/attributes/components/AttributeProperties/AttributeProperties.tsx @@ -74,7 +74,7 @@ const AttributeProperties: React.FC = ({ createStyles({ appAction: { + [theme.breakpoints.down("sm")]: { + left: 0, + width: "100%" + }, bottom: 0, gridColumn: 2, + height: 70, position: "sticky", zIndex: 10 }, appLoader: { height: appLoaderHeight, + marginBottom: theme.spacing.unit * 2, zIndex: 1201 }, + appLoaderPlaceholder: { + height: appLoaderHeight, + marginBottom: theme.spacing.unit * 2 + }, arrow: { marginLeft: theme.spacing.unit * 2, transition: theme.transitions.duration.standard + "ms" @@ -75,11 +85,7 @@ const styles = (theme: Theme) => header: { display: "flex", height: 40, - marginBottom: theme.spacing.unit * 3, - marginTop: theme.spacing.unit * 2 - }, - hide: { - opacity: 0 + marginBottom: theme.spacing.unit * 3 }, isMenuSmall: { "& path": { @@ -256,6 +262,11 @@ const styles = (theme: Theme) => [theme.breakpoints.up("sm")]: { paddingBottom: theme.spacing.unit * 3 } + }, + viewContainer: { + minHeight: `calc(100vh - ${theme.spacing.unit * 2 + + appLoaderHeight + + 70}px)` } }); @@ -316,12 +327,6 @@ const AppLayout = withStyles(styles, { {({ isProgress }) => ( -
-
- -
-
setDrawerState(!isDrawerOpened)} - > - - - - -
-
-
-
- + {isProgress ? ( + + ) : ( +
+ )} +
+
+ +
setDrawerState(!isDrawerOpened)} > - - ) - } - className={classes.userChip} - label={ - <> - {user.email} - - - } - onClick={() => setMenuState(!isMenuOpened)} + + + + +
+
+
+
+ - - {({ TransitionProps, placement }) => ( - - - setMenuState(false)} - mouseEvent="onClick" - > - - - - - - - - - - - - )} - + + ) + } + className={classes.userChip} + label={ + <> + {user.email} + + + } + onClick={() => setMenuState(!isMenuOpened)} + /> + + {({ TransitionProps, placement }) => ( + + + + setMenuState(false) + } + mouseEvent="onClick" + > + + + + + + + + + + + + )} + +
-
-
+ +
+
{children}
-
{children}
diff --git a/src/components/Checkbox/Checkbox.tsx b/src/components/Checkbox/Checkbox.tsx index c698f1a89..c0ebe2025 100644 --- a/src/components/Checkbox/Checkbox.tsx +++ b/src/components/Checkbox/Checkbox.tsx @@ -83,7 +83,7 @@ const styles = (theme: Theme) => display: "flex", height: 30, justifyContent: "center", - margin: 9, + margin: "5px 9px", width: 30 } }); diff --git a/src/components/ColumnPicker/ColumnPickerContent.tsx b/src/components/ColumnPicker/ColumnPickerContent.tsx index bef6aa779..bffe1bc82 100644 --- a/src/components/ColumnPicker/ColumnPickerContent.tsx +++ b/src/components/ColumnPicker/ColumnPickerContent.tsx @@ -87,10 +87,11 @@ const ColumnPickerContent: React.FC = props => { const anchor = React.useRef(); const scrollPosition = useElementScroll(anchor); - const dropShadow = anchor.current - ? scrollPosition.y + anchor.current.clientHeight < - anchor.current.scrollHeight - : false; + const dropShadow = + anchor.current && scrollPosition + ? scrollPosition.y + anchor.current.clientHeight < + anchor.current.scrollHeight + : false; return ( diff --git a/src/components/ControlledSwitch.tsx b/src/components/ControlledSwitch.tsx index 07a244006..b9d9e6a36 100644 --- a/src/components/ControlledSwitch.tsx +++ b/src/components/ControlledSwitch.tsx @@ -6,7 +6,7 @@ import React from "react"; const styles = (theme: Theme) => createStyles({ label: { - marginLeft: theme.spacing.unit * 2 + marginLeft: theme.spacing.unit * 3.5 }, labelText: { fontSize: 14 diff --git a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx index ada7a0e46..d9ee6d375 100644 --- a/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx +++ b/src/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx @@ -93,7 +93,6 @@ const SingleAutocompleteSelectFieldComponent = withStyles(styles, { inputValue, selectedItem, toggleMenu, - openMenu, closeMenu, highlightedIndex, reset @@ -127,13 +126,13 @@ const SingleAutocompleteSelectFieldComponent = withStyles(styles, { }), endAdornment: (
- +
), error, id: undefined, onBlur: closeMenu, - onFocus: openMenu + onClick: toggleMenu }} error={error} disabled={disabled} diff --git a/src/components/Timeline/Timeline.tsx b/src/components/Timeline/Timeline.tsx index 1c449c8e8..5489fa695 100644 --- a/src/components/Timeline/Timeline.tsx +++ b/src/components/Timeline/Timeline.tsx @@ -71,6 +71,7 @@ interface TimelineProps extends WithStyles { interface TimelineAddNoteProps extends WithStyles { message: string; + reset: () => void; onChange(event: React.ChangeEvent); onSubmit(event: React.FormEvent); } @@ -82,9 +83,14 @@ export const Timeline = withStyles(styles, { name: "Timeline" })( ); export const TimelineAddNote = withStyles(styles, { name: "TimelineAddNote" })( - ({ classes, message, onChange, onSubmit }: TimelineAddNoteProps) => { + ({ classes, message, onChange, onSubmit, reset }: TimelineAddNoteProps) => { const intl = useIntl(); + const submit = e => { + reset(); + onSubmit(e); + }; + return (
@@ -106,7 +112,7 @@ export const TimelineAddNote = withStyles(styles, { name: "TimelineAddNote" })( multiline InputProps={{ endAdornment: ( -
+
+

+ admin@example.com +

+

+ +

+
-
-

- admin@example.com -

-

- -

-
-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.

@@ -6787,37 +6784,34 @@ exports[`Storyshots Generics / Timeline with order notes 1`] = ` />
+
+

+ ceo@example.com +

+

+ +

+
-
-

- ceo@example.com -

-

- -

-
-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.

@@ -8378,7 +8372,7 @@ exports[`Storyshots Views / Attributes / Attribute details create 1`] = ` - Use in faceted navigation + Use in Faceted Navigation
- Use in faceted navigation + Use in Faceted Navigation
- Use in faceted navigation + Use in Faceted Navigation
- Use in faceted navigation + Use in Faceted Navigation
- Use in faceted navigation + Use in Faceted Navigation
- Use in faceted navigation + Use in Faceted Navigation
}, flat: { "& span": { - color: colors.font.gray + color: colors.font.default } }, flatPrimary: { @@ -100,6 +100,9 @@ export default (colors: IThemeColors): Theme => }, MuiDialogContent: { root: { + "& label": { + overflowX: "hidden" + }, padding: "5px 24px 24px" } },