Prep for the RC1 release of the desktop app

This commit is contained in:
Keavon Chambers 2025-12-24 22:45:08 -08:00
parent 63217feac6
commit 9f25c50ca1
12 changed files with 119 additions and 23 deletions

View File

@ -18,25 +18,19 @@ impl DialogLayoutHolder for LicensesDialog {
fn layout_column_2(&self) -> Layout {
#[allow(clippy::type_complexity)]
let button_definitions: &[(&str, &str, fn() -> Message)] = &[
("GraphiteLogo", "Graphite Logo", || {
("Code", "Source Code License", || {
FrontendMessage::TriggerVisitLink {
url: "https://graphite.art/logo/".into(),
url: "https://graphite.art/license#source-code".into(),
}
.into()
}),
("IconsGrid", "Graphite Icons", || {
("GraphiteLogo", "Branding License", || {
FrontendMessage::TriggerVisitLink {
url: "https://raw.githubusercontent.com/GraphiteEditor/Graphite/master/frontend/assets/LICENSE.md".into(),
url: "https://graphite.art/license#branding".into(),
}
.into()
}),
("License", "Graphite License", || {
FrontendMessage::TriggerVisitLink {
url: "https://graphite.art/license/".into(),
}
.into()
}),
("License", "Other Licenses", || FrontendMessage::TriggerDisplayThirdPartyLicensesDialog.into()),
("IconsGrid", "Dependency Licenses", || FrontendMessage::TriggerDisplayThirdPartyLicensesDialog.into()),
];
let widgets = button_definitions
.iter()
@ -52,13 +46,11 @@ impl LayoutHolder for LicensesDialog {
let year = &self.localized_commit_year;
let description = format!(
"
The Graphite logo and brand identity are copyright © {year}\nGraphite Labs, LLC. See \"Graphite Logo\" for usage policy.\n\
Graphite source code is copyright © {year} Graphite contrib-\nutors and is available under the Apache License 2.0. See\n\"Source Code License\" for details.\n\
\n\
The Graphite editor's icons and design assets are copyright\n© {year} Graphite Labs, LLC. See \"Graphite Icons\" for details.\n\
The Graphite logo, icons, and visual identity are copyright ©\n{year} Graphite Labs, LLC. See \"Branding License\" for details.\n\
\n\
Graphite code is copyright © {year} Graphite contributors\nand is made available under the Apache 2.0 license. See\n\"Graphite License\" for details.\n\
\n\
Graphite is distributed with third-party open source code\ndependencies. See \"Other Licenses\" for details.
Graphite is distributed with third-party open source code\ndependencies. See \"Dependency Licenses\" for details.
"
);
let description = description.trim();

View File

@ -327,6 +327,9 @@ pub enum FrontendMessage {
UpdateStatusBarHintsLayout {
diff: Vec<WidgetDiff>,
},
UpdateStatusBarInfoLayout {
diff: Vec<WidgetDiff>,
},
UpdateWorkingColorsLayout {
diff: Vec<WidgetDiff>,
},

View File

@ -481,6 +481,7 @@ impl LayoutMessageHandler {
LayoutTarget::NodeGraphControlBar => FrontendMessage::UpdateNodeGraphControlBarLayout { diff },
LayoutTarget::PropertiesPanel => FrontendMessage::UpdatePropertiesPanelLayout { diff },
LayoutTarget::StatusBarHints => FrontendMessage::UpdateStatusBarHintsLayout { diff },
LayoutTarget::StatusBarInfo => FrontendMessage::UpdateStatusBarInfoLayout { diff },
LayoutTarget::ToolOptions => FrontendMessage::UpdateToolOptionsLayout { diff },
LayoutTarget::ToolShelf => FrontendMessage::UpdateToolShelfLayout { diff },
LayoutTarget::WelcomeScreenButtons => FrontendMessage::UpdateWelcomeScreenButtonsLayout { diff },

View File

@ -46,6 +46,8 @@ pub enum LayoutTarget {
PropertiesPanel,
/// The contextual input key/mouse combination shortcuts shown in the status bar at the bottom of the window.
StatusBarHints,
/// The version information shown in the status bar at the bottom right of the window.
StatusBarInfo,
/// The left side of the control bar directly above the canvas.
ToolOptions,
/// The vertical buttons for all of the tools on the left of the canvas.

View File

@ -111,6 +111,7 @@ pub enum PortfolioMessage {
},
PrevDocument,
RequestWelcomeScreenButtonsLayout,
RequestStatusBarInfoLayout,
SetActivePanel {
panel: PanelType,
},

View File

@ -131,6 +131,9 @@ impl MessageHandler<PortfolioMessage, PortfolioMessageContext<'_>> for Portfolio
// Before loading any documents, initially prepare the welcome screen buttons layout
responses.add(PortfolioMessage::RequestWelcomeScreenButtonsLayout);
// Request status bar info layout
responses.add(PortfolioMessage::RequestStatusBarInfoLayout);
// Tell frontend to finish loading persistent documents
responses.add(FrontendMessage::TriggerLoadRestAutoSaveDocuments);
@ -950,6 +953,16 @@ impl MessageHandler<PortfolioMessage, PortfolioMessageContext<'_>> for Portfolio
layout_target: LayoutTarget::WelcomeScreenButtons,
});
}
PortfolioMessage::RequestStatusBarInfoLayout => {
let row = LayoutGroup::Row {
widgets: vec![TextLabel::new("Graphite (beta) 1.0.0-RC1").disabled(true).widget_instance()],
};
responses.add(LayoutMessage::SendLayout {
layout: Layout(vec![row]),
layout_target: LayoutTarget::StatusBarInfo,
});
}
PortfolioMessage::SetActivePanel { panel } => {
self.active_panel = panel;
responses.add(DocumentMessage::SetActivePanel { active_panel: self.active_panel });

View File

@ -4,6 +4,7 @@
import type { Editor } from "@graphite/editor";
import type { Layout } from "@graphite/messages";
import { patchLayout, UpdateWelcomeScreenButtonsLayout } from "@graphite/messages";
import { isDesktop } from "@graphite/utility-functions/platform";
import { extractPixelData } from "@graphite/utility-functions/rasterization";
import LayoutCol from "@graphite/components/layout/LayoutCol.svelte";
@ -72,13 +73,15 @@
</LayoutCol>
</LayoutCol>
<LayoutCol class="bottom-message">
{#if new Date().getFullYear() === 2025}
<TextLabel italic={true} disabled={true}>
<TextLabel italic={true} disabled={true}>
{#if isDesktop()}
You are testing Release Candidate 1 of the 1.0.0 desktop release. Please regularly check Discord for the next testing build and report issues you encounter.
{:else if new Date().getFullYear() === 2025}
September 2025 release — <a href="https://youtube.com/watch?v=Vl5BA4g3QXM" target="_blank">What's new? (video)</a>
— Note: some older documents may render differently and require manual fixes.
<a href="https://ec6796b4.graphite-editor.pages.dev/" target="_blank">Need the old version?</a>
</TextLabel>
{/if}
{/if}
</TextLabel>
</LayoutCol>
</LayoutCol>

View File

@ -4,10 +4,12 @@
import type { AppWindowState } from "@graphite/state-providers/app-window";
import type { DialogState } from "@graphite/state-providers/dialog";
import type { TooltipState } from "@graphite/state-providers/tooltip";
import { isDesktop } from "@graphite/utility-functions/platform";
import Dialog from "@graphite/components/floating-menus/Dialog.svelte";
import Tooltip from "@graphite/components/floating-menus/Tooltip.svelte";
import LayoutCol from "@graphite/components/layout/LayoutCol.svelte";
import TextLabel from "@graphite/components/widgets/labels/TextLabel.svelte";
import StatusBar from "@graphite/components/window/status-bar/StatusBar.svelte";
import TitleBar from "@graphite/components/window/title-bar/TitleBar.svelte";
import Workspace from "@graphite/components/window/workspace/Workspace.svelte";
@ -29,6 +31,17 @@
{#if $tooltip.visible}
<Tooltip />
{/if}
{#if isDesktop() && new Date() > new Date("2026-01-31")}
<LayoutCol class="release-candidate-expiry">
<TextLabel>
<p>
This is an outdated desktop release candidate build. Its testing<br />
period has concluded and the next build is available for download.<br />
Please update to help us continue testing by reporting new issues.
</p>
</TextLabel>
</LayoutCol>
{/if}
</LayoutCol>
<style lang="scss" global>
@ -37,4 +50,24 @@
overflow: auto;
touch-action: none;
}
.release-candidate-expiry {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: var(--color-e-nearwhite);
color: var(--color-2-mildblack);
opacity: 0.9;
pointer-events: none;
padding: 12px 40px;
border-radius: 4px;
text-align-last: justify;
font-size: 18px;
z-index: 1000;
.text-label {
line-height: 1.5;
}
}
</style>

View File

@ -3,25 +3,33 @@
import type { Editor } from "@graphite/editor";
import type { Layout } from "@graphite/messages";
import { patchLayout, UpdateStatusBarHintsLayout } from "@graphite/messages";
import { patchLayout, UpdateStatusBarHintsLayout, UpdateStatusBarInfoLayout } from "@graphite/messages";
import LayoutRow from "@graphite/components/layout/LayoutRow.svelte";
import Separator from "@graphite/components/widgets/labels/Separator.svelte";
import WidgetLayout from "@graphite/components/widgets/WidgetLayout.svelte";
const editor = getContext<Editor>("editor");
let statusBarHintsLayout: Layout = [];
let statusBarInfoLayout: Layout = [];
onMount(() => {
editor.subscriptions.subscribeJsMessage(UpdateStatusBarHintsLayout, (data) => {
patchLayout(statusBarHintsLayout, data);
statusBarHintsLayout = statusBarHintsLayout;
});
editor.subscriptions.subscribeJsMessage(UpdateStatusBarInfoLayout, (data) => {
patchLayout(statusBarInfoLayout, data);
statusBarInfoLayout = statusBarInfoLayout;
});
});
</script>
<LayoutRow class="status-bar">
<WidgetLayout class="hints" layout={statusBarHintsLayout} layoutTarget="StatusBarHints" />
<Separator />
<WidgetLayout class="info" layout={statusBarInfoLayout} layoutTarget="StatusBarInfo" />
</LayoutRow>
<style lang="scss" global>
@ -29,12 +37,18 @@
height: 24px;
width: 100%;
flex: 0 0 auto;
justify-content: space-between;
.hints {
overflow: hidden;
--row-height: 24px;
margin: 0 4px;
max-width: calc(100% - 2 * 4px);
flex: 1 1 auto;
> * {
flex: 0 0 auto;
}
.text-label,
.shortcut-label {
@ -55,5 +69,34 @@
padding: 0 4px;
}
}
.hints + .separator {
position: relative;
&::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: -40px;
width: 40px;
background: linear-gradient(to right, rgba(var(--color-2-mildblack-rgb), 0) 0%, rgba(var(--color-2-mildblack-rgb), 1) 100%);
}
}
.info {
margin: 0 4px;
--row-height: 24px;
justify-content: flex-end;
.text-label {
align-items: center;
flex-shrink: 0;
+ .text-label {
margin-left: 4px;
}
}
}
}
</style>

View File

@ -1474,6 +1474,7 @@ export type LayoutTarget =
| "NodeGraphControlBar"
| "PropertiesPanel"
| "StatusBarHints"
| "StatusBarInfo"
| "ToolOptions"
| "ToolShelf"
| "WelcomeScreenButtons"
@ -1634,6 +1635,8 @@ export class UpdateDataPanelLayout extends WidgetDiffUpdate {}
export class UpdateStatusBarHintsLayout extends WidgetDiffUpdate {}
export class UpdateStatusBarInfoLayout extends WidgetDiffUpdate {}
export class UpdateToolOptionsLayout extends WidgetDiffUpdate {}
export class UpdateToolShelfLayout extends WidgetDiffUpdate {}
@ -1724,6 +1727,7 @@ export const messageMakers: Record<string, MessageMaker> = {
UpdatePropertiesPanelLayout,
UpdatePropertiesPanelState,
UpdateStatusBarHintsLayout,
UpdateStatusBarInfoLayout,
UpdateToolOptionsLayout,
UpdateToolShelfLayout,
UpdateViewportHolePunch,

View File

@ -1250,6 +1250,7 @@ where
output.element.concat(other, transform, collision_hash_seed);
// TODO: Make this instead use the first encountered style
// Use the last encountered style as the output style
output.element.style = row.element.style.clone();
}

View File

@ -209,9 +209,9 @@ Graphite Branding License
Copyright (c) 2021-2025 Graphite Labs, LLC. All rights reserved.
This repository includes proprietary assets (the "Assets"), including but not limited to logos, icons, and branding materials. The Assets are not software source code and are consequently not licensed under the same terms as the other works of Graphite software materials. The intention of this license is to maintain the full permissiveness of the software code while reserving protections for the brand and visual identity of the official Graphite product.
The repository `https://github.com/Keavon/graphite-branded-assets/` includes proprietary assets (the "Assets"), including but not limited to logos, icons, and branding materials. The Assets are not software source code and are consequently not licensed under the same terms as the other works of Graphite software materials. The intention of this license is to maintain the full permissiveness of the software code while reserving protections for the brand and visual identity of the official Graphite product.
Permission is granted to use, reproduce, and distribute the Assets solely as part of unmodified build artifacts produced from the official Graphite repository at https://github.com/GraphiteEditor/Graphite, on master branch commits, using the official build process as documented therein. Any other use of the Assets—including copying, extraction, incorporation into modified or forked builds, or use in other projects or contexts—is prohibited without prior written permission from the copyright holder.
Permission is granted to use, reproduce, and distribute the Assets solely as part of unmodified build artifacts produced from the official Graphite repository at `https://github.com/GraphiteEditor/Graphite`, on master branch commits, using the official build process as documented therein. Any other use of the Assets—including copying, extraction, incorporation into modified or forked builds, or use in other projects or contexts—is prohibited without prior written permission from the copyright holder.
This license does not grant any rights under trademark law or affect the licensing of the software source code.