Skip to content

Commit 029f240

Browse files
Fix regressions
1 parent d60e72c commit 029f240

File tree

4 files changed

+13
-27
lines changed

4 files changed

+13
-27
lines changed

app/gui/src/App.vue

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script setup lang="ts">
2-
import { createRoot } from 'react-dom/client'
3-
42
import '@/assets/base.css'
53
import { interactionBindings } from '@/bindings'
64
import TooltipDisplayer from '@/components/TooltipDisplayer.vue'
@@ -16,11 +14,16 @@ import { registerAutoBlurHandler, registerGlobalBlurHandler } from '@/util/autoB
1614
import { baseConfig, configValue, mergeConfig, type ApplicationConfigValue } from '@/util/config'
1715
import { urlParams } from '@/util/urlParams'
1816
import { useQueryClient } from '@tanstack/vue-query'
19-
import { createElement, startTransition } from 'react'
17+
import { createRoot } from 'react-dom/client'
18+
import { applyPureReactInVue, setVeauryOptions } from 'veaury'
2019
import { computed, onMounted } from 'vue'
2120
import { ComponentProps } from 'vue-component-type-helpers'
2221
import ReactRoot from './ReactRoot'
2322
23+
setVeauryOptions({ react: { createRoot } })
24+
25+
const ReactRootInVue = applyPureReactInVue(ReactRoot)
26+
2427
const { projectViewOnly, onAuthenticated } = defineProps<{
2528
// Used in Project View integration tests. Once both test projects will be merged, this should be
2629
// removed
@@ -76,24 +79,11 @@ onMounted(() => {
7679
<template>
7780
<div :class="['App', ...classSet.keys()]">
7881
<ProjectView v-if="projectViewOnly" v-bind="projectViewOnly.options" />
79-
<div
82+
<ReactRootInVue
8083
v-else
81-
id="ReactRootWrapper"
82-
:ref="
83-
(el) => {
84-
startTransition(() => {
85-
const root = createRoot(el as HTMLElement)
86-
root.render(
87-
createElement(ReactRoot, {
88-
queryClient,
89-
config: appConfigValue,
90-
onAuthenticated: onAuthenticated ?? (() => {}),
91-
}),
92-
)
93-
})
94-
}
95-
"
96-
style="display: contents"
84+
:config="appConfigValue"
85+
:queryClient="queryClient"
86+
@authenticated="onAuthenticated ?? (() => {})"
9787
/>
9888
</div>
9989
<div id="floatingLayer" />

app/gui/src/dashboard/components/AriaComponents/Dialog/Dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import * as utlities from './utilities'
2929
import { DIALOG_BACKGROUND } from './variants'
3030

3131
// eslint-disable-next-line no-restricted-syntax
32-
const MotionDialog = motion(aria.Dialog)
32+
const MotionDialog = motion.create(aria.Dialog)
3333

3434
const OVERLAY_STYLES = tv({
3535
base: 'fixed inset-0 isolate flex items-center justify-center bg-primary/20',

app/gui/src/dashboard/components/EditableSpan.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { useLayoutEffect } from 'react'
1616
import type { z } from 'zod'
1717

1818
// eslint-disable-next-line no-restricted-syntax
19-
const MotionText = motion(Text)
19+
const MotionText = motion.create(Text)
2020

2121
/**
2222
* Props for {@link EditableSpan}.

app/gui/src/dashboard/components/styled/RadioGroup.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import * as React from 'react'
2121
import * as reactStately from 'react-stately'
2222

2323
import * as aria from '#/components/aria'
24-
import { forwardRef } from '#/utilities/react'
2524
import type { PropsWithRef } from '../AriaComponents'
2625

2726
/** Options for {@link useRenderProps}. */
@@ -102,10 +101,7 @@ function useSlot(): [React.RefCallback<Element>, boolean] {
102101
const UNDEFINED = undefined
103102

104103
/** A radio group allows a user to select a single item from a list of mutually exclusive options. */
105-
export default forwardRef(RadioGroup)
106-
107-
/** A radio group allows a user to select a single item from a list of mutually exclusive options. */
108-
function RadioGroup(props: aria.RadioGroupProps & PropsWithRef<HTMLDivElement>) {
104+
export default function RadioGroup(props: aria.RadioGroupProps & PropsWithRef<HTMLDivElement>) {
109105
let { ref } = props
110106
// @ts-expect-error Ref could be undefined
111107
;[props, ref] = aria.useContextProps(props, ref, aria.RadioGroupContext)

0 commit comments

Comments
 (0)