Skip to content

Feature: Schema title bar #2246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 69 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
6137360
Common breadcrumbs
agalin920 Aug 16, 2023
a6bea65
content layout rework
agalin920 Aug 16, 2023
aa61c16
Full item edit header swap
agalin920 Aug 21, 2023
69f3f48
Version and language selector
agalin920 Aug 21, 2023
64cf529
move files
agalin920 Aug 21, 2023
c0900a2
re-org and permissions
agalin920 Aug 21, 2023
ac51b83
duo mode toggle
agalin920 Aug 21, 2023
f7340a5
disabled fix
agalin920 Aug 21, 2023
80a798f
Add duplicate item dialog
agalin920 Aug 21, 2023
4f1c909
duplicate content item
agalin920 Aug 21, 2023
4cc5582
Add preview button and urls
agalin920 Aug 22, 2023
eb4f378
Hide Schedule unpublish
agalin920 Aug 22, 2023
60a1359
Resolve vqa changes
agalin920 Aug 23, 2023
d4e0585
vqa changes
agalin920 Aug 24, 2023
ed2dcb8
min width update
agalin920 Aug 24, 2023
71285e9
tabs regression on other apps and update pages of other content tabs
agalin920 Aug 24, 2023
9dba452
remove comments
agalin920 Aug 24, 2023
3f7e7e8
merge master
agalin920 Aug 24, 2023
c7ef351
icon colors on schema tabs
agalin920 Aug 24, 2023
6c5e49d
typing fix
agalin920 Aug 24, 2023
ce4f149
Center analytics metrics and update padding
agalin920 Aug 24, 2023
e251ad6
cypress updates
agalin920 Aug 25, 2023
e8350bd
remove local package
agalin920 Aug 25, 2023
d10d90d
task: update all models header
finnar-bin Aug 29, 2023
aa30319
task: update search page header
finnar-bin Aug 29, 2023
d5144b5
task: set min-height
finnar-bin Aug 29, 2023
ccaa35f
Responsive content title bar
agalin920 Aug 29, 2023
3df2309
only wrap below 900
agalin920 Aug 30, 2023
003cc3a
Merge branch 'feature/content-title-bar' of github.com:zesty-io/manag…
finnar-bin Aug 31, 2023
88a56aa
task: update layout
finnar-bin Aug 31, 2023
374db16
task: add breadcrumbs
finnar-bin Aug 31, 2023
3c83b00
task: map tabs
finnar-bin Aug 31, 2023
e702f5f
Merge branch 'master' into feature/content-title-bar
shrunyan Aug 31, 2023
905aeac
Merge branch 'feature/content-title-bar' of github.com:zesty-io/manag…
finnar-bin Sep 1, 2023
6dc01df
task: fields layout
finnar-bin Sep 1, 2023
887755b
task: spacing update
finnar-bin Sep 1, 2023
933c8a1
task: card list and info tab layout update
finnar-bin Sep 4, 2023
a36505d
task: remove zuid
finnar-bin Sep 4, 2023
5d68344
task: spacing update
finnar-bin Sep 4, 2023
5cbfc4d
task: dashboard title bar update
finnar-bin Sep 5, 2023
49530d0
task: use transparent bg image
finnar-bin Sep 5, 2023
ad6fc39
task: search header updates
finnar-bin Sep 5, 2023
c20303a
task: update create model dialog modal layout
finnar-bin Sep 5, 2023
d638996
task: duplicate model spacing update
finnar-bin Sep 5, 2023
8420fbe
task: select field spacing
finnar-bin Sep 5, 2023
e2b606e
task: field form spacing
finnar-bin Sep 5, 2023
070f249
task: spacing
finnar-bin Sep 5, 2023
2753fb8
test fixes
agalin920 Sep 5, 2023
fb9029e
Bump dependency
agalin920 Sep 5, 2023
db06a9e
task: fix form field spacing
finnar-bin Sep 6, 2023
86adaec
Merge branch 'feature/content-title-bar' of github.com:zesty-io/manag…
finnar-bin Sep 6, 2023
57587ee
task: change border color declaration
finnar-bin Sep 6, 2023
79452d5
Merge branch 'master' of github.com:zesty-io/manager-ui into feature/…
finnar-bin Sep 7, 2023
c67b4fd
revert lock file
finnar-bin Sep 7, 2023
740a080
task: all models vqa update
finnar-bin Sep 7, 2023
56044f8
task: move breadcrumbs down
finnar-bin Sep 7, 2023
d2edeb0
task: select model type vqa update
finnar-bin Sep 7, 2023
f87d8de
task: modal width
finnar-bin Sep 7, 2023
098be85
task: strong model label
finnar-bin Sep 7, 2023
67e5461
task: spacing
finnar-bin Sep 7, 2023
5041c62
task: field selection spacing
finnar-bin Sep 7, 2023
8431ef2
task: update info tab
finnar-bin Sep 7, 2023
81ea05a
task: api tab update
finnar-bin Sep 7, 2023
f56ad95
task: replace schema icon
finnar-bin Sep 7, 2023
6f0875d
task: use model label
finnar-bin Sep 7, 2023
ec91d9e
Merge branch 'master' of github.com:zesty-io/manager-ui into feature/…
finnar-bin Sep 7, 2023
66be9fc
task: vqa round 2 updates
finnar-bin Sep 7, 2023
4280cbd
fix: cypress test
finnar-bin Sep 8, 2023
9af94d1
task: add cypress test for breadcrumbs
finnar-bin Sep 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cypress/e2e/schema/activity-log.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ describe("Schema: Activity Log Tab", () => {
});

it("Shows the no logs found message", () => {
cy.visit(
"/schema/6-ce80dbfe90-ptjpm6/activity-log?from=2099-02-15&to=2099-03-15"
);
cy.waitOn("/v1/env/audits*", () => {
cy.visit(
"/schema/6-ce80dbfe90-ptjpm6/activity-log?from=2099-02-15&to=2099-03-15"
);
});

cy.contains("No Logs Found");
});
Expand Down
15 changes: 15 additions & 0 deletions cypress/e2e/schema/models.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,19 @@ describe("Schema: Models", () => {
});
cy.contains("Delete Forever").click();
});
it("Can navigate via breadcrumbs", () => {
cy.waitOn(
"/v1/content/models/6-ce80dbfe90-ptjpm6/fields?showDeleted=true",
() => {
cy.waitOn("/bin/1-6c9618c-r26pt/groups", () => {
cy.waitOn("/v1/content/models", () => {
cy.visit("/schema/6-ce80dbfe90-ptjpm6/fields");
});
});
}
);

cy.getBySelector("breadcrumbs").find(".MuiBreadcrumbs-li").first().click();
cy.location("pathname").should("eq", "/schema");
});
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@tinymce/tinymce-react": "^3.12.6",
"@welldone-software/why-did-you-render": "^6.1.1",
"@zesty-io/core": "1.9.1",
"@zesty-io/material": "0.10.0",
"@zesty-io/material": "^0.11.0",
"chart.js": "^3.8.0",
"chartjs-adapter-moment": "^1.0.1",
"chartjs-plugin-datalabels": "^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ const AnalyticsDashboard = ({ loading }: Props) => {
height="100%"
>
<AnalyticsDashboardHeader />
<Box pb={8} px={2} overflow="auto" height="100%">
<Box pb={8} px={4} overflow="auto" height="100%">
<Box display="flex" py={2} justifyContent="space-between">
<AnalyticsDateFilter />
<Typography variant="h6" fontWeight="600" maxWidth={304} noWrap>
Expand Down Expand Up @@ -466,14 +466,16 @@ const AnalyticsDashboardHeader = () => {
<Box
display="flex"
justifyContent="space-between"
p={2}
borderBottom={`1px inset ${theme.palette.border}`}
px={4}
pt={4}
pb={1.75}
borderBottom={`2px solid ${theme.palette.border}`}
bgcolor={theme.palette.background.paper}
>
<Typography variant="h5" fontWeight="600">
<Typography variant="h3" fontWeight="700">
Dashboard
</Typography>
<Box display="flex" gap={1.5}>
<Box display="flex" gap={1.5} height="fit-content">
{topUsedModels?.reverse()?.map((model: any) => (
<CreateItemButton modelZUID={model[0]} />
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ export const FieldFormInput = ({
<Grid item xs={fieldConfig.gridSize}>
{fieldConfig.type === "input" && (
<>
<Box mb={0.5}>
<Stack
flexDirection="row"
alignItems="center"
mb={!!fieldConfig.subLabel ? 0 : 0.5}
height={18}
>
<Typography component="span" variant="body2" fontWeight={600}>
{fieldConfig.label}
</Typography>
Expand All @@ -151,6 +156,7 @@ export const FieldFormInput = ({
component="span"
variant="body2"
color="text.secondary"
sx={{ whiteSpace: "pre" }}
>
{" "}
(optional)
Expand All @@ -164,12 +170,17 @@ export const FieldFormInput = ({
/>
</Tooltip>
)}
{fieldConfig.subLabel && (
<Typography component="p" variant="body3" color="text.secondary">
{fieldConfig.subLabel}
</Typography>
)}
</Box>
</Stack>
{fieldConfig.subLabel && (
<Typography
component="p"
variant="body3"
color="text.secondary"
mb={0.5}
>
{fieldConfig.subLabel}
</Typography>
)}
<InputTextField
autoFocus={fieldConfig.autoFocus}
data-cy={`FieldFormInput_${fieldConfig.name}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export const FieldItem = ({
primaryTypographyProps={{
fontSize: 14,
fontWeight: 700,
color: "text.primary",
}}
secondaryTypographyProps={{
variant: "body3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,17 +464,14 @@ export const FieldForm = ({
return (
<>
<DialogTitle
component="div"
sx={{
padding: 0,
borderBottom: "2px solid",
borderColor: "border",
pb: 0,
}}
>
<Box
display="flex"
justifyContent="space-between"
alignItems="center"
px={2.5}
pt={2.5}
>
<Box display="flex" justifyContent="space-between" alignItems="center">
<Box display="flex" alignItems="center">
{!isUpdateField && (
<IconButton
Expand All @@ -495,7 +492,7 @@ export const FieldForm = ({
/>
</Box>
<Box display="flex" flexDirection="column">
<Typography variant="h5" fontWeight={600}>
<Typography variant="h5" fontWeight={700}>
{isUpdateField
? `Edit ${fieldData.label}`
: `Add ${name} Field`}
Expand All @@ -521,7 +518,8 @@ export const FieldForm = ({
value={activeTab}
onChange={(_, value: ActiveTab) => setActiveTab(value)}
sx={{
px: 2.5,
position: "relative",
top: "2px",
}}
>
<Tab
Expand Down Expand Up @@ -550,24 +548,21 @@ export const FieldForm = ({
<DialogContent
dividers
sx={{
p: 2.5,
position: "relative",
pt: 2.5,
pl: activeTab === "details" ? 0 : 2.5,
backgroundColor: "grey.50",
borderTop: 0,
}}
>
{activeTab === "details" && (
<Grid
data-cy="DetailsTab"
container
spacing={2.5}
maxWidth="480px"
rowSpacing={2.5}
columnSpacing={2.5}
width="inherit"
minHeight={448}
mt={-2.5} //Offset grid item default top padding
ml={0}
sx={{
"&.MuiGrid-container .MuiGrid-item": {
pl: 0,
},
}}
>
{FORM_CONFIG[type]?.details?.map((fieldConfig, index) => {
// Only show tooltip field when updating a field that already has a tooltip value
Expand Down Expand Up @@ -660,7 +655,7 @@ export const FieldForm = ({
{isUpdateField ? (
<DialogActions
sx={{
p: 2.5,
pt: 2.5,
}}
>
<Button
Expand Down Expand Up @@ -689,8 +684,7 @@ export const FieldForm = ({
display: "flex",
justifyContent: "space-between",
alignItems: "center",
px: 3,
py: 2,
pt: 2.5,
}}
>
<Button variant="outlined" color="inherit" onClick={onBackClick}>
Expand All @@ -707,15 +701,15 @@ export const FieldForm = ({
loading={isCreatingField || isBulkUpdating}
onClick={handleAddAnotherField}
>
Add another field
Add Another Field
</LoadingButton>
<LoadingButton
data-cy="FieldFormAddFieldBtn"
loading={isCreatingField || isBulkUpdating}
onClick={handleSubmitForm}
variant="contained"
>
Done
Add Field
</LoadingButton>
</Box>
</DialogActions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Box,
Typography,
IconButton,
Stack,
} from "@mui/material";
import SearchIcon from "@mui/icons-material/Search";
import CloseIcon from "@mui/icons-material/Close";
Expand Down Expand Up @@ -67,41 +68,49 @@ export const FieldSelection = ({ onFieldClick, onModalClose }: Props) => {

return (
<>
<DialogTitle sx={{ px: 3, py: 2.5 }}>
<Box display="flex" justifyContent="space-between" pb={2}>
Select a Field Type
<DialogTitle component="div">
<Stack
flexDirection="row"
justifyContent="space-between"
alignItems="flex-start"
>
<Stack gap={2}>
<Typography variant="h5" fontWeight={700}>
Select a Field Type
</Typography>
<Box width="349px">
<TextField
data-cy="FieldSelectionFilter"
fullWidth
InputProps={{
startAdornment: (
<InputAdornment position="start">
<SearchIcon fontSize="small" />
</InputAdornment>
),
}}
onChange={handleFilterFields}
placeholder="Search field types"
autoFocus
size="small"
/>
</Box>
</Stack>
<IconButton
size="small"
onClick={onModalClose}
data-cy="AddFieldCloseBtn"
>
<CloseIcon fontSize="small" />
</IconButton>
</Box>
<Box width="349px">
<TextField
data-cy="FieldSelectionFilter"
fullWidth
InputProps={{
startAdornment: (
<InputAdornment position="start">
<SearchIcon fontSize="small" />
</InputAdornment>
),
}}
onChange={handleFilterFields}
placeholder="Search field types"
autoFocus
size="small"
/>
</Box>
</Stack>
</DialogTitle>
<DialogContent
data-cy="FieldSelection"
dividers
sx={{
px: 3,
py: 1.5,
pt: 2.5,
backgroundColor: "grey.50",
"&.MuiDialogContent-dividers": {
borderColor: "border",
},
Expand Down
Loading