Skip to content

docs: add guidelines for images and diagrams - #6603

Merged
peholmst merged 7 commits into
mainfrom
docs/image-guidelines
Dec 2, 2026
Merged

peholmst merged 7 commits into
mainfrom
docs/image-guidelines

Conversation

@totally-not-ai

@totally-not-ai totally-not-ai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a guidelines chapter on images and diagrams, so that new diagrams match the newest ones in Building Apps. Those diagrams share a consistent palette and drawing style, but nothing wrote it down, so each new diagram had to rediscover it.

What changed

  • New guidelines/images.md, based on the newest Building Apps diagrams (request-flow.svg and mvp.svg as reference examples):
    • SVG source next to the PNG, with the regeneration command in the SVG.
    • Canvas size, font stack and text sizes, and how to avoid the DejaVu Sans fallback when rendering with rsvg-convert on Linux.
    • A palette by role: browser, server, UI layer, UI parts, framework plumbing, application layer, application parts, external systems and build time. Colors encode the layer and where a part runs, not who wrote the code.
    • A separate set of hues for peer diagrams (packages, microservices).
    • Shapes, arrows, numbered step badges, alt text and a checklist. Text sizes, corner radii and stroke widths follow the nesting depth and role used in the two reference diagrams.
    • The few values neither reference shows (external systems, build time and dashed regions, the monospace font, peer hues, double-headed arrows) are marked with the diagram they come from.
  • A short "Images & Diagrams" section in CONVENTIONS.md that names the two reference diagrams, and the chapter listed in guidelines/overview.md.
  • Other diagrams are called out as not to be copied: several in Building Apps (such as the layers and API/SPI diagrams) that use an earlier blue and green, and older ones elsewhere (Montserrat text, earlier brand colors, Mermaid defaults). They are not changed here.

Test summary

  • Every color, size and font value was checked against the two reference SVG sources; the values they don't show were checked against the diagram the chapter names for them.
  • Guidelines only; no pages or images change.

Working on behalf of Artur

Describe how to add a diagram so that it matches the existing diagrams
in Building Apps: an SVG source next to the PNG, the color of each role,
font and sizes, arrows, numbered steps and alt text.
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Preview Deployment

This PR has been deployed for preview.

URL: https://docs-preview-pr-6603.fly.dev

No documentation page changes detected.

Built from ea2e005

peholmst pushed a commit that referenced this pull request Dec 2, 2026
…6607)

## Summary

The two diagrams on the Architecture Overview page (#6556) used their
own color scheme (green for the application's own code, blue for what
Vaadin provides, orange for build tools), which differs from the other
Building Apps diagrams such as `request-flow.svg`. This redraws them
with the shared palette and drawing rules proposed in #6603, so that
colors mean the same thing on every page: they encode the layer and
where a part runs, not who wrote the code.

## What changed

- **Application overview**: Java and React views are now blue UI parts;
the Vaadin client engine is gray framework plumbing; the application
services sit as a light-green application part inside a green
Application Layer region; the frontend bundle and the build plugin are
neutral white boxes inside the dashed build-time region. The
browser–server gap is wider so the "Events and UI changes as JSON" label
no longer straddles the region borders. The VaadinSession title is split
into a title and a smaller second line.
- **UI component diagram**: the Java view and React view are blue UI
parts; the client engine is gray; the annotations box uses the white
"detail of a UI part" style; the call from the Java view to `Button` is
drawn as a blue UI-layer arrow; the dashed thin connectors are now solid
5-pixel lines.
- Both: no text smaller than 22 pixels; no colors outside the palette
tables.
- The page text that explains the colors is rewritten to match (UI
layer, framework plumbing, application layer, build), still saying which
parts Vaadin provides and which you write.
- The palette in #6603 has no role for build-time parts, so they use the
neutral white box the guidelines prescribe for uncovered roles. If a
dedicated build-time part role is wanted, it belongs in #6603.

## Test summary

- Both PNGs regenerated from the SVGs with librsvg, rendered with
Liberation Sans (Arial metrics), and checked visually: no label
overflows its box.
- Text-only change otherwise; no links or page structure changed.

Working on behalf of Artur

---------

Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
@peholmst
peholmst marked this pull request as ready for review December 2, 2026 08:53

@vaadin-review-bot vaadin-review-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed the changes — left 3 comments.

Finding
📝 Several palette rows come from diagrams the same chapter says not to copy, not from the two reference SVGs.
📐 CONVENTIONS.md points contributors at the diagrams the chapter tells them not to copy.
📝 The text sizes, stroke widths and corner radii disagree with the two diagrams declared as the references.

Comment thread guidelines/images.md Outdated
| Detail of a UI part: a method, a field, an interface | `#FFFFFF` | `#2E9BEA` | `#222222` |
| Application layer (region) | `#17B05C` | `#0D6B38` | `#0B2E19` |
| Application part: a service, a repository | `#ADF5C8` | `#5EC98A` | `#222222` |
| External system: a database, another application | `#FFFFFF` | `#7F7F7F` | `#222222` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Several palette rows come from diagrams the same chapter says not to copy, not from the two reference SVGs.

The chapter names only request-flow.svg and mvp.svg as reference examples and ends the intro with "Do not copy the colors or style of any of these" about every other diagram. Neither reference contains an external system, a build-time region or peer boxes:

  • External system and Build time exist only in architecture/images/overview.svg, which is excluded (it colors a Java view green and the client engine blue). The one other external system in the repo, in external-system-integration.svg, is orange #FFE0C2.
  • The five peer hues come from layers.svg, the API/SPI diagrams and the microservices diagrams, all explicitly excluded. The blue stroke is not even stable there: #22B4FF in the API/SPI diagrams, #22B3FF in the microservices ones.
  • The double-headed arrow rule also has no example among the two references.

For these roles a contributor is told to use a color with no diagram to follow. Either widen the set of reference examples or say where the values come from.

images.md:108 · documentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Kept the two references and said where the other values come from instead. The External system and Build time rows are now marked as coming from overview.svg and component-architecture.svg, with a note to take only those rows from them. The peer section says the hues come from the earlier package and microservice diagrams and fixes the blue stroke at #22B4FF. The double-headed arrow rule now says no reference has one and how to draw it (one line, same marker at both ends). The dashed stroke and the monospace font are marked the same way, and the intro says these values are marked where they appear.

Comment thread CONVENTIONS.md Outdated
Draw a diagram as an SVG source next to the PNG that the page shows, and start
the SVG with the command that regenerates the PNG. Use the colors, font and
sizes in `guidelines/images.md`, and give the same role the same color as in
the other diagrams.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 CONVENTIONS.md points contributors at the diagrams the chapter tells them not to copy.

"give the same role the same color as in the other diagrams" is the opposite of what guidelines/images.md says: all but two diagrams are declared non-conforming, with "Do not copy the colors or style of any of these." Since CONVENTIONS.md is the standalone checkable list, a contributor who reads only it will sample colors from layers.svg or an API/SPI diagram. Naming the two reference diagrams would fix it.

CONVENTIONS.md:183 · conventions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. The section now names the two reference examples, request-flow.svg and mvp.svg, and says most other diagrams use older colors and are not models to copy.

Comment thread guidelines/images.md Outdated
- **Font**: `font-family="Helvetica Neue, Helvetica, Arial, sans-serif"` on the
root `svg` element. Use `Menlo, DejaVu Sans Mono, monospace` only for code,
such as an annotation or a file name.
- **Sizes**: 30 for the title of a region, 28 for the label of a box, 22–25 for

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 The text sizes, stroke widths and corner radii disagree with the two diagrams declared as the references.

Checked against request-flow.svg and mvp.svg:

  • Box labels are 27 (<vaadin-button>) and 25 (setSaveEnabled()), not 28.
  • Second lines in a box are 27 and 28 in request-flow, outside the stated 22–25.
  • The UI (one per browser tab) region title is 28, not 30.
  • The white detail boxes in mvp use a stroke of 5, while the rule puts parts at 6.
  • The application layer region is rx="10" in request-flow and rx="14" in mvp, so the two references disagree with each other and the rule covers only one.

A contributor cannot both follow the numbers and match the diagram next to theirs. Adjust the rules or the two SVGs.

images.md:76 · documentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adjusted the rules to match both SVGs rather than changing the diagrams. Region titles are 30, or 28 for a region nested two deep (the UI region). Box labels are 28 and may step down to 25 when they don't fit (27 and 25 in the references). A wrapped label keeps its size on both lines, and a secondary note is 22. Corner radii follow nesting depth: 14 outer, 10 inside one region, 8 inside two, 6 for parts. That explains the application layer being 14 in mvp (outer) and 10 in request-flow (inside the server). Strokes are 6 for outer and layer regions and colored parts, and 5 for regions nested in a layer and for white detail boxes.

Derive the text sizes, corner radii and stroke widths from
request-flow.svg and mvp.svg, say where the colors that neither
reference shows come from, and point CONVENTIONS.md at the two
reference diagrams instead of all diagrams.
@peholmst
peholmst merged commit 7f05e4b into main Dec 2, 2026
13 of 15 checks passed
@peholmst
peholmst deleted the docs/image-guidelines branch December 2, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants