Skip to content

Commit ca2b1be

Browse files
authored
Merge branch 'master' into new_branch5
2 parents 636612a + 84e9d8c commit ca2b1be

File tree

273 files changed

+5904
-4995
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+5904
-4995
lines changed

.branding

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
https://github.com/Keavon/graphite-branded-assets/archive/8cd7cf811d36228a2eb7ce741adc3c745632a6e7.tar.gz
2-
17a7cd32dda4afd893c65e1fb6757f1ecf760702217f647d1c680db8d92643ef
1+
https://github.com/Keavon/graphite-branded-assets/archive/f44aa2f362ae4fed8d634878b817a1d3948a7dcb.tar.gz
2+
dffe2b483e491979ef57c320d61446ada5400ef73ff26582976631d9c36efefc

.github/workflows/build-dev-and-ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,11 @@ jobs:
113113
- name: 📃 Generate code documentation info for website
114114
if: github.ref == 'refs/heads/master'
115115
run: |
116-
cargo test --package graphite-editor --lib -- messages::message::test::generate_message_tree
116+
cd tools/editor-message-tree
117+
cargo run
118+
cd ../..
117119
mkdir -p artifacts-generated
118-
mv hierarchical_message_system_tree.txt artifacts-generated/hierarchical_message_system_tree.txt
120+
mv website/generated/hierarchical_message_system_tree.txt artifacts-generated/hierarchical_message_system_tree.txt
119121
120122
- name: 💿 Obtain cache of auto-generated code docs artifacts, to check if they've changed
121123
if: github.ref == 'refs/heads/master'

.github/workflows/build-linux-bundle.yml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,40 @@ jobs:
2020
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache
2121

2222
- name: Build Linux Bundle
23-
run: nix build .nix#graphite-bundle.tar.xz && cp ./result ./graphite-bundle.tar.xz
23+
run: nix build .nix#graphite-bundle.tar.xz && cp ./result ./graphite-linux-bundle.tar.xz
2424

2525
- name: Upload Linux Bundle
2626
uses: actions/upload-artifact@v4
2727
with:
28-
path: graphite-bundle.tar.xz
28+
name: graphite-linux-bundle
29+
path: graphite-linux-bundle.tar.xz
30+
compression-level: 0
31+
32+
- name: Setup Flatpak Tooling
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y flatpak flatpak-builder
36+
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
37+
38+
- name: Build Flatpak
39+
run: |
40+
nix build .nix#graphite-flatpak-manifest
41+
42+
rm -rf .flatpak
43+
mkdir -p .flatpak
44+
45+
cp ./result .flatpak/manifest.json
46+
47+
cd .flatpak
48+
mkdir -p repo
49+
50+
flatpak-builder --user --force-clean --install-deps-from=flathub --repo=repo build ./manifest.json
51+
52+
flatpak build-bundle repo graphite.flatpak art.graphite.Graphite --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
53+
54+
- name: Upload Flatpak
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: graphite-flatpak
58+
path: .flatpak/graphite.flatpak
59+
compression-level: 0

.github/workflows/website.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: 🕸 Install Zola
3838
uses: taiki-e/install-action@v2
3939
with:
40-
tool: zola@0.20.0
40+
tool: zola@0.22.0
4141

4242
- name: 🔍 Check if `website/other` directory changed
4343
uses: dorny/paths-filter@v3
@@ -67,19 +67,27 @@ jobs:
6767
rustup update stable
6868
echo "🦀 Latest updated version of Rust:"
6969
rustc --version
70-
cargo test --package graphite-editor --lib -- messages::message::test::generate_message_tree
70+
cd tools/editor-message-tree
71+
cargo run
72+
cd ../..
7173
mkdir artifacts
72-
mv hierarchical_message_system_tree.txt artifacts/hierarchical_message_system_tree.txt
74+
mv website/generated/hierarchical_message_system_tree.txt artifacts/hierarchical_message_system_tree.txt
7375
74-
- name: 🚚 Move `artifacts` contents to the project root
76+
- name: 🚚 Move `artifacts` contents to website/generated
7577
run: |
76-
mv artifacts/* .
78+
mkdir -p website/generated
79+
mv artifacts/* website/generated/
7780
7881
- name: 🔧 Build auto-generated code docs artifacts into HTML
7982
run: |
8083
cd website
8184
npm run generate-editor-structure
8285
86+
- name: 📃 Generate node catalog documentation
87+
run: |
88+
cd tools/node-docs
89+
cargo run
90+
8391
- name: 🌐 Build Graphite website with Zola
8492
env:
8593
MODE: prod

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ flamegraph.svg
1111
.idea/
1212
.direnv
1313
.DS_Store
14-
hierarchical_message_system_tree.txt
15-
hierarchical_message_system_tree.html

.nix/pkgs/graphite.nix

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,15 @@ let
4444
// {
4545
cargoArtifacts = deps.crane.lib.buildDepsOnly resourcesCommon;
4646

47-
# TODO: Remove the need for this hash by using individual package resolutions and hashes from package-lock.json
48-
npmDeps = pkgs.fetchNpmDeps {
49-
inherit (info) pname version;
50-
src = "${info.src}/frontend";
51-
hash = "sha256-D8VCNK+Ca3gxO+5wriBn8FszG8/x8n/zM6/MPo9E2j4=";
47+
npmDeps = pkgs.importNpmLock {
48+
npmRoot = "${info.src}/frontend";
5249
};
5350

5451
npmRoot = "frontend";
5552
npmConfigScript = "setup";
5653
makeCacheWritable = true;
5754

58-
nativeBuildInputs = tools.frontend ++ [ pkgs.npmHooks.npmConfigHook ];
55+
nativeBuildInputs = tools.frontend ++ [ pkgs.importNpmLock.npmConfigHook ];
5956

6057
prePatch = ''
6158
mkdir branding
@@ -109,13 +106,20 @@ deps.crane.lib.buildPackage (
109106
}
110107
else
111108
{ }
112-
);
109+
) // {
110+
GRAPHITE_GIT_COMMIT_HASH = inputs.self.rev or "unknown";
111+
GRAPHITE_GIT_COMMIT_DATE = inputs.self.lastModified or "unknown";
112+
};
113113

114114
postUnpack = ''
115115
mkdir ./branding
116116
cp -r ${branding}/* ./branding
117117
'';
118118

119+
preBuild = if inputs.self ? rev then ''
120+
export GRAPHITE_GIT_COMMIT_DATE="$(date -u -d "@$GRAPHITE_GIT_COMMIT_DATE" +"%Y-%m-%dT%H:%M:%SZ")"
121+
'' else "";
122+
119123
installPhase = ''
120124
mkdir -p $out/bin
121125
cp target/${if dev then "debug" else "release"}/graphite $out/bin/graphite
@@ -125,6 +129,12 @@ deps.crane.lib.buildPackage (
125129
126130
mkdir -p $out/share/icons/hicolor/scalable/apps
127131
cp ${branding}/app-icons/graphite.svg $out/share/icons/hicolor/scalable/apps/art.graphite.Graphite.svg
132+
mkdir -p $out/share/icons/hicolor/512x512/apps
133+
cp ${branding}/app-icons/graphite-512.png $out/share/icons/hicolor/512x512/apps/art.graphite.Graphite.png
134+
mkdir -p $out/share/icons/hicolor/256x256/apps
135+
cp ${branding}/app-icons/graphite-256.png $out/share/icons/hicolor/256x256/apps/art.graphite.Graphite.png
136+
mkdir -p $out/share/icons/hicolor/128x128/apps
137+
cp ${branding}/app-icons/graphite-128.png $out/share/icons/hicolor/128x128/apps/art.graphite.Graphite.png
128138
'';
129139

130140
postFixup = ''

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
// Code quality
1212
"wayou.vscode-todo-highlight",
1313
"streetsidesoftware.code-spell-checker",
14-
// Helpful
14+
// Git
1515
"mhutchie.git-graph",
1616
"qezhu.gitlink",
17+
// Helpful
1718
"wmaurer.change-case"
1819
]
1920
}

.vscode/settings.json

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,17 @@
2626
// Configured in `.prettierrc`
2727
"editor.defaultFormatter": "esbenp.prettier-vscode"
2828
},
29+
// Website: don't format Zola/Tera-templated HTML on save
30+
"[html]": {
31+
"editor.formatOnSave": false
32+
},
2933
// Handlebars: don't save on format
3034
// (`about.hbs` is used by Cargo About to encode license information)
3135
"[handlebars]": {
3236
"editor.formatOnSave": false
3337
},
3438
// Rust Analyzer config
39+
"rust-analyzer.check.command": "clippy",
3540
"rust-analyzer.cargo.allTargets": false,
3641
"rust-analyzer.procMacro.ignored": {
3742
"serde_derive": ["Serialize", "Deserialize"],
@@ -47,13 +52,35 @@
4752
"vite-plugin-svelte-css-no-scopable-elements": "ignore", // NOTICE: Keep this list in sync with the list in `frontend/vite.config.ts`
4853
"a11y-no-static-element-interactions": "ignore", // NOTICE: Keep this list in sync with the list in `frontend/vite.config.ts`
4954
"a11y-no-noninteractive-element-interactions": "ignore", // NOTICE: Keep this list in sync with the list in `frontend/vite.config.ts`
50-
"a11y-click-events-have-key-events": "ignore" // NOTICE: Keep this list in sync with the list in `frontend/vite.config.ts`
55+
"a11y-click-events-have-key-events": "ignore", // NOTICE: Keep this list in sync with the list in `frontend/vite.config.ts`
56+
"a11y_consider_explicit_label": "ignore", // NOTICE: Keep this list in sync with the list in `frontend/vite.config.ts`
57+
"a11y_click_events_have_key_events": "ignore", // NOTICE: Keep this list in sync with the list in `frontend/vite.config.ts`
58+
"a11y_no_noninteractive_element_interactions": "ignore" // NOTICE: Keep this list in sync with the list in `frontend/vite.config.ts`
5159
},
60+
// Git Graph config
61+
"git-graph.repository.fetchAndPrune": true,
62+
"git-graph.repository.showRemoteHeads": false,
63+
"git-graph.repository.commits.fetchAvatars": true,
64+
// VS Code Git config
65+
"git.autofetch": true,
66+
"git.enableStatusBarSync": false,
67+
"git.showActionButton": {
68+
"sync": false
69+
},
70+
// CSpell config
71+
"cSpell.language": "en-US",
72+
"cSpell.logLevel": "Information",
73+
"cSpell.allowCompoundWords": true,
74+
// Other extensions config
75+
"evenBetterToml.formatter.alignComments": false,
76+
"package-json-upgrade.ignorePatterns": ["source-sans-pro"],
5277
// VS Code config
5378
"html.format.wrapLineLength": 200,
5479
"files.eol": "\n",
5580
"files.insertFinalNewline": true,
5681
"files.associations": {
5782
"*.graphite": "json"
58-
}
83+
},
84+
"editor.renderWhitespace": "boundary",
85+
"editor.minimap.markSectionHeaderRegex": "// ===+\\n\\s*//\\s*(?<label>[^\\n]{1,18})[^\\n]*(\\n\\s*//[^\\n]*)*\\n\\s*// ===+"
5986
}

Cargo.lock

Lines changed: 24 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ members = [
3939
"node-graph/node-macro",
4040
"node-graph/preprocessor",
4141
"proc-macros",
42-
"tools/crate-hierarchy-viz"
42+
"tools/crate-hierarchy-viz",
43+
"tools/editor-message-tree",
44+
"tools/node-docs",
4345
]
4446
default-members = [
4547
"editor",
@@ -137,6 +139,7 @@ log = "0.4"
137139
bitflags = { version = "2.4", features = ["serde"] }
138140
ctor = "0.2"
139141
convert_case = "0.8"
142+
indoc = "2.0.5"
140143
derivative = "2.2"
141144
thiserror = "2"
142145
anyhow = "1.0"
@@ -151,7 +154,7 @@ wgpu = { version = "27.0", features = [
151154
"spirv",
152155
"strict_asserts",
153156
] }
154-
once_cell = "1.13" # Remove when `core::cell::LazyCell` (<https://doc.rust-lang.org/core/cell/struct.LazyCell.html>) is stabilized in Rust 1.80 and we bump our MSRV
157+
once_cell = "1.13" # Remove and replace with `core::cell::LazyCell` (<https://doc.rust-lang.org/core/cell/struct.LazyCell.html>)
155158
wasm-bindgen = "=0.2.100" # NOTICE: ensure this stays in sync with the `wasm-bindgen-cli` version in `website/content/volunteer/guide/project-setup/_index.md`. We pin this version because wasm-bindgen upgrades may break various things.
156159
wasm-bindgen-futures = "0.4"
157160
js-sys = "=0.3.77"
@@ -177,10 +180,16 @@ winit = { git = "https://github.com/rust-windowing/winit.git" }
177180
keyboard-types = "0.8"
178181
url = "2.5"
179182
tokio = { version = "1.29", features = ["fs", "macros", "io-std", "rt"] }
183+
# Linebender ecosystem (BEGIN)
184+
kurbo = { version = "0.12", features = ["serde"] }
180185
vello = { git = "https://github.com/linebender/vello" }
181186
vello_encoding = { git = "https://github.com/linebender/vello" }
182187
resvg = "0.45"
183188
usvg = "0.45"
189+
parley = "0.6"
190+
skrifa = "0.36"
191+
polycool = "0.4"
192+
# Linebender ecosystem (END)
184193
rand = { version = "0.9", default-features = false, features = ["std_rng"] }
185194
rand_chacha = "0.9"
186195
glam = { version = "0.29", default-features = false, features = [
@@ -194,8 +203,6 @@ image = { version = "0.25", default-features = false, features = [
194203
"jpeg",
195204
"bmp",
196205
] }
197-
parley = "0.6"
198-
skrifa = "0.36"
199206
pretty_assertions = "1.4"
200207
fern = { version = "0.7", features = ["colored"] }
201208
num_enum = { version = "0.7", default-features = false }
@@ -217,7 +224,6 @@ syn = { version = "2.0", default-features = false, features = [
217224
"extra-traits",
218225
"proc-macro",
219226
] }
220-
kurbo = { version = "0.12", features = ["serde"] }
221227
lyon_geom = "1.0"
222228
petgraph = { version = "0.7", default-features = false, features = ["graphmap"] }
223229
half = { version = "2.4", default-features = false, features = ["bytemuck"] }
@@ -234,7 +240,6 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
234240
tracing = "0.1"
235241
rfd = "0.15"
236242
open = "5.3"
237-
polycool = "0.4"
238243
spin = "0.10"
239244
clap = "4.5"
240245
spirv-std = { git = "https://github.com/Firestar99/rust-gpu-new", rev = "c12f216121820580731440ee79ebc7403d6ea04f", features = ["bytemuck"] }

0 commit comments

Comments
 (0)