Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3fd06e2
Start migration away from deprecated Grid
imnasnainaec May 7, 2025
3952a2d
Migrate SiteSettings
imnasnainaec May 7, 2025
aa932b4
Migrate Statistics
imnasnainaec May 7, 2025
583395b
Fix tests
imnasnainaec May 7, 2025
29634d0
Migrate UserSettings
imnasnainaec May 8, 2025
5433bf2
Use breakpoint-based direction
imnasnainaec May 8, 2025
23a116b
Migrate TreeView
imnasnainaec May 8, 2025
4e232a0
Migrate ProjectSettings, ProjectUsers
imnasnainaec May 8, 2025
9d2a304
Merge branch 'master' into grid2
imnasnainaec May 9, 2025
c3e5be9
Migrate and refactor PasswordReset
imnasnainaec May 9, 2025
7796eac
Migrate Login, Signup
imnasnainaec May 9, 2025
98e1c54
Migrate LangingPage; Refactor InvalidLink
imnasnainaec May 9, 2025
b1e2daf
Pull form into CardContent
imnasnainaec May 9, 2025
f00074e
Migrate and refactor CharInv
imnasnainaec May 9, 2025
d01bf0b
Merge branch 'master' into grid2
imnasnainaec May 9, 2025
a2d568b
Migrate MergeDupsStep
imnasnainaec May 9, 2025
de9d8a7
Migrate ReviewEntries EditCell
imnasnainaec May 9, 2025
175db81
Migrate ReviewEntries Cells
imnasnainaec May 9, 2025
ed476c6
Tidy
imnasnainaec May 9, 2025
2daa970
Merge branch 'master' into grid2
imnasnainaec May 9, 2025
76aad66
Unify dialog titles
imnasnainaec May 9, 2025
df4f90f
Migrate DataEntry
imnasnainaec May 12, 2025
74e87c7
Cleanup on aisle 11
imnasnainaec May 12, 2025
e6fadef
Increase invite-email-address maxLength
imnasnainaec May 12, 2025
9c11eed
Merge branch 'master' into grid2
imnasnainaec May 20, 2025
723d34f
Merge branch 'master' into grid2
imnasnainaec Jun 2, 2025
2fc398d
Merge in TreeView from master
imnasnainaec Jun 5, 2025
985006f
Merge branch 'master' into grid2
imnasnainaec Jun 5, 2025
f7878df
Merge branch 'master' into grid2
imnasnainaec Jun 6, 2025
34a41b6
Merge branch 'master' into grid2
imnasnainaec Jun 9, 2025
5312c64
CharInvCompleted
imnasnainaec Jun 16, 2025
71869fa
Merge branch 'master' into grid2
imnasnainaec Jun 16, 2025
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
2 changes: 2 additions & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"resetRequestInstructions": "We will send a one-time reset link for your account to your email.",
"submit": "Submit",
"resetFail": "Password reset error",
"resetSuccess": "Password reset successful",
"resetDone": "If you have correctly entered your email or username, a password reset link has been sent to your email address.",
"backToLogin": "Back To Login"
},
Expand Down Expand Up @@ -286,6 +287,7 @@
"searchPlaceholder": "Search...",
"searchTitle": "Find Users",
"emailLabel": "Email",
"emailMessage": "Message (optional)",
"toastSuccess": "User added to the project.",
"toastFail": "Failed to add user to the project."
},
Expand Down
40 changes: 17 additions & 23 deletions src/components/AnalyticsConsent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Grid, Theme, Typography, useMediaQuery } from "@mui/material";
import { Button, Grid2, Stack, Typography } from "@mui/material";
import Drawer from "@mui/material/Drawer";
import { ReactElement } from "react";
import { useTranslation } from "react-i18next";
Expand All @@ -17,8 +17,6 @@ export default function AnalyticsConsent(props: ConsentProps): ReactElement {
const rejectAnalytics = (): void => props.onChangeConsent(false);
const clickedAway = (): void => props.onChangeConsent(undefined);

const isXs = useMediaQuery<Theme>((th) => th.breakpoints.only("xs"));

function ConsentButton(props: {
onClick: () => void;
text: string;
Expand All @@ -41,13 +39,12 @@ export default function AnalyticsConsent(props: ConsentProps): ReactElement {
onClose={!props.required ? clickedAway : undefined}
PaperProps={{ style: { padding: 20 } }}
>
<Grid
container
direction={isXs ? "column" : "row"}
<Stack
direction={{ xs: "column", sm: "row" }}
alignItems="center"
spacing={3}
>
<Grid item xs>
<div>
<Typography
variant="h6"
style={{ color: themeColors.primary, fontWeight: 600 }}
Expand All @@ -58,22 +55,19 @@ export default function AnalyticsConsent(props: ConsentProps): ReactElement {
<Typography variant="body1">
{t("analyticsConsent.consentModal.description")}
</Typography>
</Grid>
<Grid item container xs="auto" spacing={1}>
<Grid item>
<ConsentButton
onClick={acceptAnalytics}
text={t("analyticsConsent.consentModal.acceptAllBtn")}
/>
</Grid>
<Grid item>
<ConsentButton
onClick={rejectAnalytics}
text={t("analyticsConsent.consentModal.acceptNecessaryBtn")}
/>
</Grid>
</Grid>
</Grid>
</div>

<Grid2 container size="auto" spacing={1}>
<ConsentButton
onClick={acceptAnalytics}
text={t("analyticsConsent.consentModal.acceptAllBtn")}
/>
<ConsentButton
onClick={rejectAnalytics}
text={t("analyticsConsent.consentModal.acceptNecessaryBtn")}
/>
</Grid2>
</Stack>
</Drawer>
);
}
25 changes: 16 additions & 9 deletions src/components/AppBar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AppBar, Grid, Toolbar } from "@mui/material";
import { AppBar, Stack, Toolbar } from "@mui/material";
import { ReactElement, useEffect, useState } from "react";
import { useLocation } from "react-router";

Expand Down Expand Up @@ -29,22 +29,29 @@ export default function AppBarComponent(): ReactElement {
style={{ maxHeight: appBarHeight, zIndex: theme.zIndex.drawer + 1 }}
>
<Toolbar>
<Grid container justifyContent="space-between" alignItems="center">
<Grid item>
<Stack
alignItems="center"
direction="row"
justifyContent="space-between"
width="100%"
>
<div>
<Logo />
{!!getProjectId() && (
<NavigationButtons currentTab={currentTab} />
)}
</Grid>
<Grid item>
</div>

<div>
{!!getProjectId() && <ProjectButtons currentTab={currentTab} />}
<DownloadButton colorSecondary />
</Grid>
<Grid item>
</div>

<div>
<UserMenu currentTab={currentTab} />
<UserGuideButton />
</Grid>
</Grid>
</div>
</Stack>
</Toolbar>
</AppBar>
</div>
Expand Down
54 changes: 23 additions & 31 deletions src/components/Buttons/UndoButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Grid } from "@mui/material";
import { Button } from "@mui/material";
import { ReactElement, useEffect, useState } from "react";
import { useTranslation } from "react-i18next";

Expand Down Expand Up @@ -30,35 +30,27 @@ export default function UndoButton(props: UndoButtonProps): ReactElement {
}
}, [isUndoAllowed, undoDialogOpen]);

return (
<Grid container direction="column" justifyContent="center">
{isUndoEnabled ? (
<div>
<Button
aria-label={props.buttonLabelEnabled ?? "Undo"}
data-testid={props.buttonIdEnabled}
id={props.buttonIdEnabled}
onClick={() => setUndoDialogOpen(true)}
variant="outlined"
>
{t(props.textIdEnabled)}
</Button>
<CancelConfirmDialog
open={undoDialogOpen}
text={props.textIdDialog}
handleCancel={() => setUndoDialogOpen(false)}
handleConfirm={() =>
props.undo().then(() => setUndoDialogOpen(false))
}
buttonIdCancel={props.buttonIdCancel}
buttonIdConfirm={props.buttonIdConfirm}
/>
</div>
) : (
<div>
<Button disabled>{t(props.textIdDisabled)}</Button>
</div>
)}
</Grid>
return isUndoEnabled ? (
<>
<Button
aria-label={props.buttonLabelEnabled ?? "Undo"}
data-testid={props.buttonIdEnabled}
id={props.buttonIdEnabled}
onClick={() => setUndoDialogOpen(true)}
variant="outlined"
>
{t(props.textIdEnabled)}
</Button>
<CancelConfirmDialog
open={undoDialogOpen}
text={props.textIdDialog}
handleCancel={() => setUndoDialogOpen(false)}
handleConfirm={() => props.undo().then(() => setUndoDialogOpen(false))}
buttonIdCancel={props.buttonIdCancel}
buttonIdConfirm={props.buttonIdConfirm}
/>
</>
) : (
<Button disabled>{t(props.textIdDisabled)}</Button>
);
}
7 changes: 1 addition & 6 deletions src/components/DataEntry/DataEntryHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useTranslation } from "react-i18next";
import { Key } from "ts-key-enum";

import { SemanticDomainFull } from "api/models";
import theme from "types/theme";

interface DataEntryHeaderProps {
domain: SemanticDomainFull;
Expand All @@ -23,11 +22,7 @@ export default function DataEntryHeader(
const { t } = useTranslation();

return (
<Typography
variant="h4"
align="center"
style={{ marginBottom: theme.spacing(2) }}
>
<Typography align="center" variant="h4">
{t("addWords.domainTitle", { val1: domain.name, val2: domain.id })}
<bdi>
<Typography>{domain.description}</Typography>
Expand Down
51 changes: 19 additions & 32 deletions src/components/DataEntry/DataEntryTable/NewEntry/VernDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
Dialog,
DialogContent,
Grid,
Grid2,
ListItemText,
MenuList,
Typography,
Expand Down Expand Up @@ -214,51 +214,38 @@ interface DialogListItemTextProps {
const DialogListItemText = (props: DialogListItemTextProps): ReactElement => {
return (
<ListItemText>
<Grid
<Grid2
alignItems="center"
columnSpacing={4}
container
justifyContent="align-start"
rowSpacing={1}
>
<Grid item xs="auto">
<Typography variant={props.isSubitem ? "h6" : "h5"}>
{props.text}
</Typography>
</Grid>
<Typography variant={props.isSubitem ? "h6" : "h5"}>
{props.text}
</Typography>

{!!props.word && (
<>
{props.showGlosses && (
<Grid item xs="auto">
<SensesTextSummary
definitionsOrGlosses="glosses"
maxLengthPerSense={20}
senses={props.word.senses}
/>
</Grid>
<SensesTextSummary
definitionsOrGlosses="glosses"
maxLengthPerSense={20}
senses={props.word.senses}
/>
)}
{props.showDefinitions && (
<Grid item xs="auto">
<SensesTextSummary
definitionsOrGlosses="definitions"
maxLengthPerSense={50}
senses={props.word.senses}
/>
</Grid>
)}
{props.showPartOfSpeech && (
<Grid item xs="auto">
<PartOfSpeechCell word={props.word} />
</Grid>
)}
{props.showDomain && (
<Grid item xs>
<DomainsCell word={props.word} />
</Grid>
<SensesTextSummary
definitionsOrGlosses="definitions"
maxLengthPerSense={50}
senses={props.word.senses}
/>
)}
{props.showPartOfSpeech && <PartOfSpeechCell word={props.word} />}
{props.showDomain && <DomainsCell word={props.word} />}
</>
)}
</Grid>
</Grid2>
</ListItemText>
);
};
Loading
Loading