-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix teleporter crash and integration tests (#11656)
Fix failing integration tests: - Fix a Vue Teleporter crash that became reachable when the dropdown arrow is displayed more often (#11620). - Fix a new drag-and-drop test that didn't work in CI. - Update mock data for multi-type expression updates (#11583). # Important Notes - The new `ConditionalTeleport` component should be used for any `Teleport` that uses the `disabled` prop and has a `to` that isn't always a valid teleportation target.
- Loading branch information
Showing
6 changed files
with
39 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
app/gui/src/project-view/components/ConditionalTeleport.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script setup lang="ts"> | ||
/** | ||
* @file This component is equivalent to `Teleport` except when `disabled` is `true`, `to` doesn't have to specify a | ||
* valid teleportation target (works around a Vue issue present at least in 3.5.2-3.5.13). | ||
*/ | ||
import { type RendererElement } from 'vue' | ||
const { disabled } = defineProps<{ | ||
disabled: boolean | ||
to: string | RendererElement | null | undefined | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<!-- Note: `defer` must not be used here, or Vue errors will occur when unmounting components as of 3.5.2. --> | ||
<Teleport v-if="!disabled" :to="to"> | ||
<slot /> | ||
</Teleport> | ||
<slot v-else /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters