ammachado opened a new pull request, #24275:
URL: https://github.com/apache/camel/pull/24275

   # Description
   
   Improves the text rendering and theming of the `camel-diagram` dev-console 
web components (`camel-route-diagram` and `camel-topology-diagram`) and 
refreshes their local smoke-test pages.
   
   **Rendering fixes (production component JS):**
   
   - Replace fixed character-count truncation with canvas `measureText` 
width-aware `fitText`, so long node labels trim to a clean ellipsis instead of 
overflowing the box. Applies to both `camel-route-diagram.js` and 
`camel-topology-diagram.js`.
   - `camel-topology-diagram`: reserve horizontal space for the metric badge so 
the green/red exchange counters no longer overlap the label, and add a native 
SVG `<title>` tooltip that reveals the full label and underlying URI when the 
text is trimmed.
   - Fix dark-theme node-box contrast in `camel-topology-diagram` by 
introducing a `--ctd-node-bg` custom property that the `@media 
(prefers-color-scheme: dark)` query flips together with the text color. 
Previously the node `<rect>` read `--ctd-bg` directly, which never flipped, 
producing light text on a white box. This mirrors the existing `--crd-node-bg` 
pattern already used by `camel-route-diagram`.
   
   **Test resources (manual smoke pages, not part of CI):**
   
   - Add `smoke-test-topology.html`, a verification page for 
`camel-topology-diagram` with five examples (route pipeline, external 
endpoints, interlinked shared endpoint, live metrics, and theme variants) drawn 
from the topology unit tests and the route-topology blog scenario.
   - Rename `smoke-test.html` to `smoke-test-route.html` for naming consistency 
with the new topology page.
   - Add a `Light / Dark / OS` header theme switch (defaulting to OS) to both 
smoke pages so each section can be checked in either theme without changing OS 
settings.
   - Update `integration-test.html` navigation links to point at the renamed 
and new pages.
   
   The change is limited to static JS resources and HTML test pages; no Java 
sources or auto-generated artifacts are affected.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL-23636) 
filed for the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   
   - [ ] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
   
     > Not run: this change touches only static JS 
(`src/main/resources/.../diagram/*.js`) and HTML test resources, so there are 
no Java sources, catalog, or doc artifacts to regenerate. The pre-push `mvn 
formatter:format impsort:sort` hook produced no changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   ---
   
   _Claude Code on behalf of Adriano Machado_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to