-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display error message when viewed graph doesn't exist. (#11452)
Fixes #11211 <img width="258" alt="image" src="https://github.com/user-attachments/assets/7adea4f6-774a-49ac-8c86-5e785df2acff"> When the "go back" button is clicked, the user is sent back to the `main` function graph. The breadcrumbs are also present on that view and can be used for navigation. Current design of the error state is improvised, likely to be changed once we have some design guidance about it.
- Loading branch information
Showing
6 changed files
with
95 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.enso text eol=lf | ||
*.png binary | ||
CHANGELOG.md merge=union |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<script setup lang="ts"> | ||
import SvgIcon from '@/components/SvgIcon.vue' | ||
import { useProjectStore } from '@/stores/project' | ||
import StandaloneButton from './StandaloneButton.vue' | ||
const project = useProjectStore() | ||
function goToMain() { | ||
project.executionContext.desiredStack = [project.executionContext.getStackBottom()] | ||
} | ||
</script> | ||
|
||
<template> | ||
<div class="GraphMissingView"> | ||
<SvgIcon class="header-icon" name="error" /> | ||
<span>The component you are viewing no longer exists.</span> | ||
<StandaloneButton icon="home2" label="Go back" @click="goToMain" /> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.GraphMissingView { | ||
background-image: linear-gradient(to bottom, #00000000, #00000030); | ||
background-size: 100% 100%; | ||
position: absolute; | ||
inset: 0; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 8px; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
.header-icon { | ||
--icon-size: 64px; | ||
} | ||
</style> |
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,26 @@ | ||
<script setup lang="ts"> | ||
import type { URLString } from '@/util/data/urlString' | ||
import type { Icon } from '@/util/iconName' | ||
import SvgButton from './SvgButton.vue' | ||
const props = defineProps<{ | ||
icon?: Icon | URLString | undefined | ||
label?: string | undefined | ||
disabled?: boolean | ||
title?: string | undefined | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<div class="StandaloneButton"> | ||
<SvgButton v-bind="props" :name="icon" /> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.StandaloneButton { | ||
background-color: var(--color-frame-bg); | ||
padding: 4px; | ||
border-radius: var(--radius-full); | ||
} | ||
</style> |
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