From dc49eb26206610548f68f337f85ca2b3e0ccd22e Mon Sep 17 00:00:00 2001 From: Jandson Vitorino Date: Wed, 29 Nov 2023 17:22:26 -0300 Subject: [PATCH 1/4] an arrow to return to the previous page was added to the titles of all pages --- frontend/components/ProductDetail.js | 26 ++++++++++++++++++- frontend/pages/about.js | 36 +++++++++++++++++++++++--- frontend/pages/contact.js | 36 +++++++++++++++++++++++--- frontend/pages/oficial_products.js | 34 +++++++++++++++++++++---- frontend/pages/tutorials.js | 38 +++++++++++++++++++++++----- frontend/pages/user_products.js | 35 +++++++++++++++++++++---- 6 files changed, 180 insertions(+), 25 deletions(-) diff --git a/frontend/components/ProductDetail.js b/frontend/components/ProductDetail.js index cef95d4..8592924 100644 --- a/frontend/components/ProductDetail.js +++ b/frontend/components/ProductDetail.js @@ -20,6 +20,7 @@ import { Tabs, Typography } from '@mui/material' +import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' import Alert from '@mui/material/Alert' import ProductShare from './ProductShare' @@ -232,7 +233,30 @@ export default function ProductDetail({ productId, internalName }) { Link copied successfully! - Product + + + { + router.back() + }} + sx={{ cursor: 'pointer' }} + /> + Product + + - - About - + + + { + router.back() + }} + sx={{ cursor: 'pointer' }} + /> + + About + + + diff --git a/frontend/pages/contact.js b/frontend/pages/contact.js index 929b45b..9fe2394 100644 --- a/frontend/pages/contact.js +++ b/frontend/pages/contact.js @@ -1,17 +1,45 @@ -import { Container, Grid, Typography, Link } from '@mui/material' +import { Container, Grid, Typography, Link, Box, Stack } from '@mui/material' +import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' +import { useRouter } from 'next/router' import useStyles from '../styles/pages/contact' import { parseCookies } from 'nookies' import Card from '@mui/material/Card' import CardContent from '@mui/material/CardContent' + export default function Contact() { + const router = useRouter() const classes = useStyles() + return ( - - Contact - + + + { + router.back() + }} + sx={{ cursor: 'pointer' }} + /> + + Contact + + + diff --git a/frontend/pages/oficial_products.js b/frontend/pages/oficial_products.js index 6a0e0e3..0535b29 100644 --- a/frontend/pages/oficial_products.js +++ b/frontend/pages/oficial_products.js @@ -1,4 +1,5 @@ -import { Box, Button, Card, CardContent, Paper } from '@mui/material' +import { Box, Button, Card, CardContent, Paper, Stack } from '@mui/material' +import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' import FormControl from '@mui/material/FormControl' import Grid from '@mui/material/Grid' import Typography from '@mui/material/Typography' @@ -30,10 +31,33 @@ export default function Products() { - {/* TODO: Aqui deve entrar o BREADCRUMB */} - - Rubin Observatory PZ Data Products - + + + { + router.back() + }} + sx={{ cursor: 'pointer' }} + /> + {/* TODO: Aqui deve entrar o BREADCRUMB */} + + Rubin Observatory PZ Data Products + + + {/* TODO: Aqui deve entrar botões de ações da pagina */} diff --git a/frontend/pages/tutorials.js b/frontend/pages/tutorials.js index 3fcbe4d..9d153dc 100644 --- a/frontend/pages/tutorials.js +++ b/frontend/pages/tutorials.js @@ -1,20 +1,46 @@ -import { Container, Grid, Link, Typography } from '@mui/material' +import { Container, Grid, Link, Typography, Box, Stack } from '@mui/material' +import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' +import { useRouter } from 'next/router' import Card from '@mui/material/Card' import CardContent from '@mui/material/CardContent' import Divider from '@mui/material/Divider' import { parseCookies } from 'nookies' import useStyles from '../styles/pages/tutorials' -// import ReactPrismjs from '@uiw/react-prismjs' -// import 'prismjs/components/prism-bash' + export default function Tutorials() { const classes = useStyles() + const router = useRouter() + return ( - - Tutorials - + + + { + router.back() + }} + sx={{ cursor: 'pointer' }} + /> + + Tutorials + + + Download diff --git a/frontend/pages/user_products.js b/frontend/pages/user_products.js index 3d3dcd9..3de8993 100644 --- a/frontend/pages/user_products.js +++ b/frontend/pages/user_products.js @@ -4,8 +4,10 @@ import { Card, CardContent, FormControl, - Paper + Paper, + Stack } from '@mui/material' +import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' import Grid from '@mui/material/Grid' import Typography from '@mui/material/Typography' import { useRouter } from 'next/router' @@ -34,10 +36,33 @@ export default function Products() { - {/* TODO: Aqui deve entrar o BREADCRUMB */} - - User-generated Data Products - + + + { + router.back() + }} + sx={{ cursor: 'pointer' }} + /> + {/* TODO: Aqui deve entrar o BREADCRUMB */} + + User-generated Data Products + + + {/* TODO: Aqui deve entrar botões de ações da pagina */} From 8d1fa693be6e8b74a77b2dd3f1ecfe8f36b5f5d4 Mon Sep 17 00:00:00 2001 From: Jandson Vitorino Date: Wed, 29 Nov 2023 17:55:59 -0300 Subject: [PATCH 2/4] Closes #211 - 'Breadcrumbs' have been added to all pages --- frontend/components/ProductDetail.js | 10 +++++++++- frontend/pages/about.js | 16 +++++++++++++++- frontend/pages/contact.js | 16 +++++++++++++++- frontend/pages/oficial_products.js | 19 ++++++++++++++++++- frontend/pages/tutorials.js | 16 +++++++++++++++- frontend/pages/user_products.js | 12 +++++++++++- 6 files changed, 83 insertions(+), 6 deletions(-) diff --git a/frontend/components/ProductDetail.js b/frontend/components/ProductDetail.js index 8592924..c2b1bf1 100644 --- a/frontend/components/ProductDetail.js +++ b/frontend/components/ProductDetail.js @@ -18,7 +18,9 @@ import { Stack, Tab, Tabs, - Typography + Typography, + Link, + Breadcrumbs } from '@mui/material' import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' import Alert from '@mui/material/Alert' @@ -233,6 +235,12 @@ export default function ProductDetail({ productId, internalName }) { Link copied successfully! + + + Home + + Product + + + + Home + + About + + + + Home + + Contact + + + + Home + + + Rubin Observatory PZ Data Products + + + + + Home + + Tutorials + + + + Home + + + User-generated Data Products + + Date: Wed, 29 Nov 2023 19:06:29 -0300 Subject: [PATCH 3/4] Closes #211 - 'Breadcrumbs' have been added to all pagess --- frontend/pages/product/edit/[pid].js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/pages/product/edit/[pid].js b/frontend/pages/product/edit/[pid].js index 0659575..ee151c1 100644 --- a/frontend/pages/product/edit/[pid].js +++ b/frontend/pages/product/edit/[pid].js @@ -3,6 +3,7 @@ import VerifiedIcon from '@mui/icons-material/Verified' import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' import Alert from '@mui/material/Alert' +import { Breadcrumbs, Link } from '@mui/material' import Box from '@mui/material/Box' import Button from '@mui/material/Button' import Card from '@mui/material/Card' @@ -185,6 +186,12 @@ export default function EditProduct() { {isLoading && } + + + Home + + Edit Product + Date: Fri, 1 Dec 2023 12:55:05 -0300 Subject: [PATCH 4/4] reorganization of imports and adjustments to the color of the return arrow --- frontend/components/ProductDetail.js | 54 ++++++++++++++-------------- frontend/pages/about.js | 47 +++++------------------- frontend/pages/contact.js | 51 ++++++-------------------- frontend/pages/oficial_products.js | 27 +++++++------- frontend/pages/product/edit/[pid].js | 8 +++-- frontend/pages/tutorials.js | 47 +++++------------------- frontend/pages/user_products.js | 29 +++++++-------- frontend/styles/pages/products.js | 3 -- frontend/themes/light.js | 7 ---- 9 files changed, 92 insertions(+), 181 deletions(-) diff --git a/frontend/components/ProductDetail.js b/frontend/components/ProductDetail.js index c2b1bf1..0a7fef7 100644 --- a/frontend/components/ProductDetail.js +++ b/frontend/components/ProductDetail.js @@ -1,38 +1,38 @@ +import React from 'react' + import ShareIcon from '@mui/icons-material/Share' +import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' import VerifiedIcon from '@mui/icons-material/Verified' +import EditIcon from '@mui/icons-material/Edit' + import LoadingButton from '@mui/lab/LoadingButton' -import { - Box, - Card, - CardContent, - CardMedia, - Chip, - Divider, - Grid, - IconButton, - List, - ListItem, - ListItemText, - Paper, - Snackbar, - Stack, - Tab, - Tabs, - Typography, - Link, - Breadcrumbs -} from '@mui/material' -import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' +import Box from '@mui/material/Box' +import Card from '@mui/material/Card' +import CardContent from '@mui/material/CardContent' +import CardMedia from '@mui/material/CardMedia' +import Chip from '@mui/material/Chip' +import Divider from '@mui/material/Divider' +import Grid from '@mui/material/Grid' +import IconButton from '@mui/material/IconButton' +import List from '@mui/material/List' +import ListItem from '@mui/material/ListItem' +import ListItemText from '@mui/material/ListItemText' +import Paper from '@mui/material/Paper' +import Snackbar from '@mui/material/Snackbar' +import Stack from '@mui/material/Stack' +import Tab from '@mui/material/Tab' +import Tabs from '@mui/material/Tabs' +import Typography from '@mui/material/Typography' +import Link from '@mui/material/Link' +import Breadcrumbs from '@mui/material/Breadcrumbs' import Alert from '@mui/material/Alert' -import ProductShare from './ProductShare' -import EditIcon from '@mui/icons-material/Edit' import moment from 'moment' import { useRouter } from 'next/router' import prettyBytes from 'pretty-bytes' import PropTypes from 'prop-types' -import React from 'react' import Loading from '../components/Loading' +import ProductShare from './ProductShare' import ProductDataGrid from '../components/ProductDataGrid' import ProductNotFound from '../components/ProductNotFound' import { @@ -239,6 +239,7 @@ export default function ProductDetail({ productId, internalName }) { Home + Data Products Product { router.back() }} - sx={{ cursor: 'pointer' }} + color="primary" + cursor="pointer" /> Product diff --git a/frontend/pages/about.js b/frontend/pages/about.js index 74c0b1c..be81d1d 100644 --- a/frontend/pages/about.js +++ b/frontend/pages/about.js @@ -1,22 +1,16 @@ -import { - Container, - Grid, - Link, - Typography, - Box, - Breadcrumbs, - Stack -} from '@mui/material' -import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' -import { useRouter } from 'next/router' +import Breadcrumbs from '@mui/material/Breadcrumbs' +import Typography from '@mui/material/Typography' +import Container from '@mui/material/Container' +import Link from '@mui/material/Link' +import Grid from '@mui/material/Grid' import Card from '@mui/material/Card' import CardContent from '@mui/material/CardContent' + import { parseCookies } from 'nookies' import useStyles from '../styles/pages/about' export default function About() { const classes = useStyles() - const router = useRouter() return ( @@ -28,32 +22,9 @@ export default function About() { About - - - { - router.back() - }} - sx={{ cursor: 'pointer' }} - /> - - About - - - + + About + diff --git a/frontend/pages/contact.js b/frontend/pages/contact.js index d23bf6e..42f9ae2 100644 --- a/frontend/pages/contact.js +++ b/frontend/pages/contact.js @@ -1,21 +1,15 @@ -import { - Container, - Grid, - Typography, - Link, - Box, - Stack, - Breadcrumbs -} from '@mui/material' -import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' -import { useRouter } from 'next/router' -import useStyles from '../styles/pages/contact' -import { parseCookies } from 'nookies' +import Breadcrumbs from '@mui/material/Breadcrumbs' +import Typography from '@mui/material/Typography' +import Container from '@mui/material/Container' +import Link from '@mui/material/Link' +import Grid from '@mui/material/Grid' import Card from '@mui/material/Card' import CardContent from '@mui/material/CardContent' +import { parseCookies } from 'nookies' +import useStyles from '../styles/pages/contact' + export default function Contact() { - const router = useRouter() const classes = useStyles() return ( @@ -28,32 +22,9 @@ export default function Contact() { Contact - - - { - router.back() - }} - sx={{ cursor: 'pointer' }} - /> - - Contact - - - + + Contact + diff --git a/frontend/pages/oficial_products.js b/frontend/pages/oficial_products.js index 52acef0..2680281 100644 --- a/frontend/pages/oficial_products.js +++ b/frontend/pages/oficial_products.js @@ -1,20 +1,21 @@ -import { - Box, - Button, - Card, - CardContent, - Paper, - Stack, - Link, - Breadcrumbs -} from '@mui/material' +import * as React from 'react' + import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' + +import Box from '@mui/material/Box' +import Card from '@mui/material/Card' +import CardContent from '@mui/material/CardContent' +import Button from '@mui/material/Button' +import Paper from '@mui/material/Paper' +import Link from '@mui/material/Link' +import Stack from '@mui/material/Stack' +import Breadcrumbs from '@mui/material/Breadcrumbs' import FormControl from '@mui/material/FormControl' import Grid from '@mui/material/Grid' import Typography from '@mui/material/Typography' + import { useRouter } from 'next/router' import { parseCookies } from 'nookies' -import * as React from 'react' import ProductGrid from '../components/ProductGrid' import ProductTypeSelect from '../components/ProductTypeSelect' import ReleaseSelect from '../components/ReleaseSelect' @@ -67,9 +68,9 @@ export default function Products() { onClick={() => { router.back() }} - sx={{ cursor: 'pointer' }} + color="primary" + cursor="pointer" /> - {/* TODO: Aqui deve entrar o BREADCRUMB */} Rubin Observatory PZ Data Products diff --git a/frontend/pages/product/edit/[pid].js b/frontend/pages/product/edit/[pid].js index ee151c1..f06577f 100644 --- a/frontend/pages/product/edit/[pid].js +++ b/frontend/pages/product/edit/[pid].js @@ -1,3 +1,5 @@ +import React, { useState } from 'react' + import UploadIcon from '@mui/icons-material/Upload' import VerifiedIcon from '@mui/icons-material/Verified' import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' @@ -17,10 +19,10 @@ import Snackbar from '@mui/material/Snackbar' import Stack from '@mui/material/Stack' import TextField from '@mui/material/TextField' import Typography from '@mui/material/Typography' + import moment from 'moment' import { useRouter } from 'next/router' import { parseCookies } from 'nookies' -import React, { useState } from 'react' import FileUploader from '../../../components/FileUploader' import LinearProgressWithLabel from '../../../components/LinearProgressWithLabel' import Loading from '../../../components/Loading' @@ -190,6 +192,7 @@ export default function EditProduct() { Home + Data Products Edit Product { router.back() }} - sx={{ cursor: 'pointer' }} + color="primary" + cursor="pointer" /> Edit Product diff --git a/frontend/pages/tutorials.js b/frontend/pages/tutorials.js index d94e7f4..a6f01af 100644 --- a/frontend/pages/tutorials.js +++ b/frontend/pages/tutorials.js @@ -1,23 +1,17 @@ -import { - Container, - Grid, - Link, - Typography, - Box, - Stack, - Breadcrumbs -} from '@mui/material' -import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' -import { useRouter } from 'next/router' +import Breadcrumbs from '@mui/material/Breadcrumbs' +import Typography from '@mui/material/Typography' +import Container from '@mui/material/Container' +import Link from '@mui/material/Link' +import Grid from '@mui/material/Grid' import Card from '@mui/material/Card' import CardContent from '@mui/material/CardContent' import Divider from '@mui/material/Divider' + import { parseCookies } from 'nookies' import useStyles from '../styles/pages/tutorials' export default function Tutorials() { const classes = useStyles() - const router = useRouter() return ( @@ -29,32 +23,9 @@ export default function Tutorials() { Tutorials - - - { - router.back() - }} - sx={{ cursor: 'pointer' }} - /> - - Tutorials - - - + + Tutorials + Download diff --git a/frontend/pages/user_products.js b/frontend/pages/user_products.js index f462f61..cec2d18 100644 --- a/frontend/pages/user_products.js +++ b/frontend/pages/user_products.js @@ -1,20 +1,21 @@ -import { - Box, - Button, - Card, - CardContent, - FormControl, - Paper, - Stack, - Link, - Breadcrumbs -} from '@mui/material' +import * as React from 'react' + import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos' + +import Box from '@mui/material/Box' +import Card from '@mui/material/Card' +import CardContent from '@mui/material/CardContent' +import Button from '@mui/material/Button' +import Paper from '@mui/material/Paper' +import Link from '@mui/material/Link' +import Stack from '@mui/material/Stack' +import Breadcrumbs from '@mui/material/Breadcrumbs' +import FormControl from '@mui/material/FormControl' import Grid from '@mui/material/Grid' import Typography from '@mui/material/Typography' + import { useRouter } from 'next/router' import { parseCookies } from 'nookies' -import * as React from 'react' import ProductGrid from '../components/ProductGrid' import ProductTypeSelect from '../components/ProductTypeSelect' import ReleaseSelect from '../components/ReleaseSelect' @@ -65,9 +66,9 @@ export default function Products() { onClick={() => { router.back() }} - sx={{ cursor: 'pointer' }} + color="primary" + cursor="pointer" /> - {/* TODO: Aqui deve entrar o BREADCRUMB */} User-generated Data Products diff --git a/frontend/styles/pages/products.js b/frontend/styles/pages/products.js index 513f915..7c10305 100644 --- a/frontend/styles/pages/products.js +++ b/frontend/styles/pages/products.js @@ -6,7 +6,6 @@ const useStyles = makeStyles(theme => ({ borderRadius: '4px', padding: theme.spacing(3), flex: '1 1 0%', - // background: 'rgb(247, 249, 252)' }, gridTitle: { display: 'flex', @@ -25,8 +24,6 @@ const useStyles = makeStyles(theme => ({ marginBottom: theme.spacing(3), marginLeft: theme.spacing(2), width: '100%' - // marginRight: `calc(${theme.spacing(2)} * -1})` - }, gridContent: { display: 'flex', diff --git a/frontend/themes/light.js b/frontend/themes/light.js index 69bd7e5..ce4c26d 100644 --- a/frontend/themes/light.js +++ b/frontend/themes/light.js @@ -6,8 +6,6 @@ const light = createTheme({ light: '#4f5964', main: '#283663', dark: '#24292e' - // dark: '#283663', - // main: '#24292e' }, secondary: { main: '#ffdd00' @@ -26,11 +24,6 @@ const light = createTheme({ secondary: 'rgba(18,48,78,0.6)', disabled: 'rgba(18,48,78,0.38)' } - // text: { - // primary: 'rgb(52, 71, 103)', - // secondary: 'rgb(52, 71, 103, 0.6)', - // disabled: 'rgb(52, 71, 103, 0.38)' - // } } })