diff --git a/web/AGENTS.md b/web/AGENTS.md index 193ddc14..6d1a378d 100644 --- a/web/AGENTS.md +++ b/web/AGENTS.md @@ -93,6 +93,13 @@ there when none exists. (custom nodes; `upload-handler.ts` routes dropped files), `comments/`, `diff/`, `drag-handle/`, `slash/`, `link/`, `ai/`, `hooks/`. Editor-wide state is [app/stores/editor.ts](app/stores/editor.ts). +- **Diff view**: adding or changing a block or node includes its branch + diff. Expose `diffStatus` on its node view and style it as added, removed + and modified. A block changed through its attributes renders + `DiffChangeMarker` with a `DiffDetails.vue` card in its own + directory. Attributes that count as one change, count per list item or + are never set by a user are declared in + [diff/change-count.ts](app/components/editor/diff/change-count.ts). - **Routing**: one dynamic page, `app/pages/[[organizationSlug]]/[[documentSlug]].vue`; [app/middleware/01.redirect.global.ts](app/middleware/01.redirect.global.ts) diff --git a/web/app/components/editor/attribute-names.ts b/web/app/components/editor/attribute-names.ts index 476c8d82..1e58966b 100644 --- a/web/app/components/editor/attribute-names.ts +++ b/web/app/components/editor/attribute-names.ts @@ -2,3 +2,6 @@ // editor modules export const NODE_COMMENT_ID_ATTR = "nodeCommentId" + +// set on image and file blocks while their upload is in flight +export const UPLOADING_ATTR = "uploading" diff --git a/web/app/components/editor/blocks/figma/FigmaBlock.vue b/web/app/components/editor/blocks/figma/FigmaBlock.vue index 3f7be025..f703bb54 100644 --- a/web/app/components/editor/blocks/figma/FigmaBlock.vue +++ b/web/app/components/editor/blocks/figma/FigmaBlock.vue @@ -4,6 +4,7 @@ import { computePosition, flip, offset, shift } from "@floating-ui/dom" import { cn } from "~/lib/utils" import { DiffStatus } from "~/components/editor/diff/position-map" import DiffChangeMarker from "~/components/editor/diff/DiffChangeMarker.vue" +import FigmaDiffDetails from "./FigmaDiffDetails.vue" import { isFigmaUrl, convertToEmbedUrl } from "./index" const props = defineProps(nodeViewProps) @@ -262,7 +263,9 @@ onBeforeUnmount(() => { :style="{ height: `${displayHeight}px` }" allowfullscreen /> - + + +