Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-canvas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- ".github/workflows/*"
- "crates/*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/test-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
branches:
- main
pull_request:
paths:
- ".github/workflows/*"
- "crates/*"
Comment on lines +8 to +10
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all Rust files outside crates/ directory that might be dependencies

echo "=== Rust source files outside crates/ ==="
fd -e rs -E 'crates/**' -E 'target/**' -E 'node_modules/**' -E '.git/**'

echo ""
echo "=== Checking for workspace members in root Cargo.toml ==="
if [ -f Cargo.toml ]; then
  cat Cargo.toml | head -50
fi

echo ""
echo "=== Directory structure (top level) ==="
ls -la | grep -E '^d'

Repository: gridaco/grida

Length of output: 3542


🏁 Script executed:

#!/bin/bash
# Check if workspace crates reference third_party/usvg

echo "=== Searching for third_party references in workspace crate Cargo.toml files ==="
for crate in crates/grida-canvas crates/grida-canvas-wasm crates/grida-canvas-fonts crates/grida-dev crates/csscascade crates/math2; do
  if [ -f "$crate/Cargo.toml" ]; then
    echo "--- $crate/Cargo.toml ---"
    grep -i "third.party\|usvg" "$crate/Cargo.toml" || echo "No third_party or usvg references found"
  fi
done

echo ""
echo "=== Viewing test-crates.yml content ==="
if [ -f ".github/workflows/test-crates.yml" ]; then
  cat ".github/workflows/test-crates.yml"
fi

Repository: gridaco/grida

Length of output: 2307


Add third_party/usvg/* to path filters.

The path filters exclude third_party/usvg/, which crates/grida-canvas directly depends on. Pull requests that modify only third_party/usvg/ won't trigger this workflow, creating a testing gap for a critical crate dependency.

Update the path filters to:

paths:
  - ".github/workflows/*"
  - "crates/*"
  - "third_party/usvg/*"
🤖 Prompt for AI Agents
.github/workflows/test-crates.yml around lines 8 to 10: the workflow path
filters currently include ".github/workflows/*" and "crates/*" but omit
"third_party/usvg/*", which is a direct dependency of crates/grida-canvas;
update the paths array to add "third_party/usvg/*" so the workflow triggers when
that directory changes, ensuring the YAML paths section contains the three
entries ".github/workflows/*", "crates/*", and "third_party/usvg/*".


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
Expand Down Expand Up @@ -52,8 +59,10 @@ jobs:

- name: Cache cargo build outputs
uses: Swatinem/rust-cache@v2
with:
key: test

- name: Run cargo tests
env:
CARGO_BUILD_JOBS: 2
run: cargo test --workspace
FORCE_SKIA_BINARIES_DOWNLOAD: "1"
run: cargo test --workspace --exclude grida-canvas-wasm
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Document the emscripten dependency and verify test coverage.

The grida-canvas-wasm crate requires emscripten environment variables (CC=emcc, CXX=em++, AR=emar) and the wasm32-unknown-emscripten target, which this workflow doesn't configure. The exclusion is justified, but should be documented inline to clarify intent for future maintainers.

Add an explanatory comment above the test command indicating why the crate is excluded, and confirm that separate CI coverage for grida-canvas-wasm exists or document plans to establish it.

🤖 Prompt for AI Agents
.github/workflows/test-crates.yml around line 59: the workflow excludes the
grida-canvas-wasm crate from cargo test but does not document why; add a concise
inline comment immediately above the `run: cargo test --workspace --exclude
grida-canvas-wasm` line stating that grida-canvas-wasm requires an emscripten
build environment (CC=emcc, CXX=em++, AR=emar and the wasm32-unknown-emscripten
target) which is not configured in this runner, and note that the crate is
excluded for that reason; also update the workflow or repository docs to confirm
where CI/test coverage for grida-canvas-wasm runs (or add a TODO linking to a
ticket/plan to add separate CI that sets up emscripten and the wasm target).

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ members = [
]

# Reduce debug information for tests to lower memory usage during linking in CI
# opt-level = 1 speeds up compilation while maintaining debuggability
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify the comment about compilation speed.

The comment states "speeds up compilation" but opt-level = 1 actually increases compilation time slightly. What it does is speed up test execution and reduce binary size, which helps with linking memory usage.

🔎 Suggested comment revision
-# opt-level = 1 speeds up compilation while maintaining debuggability
+# opt-level = 1 speeds up test execution and reduces binary size while maintaining debuggability
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# opt-level = 1 speeds up compilation while maintaining debuggability
# opt-level = 1 speeds up test execution and reduces binary size while maintaining debuggability
🤖 Prompt for AI Agents
In Cargo.toml around line 13, the inline comment "opt-level = 1 speeds up
compilation while maintaining debuggability" is inaccurate; update the comment
to state that opt-level = 1 may slightly increase compilation time but improves
runtime (e.g., speeds up test execution), reduces binary size, and lowers linker
memory usage while preserving reasonable debuggability. Replace the existing
sentence with a concise corrected explanation reflecting those effects.

[profile.test]
opt-level = 1
debug = 1
14 changes: 11 additions & 3 deletions apps/blog/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ const config: Config = {
theme: {
customCss: "./src/css/custom.css",
},
sitemap: {
changefreq: "monthly",
priority: 0.5,
lastmod: "date",
ignorePatterns: ["/tags/**", "/page/**"],
},
} satisfies Preset.Options,
],
],
Expand All @@ -57,9 +63,11 @@ const config: Config = {
image: "img/social-card.png",
navbar: {
logo: {
alt: "Grida",
src: "img/logo.svg",
srcDark: "img/logo-on-dark.svg",
alt: "Grida Logo",
src: "img/navbar-logo.svg",
srcDark: "img/navbar-logo-dark.svg",
href: "https://grida.co/",
target: "_self",
},
items: [
{
Expand Down
2 changes: 2 additions & 0 deletions apps/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"dev": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
Expand All @@ -16,6 +17,7 @@
},
"dependencies": {
"@docusaurus/core": "3.7.0",
"@docusaurus/plugin-sitemap": "3.7.0",
"@docusaurus/preset-classic": "3.7.0",
"@docusaurus/theme-mermaid": "3.7.0",
"@mdx-js/react": "^3.1.0",
Expand Down
9 changes: 9 additions & 0 deletions apps/blog/static/img/navbar-logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions apps/blog/static/img/navbar-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions apps/docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ const config: Config = {
trackingID: "G-T0S919XJ07",
anonymizeIP: true,
},
sitemap: {
changefreq: "weekly",
priority: 0.5,
lastmod: "date",
ignorePatterns: ["/tags/**"],
},
},
],
],
Expand Down
23 changes: 23 additions & 0 deletions docs/wg/feat-editor/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Editor Features (WG)
---

Editor features are a collection of **Grida editor-specific** behaviors and capabilities. These documents focus on **practical implementation details** over mathematical abstractions, emphasizing real-world UX and editor workflows.

## Scope

- **In scope**: Editor-specific features, Grida-specific behaviors, practical UX specifications
- **Focus**: Practical implementation > mathematical/theoretical models
- **Out of scope**: Generic algorithms, pure mathematical models, backend-agnostic features

## Documents

- [**UX Surface**](./ux-surface/) - Grida editor's specific practical UX specifications

## Characteristics

These documents prioritize:

- **Practical over mathematical**: Real-world implementation details take precedence over theoretical models
- **Editor-specific**: Features unique to the Grida editor experience
- **UX-focused**: User experience and interaction patterns are central
23 changes: 23 additions & 0 deletions docs/wg/feat-editor/ux-surface/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: UX Surface (WG)
---

UX Surface documents specify **Grida editor's specific practical UX specifications** for surface interactions, selection, targeting, and related user interface behaviors.

## Scope

- **In scope**: Practical UX specifications for surface interactions, selection behaviors, pointer events, overlay interactions
- **Focus**: Editor-specific UX patterns and interaction models
- **Out of scope**: Generic UI patterns, theoretical interaction models, backend-agnostic behaviors

## Documents

- [**Selection**](./selection.md) - Selection behavior for pointer interactions and keyboard modifiers

## Characteristics

These documents specify:

- **Practical UX patterns**: Real-world interaction behaviors as implemented in the Grida editor
- **Editor-specific behaviors**: UX patterns unique to Grida's editor surface
- **Interaction specifications**: Detailed behavior specifications for user interactions
Loading