Skip to content

Commit d00aca4

Browse files
authored
Merge pull request #1071 from joshunrau/refine
2 parents d73f253 + cc9d0cf commit d00aca4

File tree

38 files changed

+410
-271
lines changed

38 files changed

+410
-271
lines changed

.env.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ VITE_DEV_PASSWORD=Password12345678
8888
API_BASE_URL=http://localhost:5500
8989
# The number of miliseconds to delay the result of HTTP requests in development
9090
VITE_DEV_NETWORK_LATENCY=0
91+
# Whether to force clear queries when the pathname changes
92+
VITE_DEV_FORCE_CLEAR_QUERY_CACHE=false
9193
# Plausable analytics config (optional, set both to an empty string to disable)
9294
PLAUSIBLE_BASE_URL=
9395
PLAUSIBLE_WEB_DATA_DOMAIN=

apps/playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
"@opendatacapture/schemas": "workspace:*",
2626
"axios": "catalog:",
2727
"esbuild-wasm": "catalog:",
28-
"framer-motion": "^11.5.4",
2928
"immer": "^10.1.1",
3029
"jszip": "^3.10.1",
3130
"lodash-es": "workspace:lodash-es__4.x@*",
3231
"lucide-react": "^0.439.0",
3332
"lz-string": "^1.5.0",
3433
"monaco-editor": "^0.51.0",
34+
"motion": "^11.15.0",
3535
"prettier": "^3.3.3",
3636
"react": "workspace:react__18.x@*",
3737
"react-dom": "workspace:react-dom__18.x@*",

apps/playground/src/components/Editor/Editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { useEffect, useRef, useState } from 'react';
22

33
import { extractInputFileExtension } from '@opendatacapture/instrument-bundler';
4-
import { motion } from 'framer-motion';
54
import { Columns3Icon, FilePlusIcon, FileUpIcon } from 'lucide-react';
5+
import { motion } from 'motion/react';
66
import { useShallow } from 'zustand/react/shallow';
77

88
import { useAppStore } from '@/store';

apps/playground/src/components/Viewer/ViewerErrorFallback/ToggledContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { useState } from 'react';
22

33
import { cn } from '@douglasneuroinformatics/libui/utils';
4-
import { motion } from 'framer-motion';
54
import { ChevronUpIcon } from 'lucide-react';
5+
import { motion } from 'motion/react';
66

77
export const ToggledContent: React.FC<{ children: React.ReactNode; label: string }> = ({ children, label }) => {
88
const [isOpen, setIsOpen] = useState(false);

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@
3838
"@tanstack/react-query-devtools": "^5.55.4",
3939
"axios": "catalog:",
4040
"clsx": "^2.1.1",
41-
"framer-motion": "^11.5.4",
4241
"html2canvas": "^1.4.1",
4342
"immer": "^10.1.1",
4443
"jwt-decode": "^4.0.0",
4544
"lodash-es": "workspace:lodash-es__4.x@*",
4645
"lucide-react": "^0.439.0",
46+
"motion": "^11.15.0",
4747
"papaparse": "workspace:papaparse__5.x@*",
4848
"react": "workspace:react__18.x@*",
4949
"react-dom": "workspace:react-dom__18.x@*",

apps/web/src/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ import { ErrorBoundary } from 'react-error-boundary';
88
import { BrowserRouter } from 'react-router-dom';
99

1010
import { LoadingFallback } from '@/components/LoadingFallback';
11-
import { SetupProvider } from '@/features/setup';
1211
import { Routes } from '@/Routes';
1312
import { queryClient } from '@/services/react-query';
1413

14+
import { SetupProvider } from './features/setup';
15+
1516
import './services/axios';
1617
import './services/i18n';
1718
import './services/zod';

apps/web/src/Routes.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { sessionRoute } from './features/session';
1616
import { uploadRoute } from './features/upload';
1717
import { userRoute } from './features/user';
1818
import { DisclaimerProvider } from './providers/DisclaimerProvider';
19+
import { ForceClearQueryCacheProvider } from './providers/ForceClearQueryCacheProvider';
1920
import { WalkthroughProvider } from './providers/WalkthroughProvider';
2021
import { useAppStore } from './store';
2122

@@ -33,7 +34,9 @@ const protectedRoutes: RouteObject[] = [
3334
element: (
3435
<DisclaimerProvider>
3536
<WalkthroughProvider>
36-
<Layout />
37+
<ForceClearQueryCacheProvider>
38+
<Layout />
39+
</ForceClearQueryCacheProvider>
3740
</WalkthroughProvider>
3841
</DisclaimerProvider>
3942
),

apps/web/src/components/IdentificationForm/IdentificationForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const IdentificationForm = ({ onSubmit }: IdentificationFormProps) => {
2020
return (
2121
<Form
2222
preventResetValuesOnReset
23+
suspendWhileSubmitting
2324
content={[
2425
{
2526
title: t('common.identificationMethod'),

apps/web/src/components/Sidebar/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { AlertDialog, LanguageToggle, ThemeToggle } from '@douglasneuroinformati
33
import { useTranslation } from '@douglasneuroinformatics/libui/hooks';
44
import { Branding } from '@opendatacapture/react-core';
55
import { isSubjectWithPersonalInfo, removeSubjectIdScope } from '@opendatacapture/subject-utils';
6-
import { AnimatePresence, motion } from 'framer-motion';
76
import { StopCircle } from 'lucide-react';
7+
import { AnimatePresence, motion } from 'motion/react';
88
import { useLocation, useNavigate } from 'react-router-dom';
99

1010
import { useNavItems } from '@/hooks/useNavItems';

apps/web/src/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const $Config = z.object({
1111
.optional(),
1212
dev: z.object({
1313
isBypassAuthEnabled: $BooleanString.optional(),
14+
isForceClearQueryCacheEnabled: $BooleanString.optional(),
1415
networkLatency: z.coerce.number().int().nonnegative().optional(),
1516
password: z.string().min(1).optional(),
1617
username: z.string().min(1).optional()
@@ -38,6 +39,7 @@ export const config = await $Config
3839
: undefined,
3940
dev: {
4041
isBypassAuthEnabled: import.meta.env.VITE_DEV_BYPASS_AUTH,
42+
isForceClearQueryCacheEnabled: import.meta.env.VITE_DEV_FORCE_CLEAR_QUERY_CACHE,
4143
networkLatency: import.meta.env.VITE_DEV_NETWORK_LATENCY,
4244
password: import.meta.env.VITE_DEV_PASSWORD,
4345
username: import.meta.env.VITE_DEV_USERNAME

0 commit comments

Comments
 (0)