Skip to content

Commit 0febfaf

Browse files
committed
Make the node graph unrenderable message less scary
1 parent c671705 commit 0febfaf

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

editor/src/messages/portfolio/portfolio_message_handler.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -924,11 +924,11 @@ impl PortfolioMessageHandler {
924924
let result = self.executor.poll_node_graph_evaluation(active_document, responses);
925925
if result.is_err() {
926926
let error = r#"
927-
<rect x="50%" y="50%" width="480" height="100" transform="translate(-240 -50)" rx="4" fill="var(--color-error-red)" />
927+
<rect x="50%" y="50%" width="460" height="100" transform="translate(-230 -50)" rx="4" fill="var(--color-warning-yellow)" />
928928
<text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-size="18" fill="var(--color-2-mildblack)">
929-
<tspan x="50%" dy="-24" font-weight="bold">The document cannot be rendered in its current state.</tspan>
930-
<tspan x="50%" dy="24">Check for error details in the node graph, which can be</tspan>
931-
<tspan x="50%" dy="24">opened with the viewport's top right <tspan font-style="italic">Node Graph</tspan> button.</tspan>
929+
<tspan x="50%" dy="-24" font-weight="bold">The document cannot render in its current state.</tspan>
930+
<tspan x="50%" dy="24">Undo to go back, if available, or check for error details</tspan>
931+
<tspan x="50%" dy="24">by clicking the <tspan font-style="italic">Node Graph</tspan> button up at the top right.</tspan>
932932
/text>"#
933933
// It's a mystery why the `/text>` tag above needs to be missing its `<`, but when it exists it prints the `<` character in the text. However this works with it removed.
934934
.to_string();

frontend/src/components/Editor.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
--color-f-white-rgb: 255, 255, 255;
105105
--color-error-red: #d6536e;
106106
--color-error-red-rgb: 214, 83, 110;
107+
--color-warning-yellow: #d5aa43;
108+
--color-warning-yellow-rgb: 213, 170, 67;
107109
108110
--color-data-general: #cfcfcf;
109111
--color-data-general-dim: #8a8a8a;

0 commit comments

Comments
 (0)