Skip to content
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

test commit for workflow #1725

Merged
merged 6 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions frontend/pages/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import DocsWrapper from 'src/docs/DocsWrapper'
import IntroCard from 'src/docs/IntroCard'
import Box from '@mui/material/Box'
import Grid from '@mui/material/Grid'

## What is Bailo?

Expand Down
18 changes: 9 additions & 9 deletions frontend/pages/help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Button from '@mui/material/Button'
import Card from '@mui/material/Card'
import CardActions from '@mui/material/CardActions'
import CardContent from '@mui/material/CardContent'
import Grid from '@mui/material/Grid'
import Grid2 from '@mui/material/Grid2'
import Typography from '@mui/material/Typography'
import { useGetUiConfig } from 'actions/uiConfig'
import Link from 'next/link'
Expand All @@ -34,8 +34,8 @@ export default function Help() {
Contact us
</Typography>
</Box>
<Grid container spacing={4}>
<Grid item xs={12} sm={12} md={12} lg={4}>
<Grid2 container spacing={4}>
<Grid2 size={{ xs: 12, sm: 12, md: 12, lg: 4 }}>
<Card sx={{ textAlign: 'center', margin: 'auto', maxWidth: 550 }}>
<CardContent sx={{ height: 320 }}>
<BugReportIcon sx={{ pt: 2, fontSize: 75 }} color='primary' />
Expand All @@ -57,8 +57,8 @@ export default function Help() {
</Button>
</CardActions>
</Card>
</Grid>
<Grid item xs={12} sm={12} md={12} lg={4}>
</Grid2>
<Grid2 size={{ xs: 12, sm: 12, md: 12, lg: 4 }}>
<Card sx={{ textAlign: 'center', margin: 'auto', maxWidth: 550 }}>
<CardContent sx={{ height: 320 }}>
<ArticleIcon sx={{ pt: 2, fontSize: 75 }} color='primary' />
Expand All @@ -77,8 +77,8 @@ export default function Help() {
</Link>
</CardActions>
</Card>
</Grid>
<Grid item xs={12} sm={12} md={12} lg={4}>
</Grid2>
<Grid2 size={{ xs: 12, sm: 12, md: 12, lg: 4 }}>
<Card sx={{ textAlign: 'center', margin: 'auto', maxWidth: 550 }}>
<CardContent sx={{ height: 320 }}>
<ContactSupportIcon sx={{ pt: 2, fontSize: 75 }} color='primary' />
Expand All @@ -99,8 +99,8 @@ export default function Help() {
</Button>
</CardActions>
</Card>
</Grid>
</Grid>
</Grid2>
</Grid2>
</Paper>
)}
</Container>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArrowBack } from '@mui/icons-material'
import { Button, Card, Container, Divider, Grid, Paper, Stack, Typography } from '@mui/material'
import { Button, Card, Container, Divider, Grid2, Paper, Stack, Typography } from '@mui/material'
import { useGetAccessRequest, useGetAccessRequestsForModelId } from 'actions/accessRequest'
import { useGetModel } from 'actions/model'
import { postReviewResponse, useGetReviewRequestsForModel } from 'actions/review'
Expand Down Expand Up @@ -60,9 +60,9 @@ export default function AccessRequestReview() {
const accessRequestEntities = useMemo(() => {
if (accessRequest) {
return accessRequest.metadata.overview.entities.map((entity) => (
<Grid item xs={3} key={entity}>
<Grid2 size={{ xs: 3 }} key={entity}>
<UserDisplay dn={entity} />
</Grid>
</Grid2>
))
}
}, [accessRequest])
Expand Down Expand Up @@ -135,7 +135,7 @@ export default function AccessRequestReview() {
<Typography variant='subtitle2' component='h3' mb={1}>
Users
</Typography>
<Grid container>{accessRequestEntities}</Grid>
<Grid2 container>{accessRequestEntities}</Grid2>
</Card>
</Stack>
</Stack>
Expand Down
10 changes: 5 additions & 5 deletions frontend/pages/model/[modelId]/access-request/schema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Box,
Button,
Container,
Grid,
Grid2,
Paper,
Stack,
Typography,
Expand Down Expand Up @@ -120,9 +120,9 @@ export default function AccessRequestSchema() {
</AccordionSummary>
<AccordionDetails>
<Box sx={{ m: 2 }}>
<Grid container spacing={2} justifyContent='center'>
<Grid2 container spacing={2} justifyContent='center'>
{modelId && activeSchemaButtons}
</Grid>
</Grid2>
</Box>
</AccordionDetails>
</Accordion>
Expand All @@ -133,9 +133,9 @@ export default function AccessRequestSchema() {
</Typography>
</AccordionSummary>
<AccordionDetails>
<Grid container spacing={2} justifyContent='center'>
<Grid2 container spacing={2} justifyContent='center'>
{modelId && inactiveSchemaButtons}
</Grid>
</Grid2>
</AccordionDetails>
</Accordion>
</Stack>
Expand Down
14 changes: 7 additions & 7 deletions frontend/pages/model/[modelId]/release/[semver]/review.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArrowBack } from '@mui/icons-material'
import { Box, Button, Container, Divider, Grid, Paper, Stack, Tooltip, Typography } from '@mui/material'
import { Box, Button, Container, Divider, Grid2, Paper, Stack, Tooltip, Typography } from '@mui/material'
import { useGetModel } from 'actions/model'
import { useGetRelease, useGetReleasesForModelId } from 'actions/release'
import { postReviewResponse, useGetReviewRequestsForModel } from 'actions/review'
Expand Down Expand Up @@ -65,20 +65,20 @@ export default function ReleaseReview() {
const releaseFiles = useMemo(() => {
if (release && model) {
return release.files.map((file) => (
<Grid container spacing={1} alignItems='center' key={file._id}>
<Grid item xs>
<Grid2 container spacing={1} alignItems='center' key={file._id}>
<Grid2 size='auto'>
<Tooltip title={file.name}>
<Link href={`/api/v2/model/${model.id}/file/${file._id}/download`} data-test={`fileLink-${file.name}`}>
<Typography noWrap textOverflow='ellipsis' display='inline'>
{file.name}
</Typography>
</Link>
</Tooltip>
</Grid>
<Grid item xs={1} textAlign='right'>
</Grid2>
<Grid2 size={{ xs: 1 }} textAlign='right'>
<Typography variant='caption'>{prettyBytes(file.size)}</Typography>
</Grid>
</Grid>
</Grid2>
</Grid2>
))
}
}, [model, release])
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/Announcement.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Close } from '@mui/icons-material'
import CampaignIcon from '@mui/icons-material/Campaign'
import { Box, Button, Grid, IconButton, Stack, Typography } from '@mui/material'
import { Box, Button, Grid2, IconButton, Stack, Typography } from '@mui/material'
import { useTheme } from '@mui/material/styles'
import { useMemo, useState } from 'react'
interface AnnoucementProps {
Expand Down Expand Up @@ -47,9 +47,9 @@ export default function Announcement({ message, onClose }: AnnoucementProps) {
}}
>
<Stack spacing={1} alignItems='center'>
<Grid container justifyContent='space-between' alignItems='center'>
<Grid item xs={1} />
<Grid item xs={10} sx={{ textAlign: 'center' }}>
<Grid2 container justifyContent='space-between' alignItems='center'>
<Grid2 size={{ xs: 1 }} />
<Grid2 size={{ xs: 10 }} sx={{ textAlign: 'center' }}>
<Stack
direction={{ xs: 'column', sm: 'row' }}
spacing={2}
Expand All @@ -63,13 +63,13 @@ export default function Announcement({ message, onClose }: AnnoucementProps) {
</Typography>
<CampaignIcon color='primary' />
</Stack>
</Grid>
<Grid item xs={1} sx={{ textAlign: 'right' }}>
</Grid2>
<Grid2 size={{ xs: 1 }} sx={{ textAlign: 'right' }}>
<IconButton size='small' onClick={onClose}>
<Close color='primary' />
</IconButton>
</Grid>
</Grid>
</Grid2>
</Grid2>
{announcementText}
</Stack>
</Box>
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/Form/FormTemplates.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import AddIcon from '@mui/icons-material/Add'
import CloseIcon from '@mui/icons-material/Close'
import { Box, Button, Card, Grid, IconButton, Stack, Tooltip, Typography } from '@mui/material'
import { Box, Button, Card, Grid2, IconButton, Stack, Tooltip, Typography } from '@mui/material'
import { ArrayFieldTemplateProps, ObjectFieldTemplateProps } from '@rjsf/utils'

export function ArrayFieldTemplate(props: ArrayFieldTemplateProps) {
Expand All @@ -10,20 +10,20 @@ export function ArrayFieldTemplate(props: ArrayFieldTemplateProps) {
{props.title}
</Typography>
{props.items.map((element) => (
<Grid key={element.key} container spacing={2}>
<Grid item xs={11}>
<Grid2 key={element.key} container spacing={2}>
<Grid2 size={{ xs: 11 }}>
<Box>{element.children}</Box>
</Grid>
<Grid item xs={1}>
</Grid2>
<Grid2 size={{ xs: 1 }}>
{props.formContext.editMode && (
<Tooltip title='Remove item'>
<IconButton size='small' type='button' onClick={element.onDropIndexClick(element.index)}>
<CloseIcon color='error' />
</IconButton>
</Tooltip>
)}
</Grid>
</Grid>
</Grid2>
</Grid2>
))}
{props.canAdd && props.formContext.editMode && (
<Button size='small' type='button' onClick={props.onAddClick} startIcon={<AddIcon />}>
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/Form/JsonSchemaForm.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid, List, ListItem, ListItemButton, Stepper, Typography } from '@mui/material'
import { Grid2, List, ListItem, ListItemButton, Stepper, Typography } from '@mui/material'
import { useTheme } from '@mui/material/styles'
import Form from '@rjsf/mui'
import { RJSFSchema } from '@rjsf/utils'
Expand Down Expand Up @@ -52,8 +52,8 @@ export default function JsonSchemaForm({
}

return (
<Grid container spacing={2} sx={{ mt: 1 }}>
<Grid item xs={12} md={2} sx={{ borderRight: 1, borderColor: theme.palette.divider }}>
<Grid2 container spacing={2} sx={{ mt: 1 }}>
<Grid2 size={{ xs: 12, md: 2 }} sx={{ borderRight: 1, borderColor: theme.palette.divider }}>
<Stepper activeStep={activeStep} nonLinear alternativeLabel orientation='vertical' connector={<Nothing />}>
<List sx={{ width: { xs: '100%' } }}>
{splitSchema.steps.map((step, index) => (
Expand All @@ -74,8 +74,8 @@ export default function JsonSchemaForm({
))}
</List>
</Stepper>
</Grid>
<Grid item xs={12} md={10}>
</Grid2>
<Grid2 size={{ xs: 12, md: 10 }}>
<Form
schema={currentStep.schema}
formData={currentStep.state}
Expand Down Expand Up @@ -109,7 +109,7 @@ export default function JsonSchemaForm({
{/* eslint-disable-next-line react/jsx-no-useless-fragment */}
<></>
</Form>
</Grid>
</Grid>
</Grid2>
</Grid2>
)
}
18 changes: 9 additions & 9 deletions frontend/src/common/MultiFileInputFileDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Chip, Grid, TextField, Tooltip, Typography } from '@mui/material'
import { Chip, Grid2, TextField, Tooltip, Typography } from '@mui/material'
import prettyBytes from 'pretty-bytes'
import { ChangeEvent, useState } from 'react'
import { FileInterface, FileWithMetadata } from 'types/types'
Expand Down Expand Up @@ -28,24 +28,24 @@ export default function MultiFileInputFileDisplay({
}

return (
<Grid container spacing={1} alignItems='center'>
<Grid item xs>
<Grid2 container spacing={1} alignItems='center'>
<Grid2 size='auto'>
<Tooltip title={file.name}>
<Chip color='primary' label={file.name} onDelete={readOnly ? undefined : handleDelete} />
</Tooltip>
</Grid>
<Grid item xs={7}>
</Grid2>
<Grid2 size={{ xs: 7 }}>
<TextField
size='small'
placeholder='Optional metadata'
sx={{ width: '100%', display: 'none' }}
value={metadata}
onChange={handleMetadataChange}
/>
</Grid>
<Grid item xs={1} textAlign='right'>
</Grid2>
<Grid2 size={{ xs: 1 }} textAlign='right'>
<Typography variant='caption'>{prettyBytes(file.size)}</Typography>
</Grid>
</Grid>
</Grid2>
</Grid2>
)
}
10 changes: 5 additions & 5 deletions frontend/src/entry/model/accessRequests/AccessRequestDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import CommentIcon from '@mui/icons-material/ChatBubble'
import ListAltIcon from '@mui/icons-material/ListAlt'
import { Card, Grid, IconButton, Stack, Tooltip, Typography } from '@mui/material'
import { Card, Grid2, IconButton, Stack, Tooltip, Typography } from '@mui/material'
import { useGetResponses } from 'actions/response'
import { useGetReviewRequestsForModel } from 'actions/review'
import { useEffect, useState } from 'react'
Expand Down Expand Up @@ -107,13 +107,13 @@ export default function AccessRequestDisplay({ accessRequest, hideReviewBanner =
<Typography variant='subtitle2' component='h3' mb={1}>
Users
</Typography>
<Grid container>
<Grid2 container>
{accessRequest.metadata.overview.entities.map((entity) => (
<Grid item xs={3} key={entity}>
<Grid2 size={{ xs: 3 }} key={entity}>
<UserDisplay dn={entity} />
</Grid>
</Grid2>
))}
</Grid>
</Grid2>
</Card>
</Stack>
<Stack direction='row' alignItems='center' justifyContent='space-between' spacing={2} sx={{ pt: 2 }}>
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/entry/model/mirroredModels/ReleaseSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ClearIcon from '@mui/icons-material/Clear'
import { Checkbox, FormControlLabel, Grid, IconButton, Tooltip, Typography } from '@mui/material'
import { Checkbox, FormControlLabel, Grid2, IconButton, Tooltip, Typography } from '@mui/material'
import { useGetReleasesForModelId } from 'actions/release'
import { ChangeEvent, useCallback, useMemo, useState } from 'react'
import Loading from 'src/common/Loading'
Expand Down Expand Up @@ -36,16 +36,16 @@ export default function ReleaseSelector({
const selectedReleasesDisplay = useMemo(() => {
return selectedReleases.map((release) => (
<>
<Grid item xs={10}>
<Grid2 size={{ xs: 10 }}>
<ReleaseDisplay key={release.semver} model={model} release={release} hideReviewBanner />
</Grid>
<Grid item xs={2}>
</Grid2>
<Grid2 size={{ xs: 2 }}>
<Tooltip title={'Remove'}>
<IconButton onClick={() => handleRemoveRelease(release)}>
<ClearIcon color={'error'} />
</IconButton>
</Tooltip>
</Grid>
</Grid2>
</>
))
}, [selectedReleases, model, handleRemoveRelease])
Expand All @@ -72,9 +72,9 @@ export default function ReleaseSelector({
label='Select all'
/>
</Tooltip>
<Grid container spacing={2} alignItems='center'>
<Grid2 container spacing={2} alignItems='center'>
{selectedReleasesDisplay}
</Grid>
</Grid2>
</>
)
}
Loading
Loading