Skip to content

fix(road-conditions): open a long incident text in place instead of a second scroll area - #690

Merged
Medformatik merged 1 commit into
mainfrom
fix/incident-text-show-more
Oct 30, 2026
Merged

Medformatik merged 1 commit into
mainfrom
fix/incident-text-show-more

Conversation

@Medformatik

Copy link
Copy Markdown
Collaborator

What changed and why

Follow-up to #678. A long source text in the incident card scrolled inside the card, so the popup had two scroll areas. In a stack of conditions, the card scrolled inside the popup's own scroll.

Now the card has no inner scroll area:

  • A short text (up to about five lines) prints in full.
  • A longer one shows its first four lines, fading out, then "Show more" in the theme's brand green. "Show more" opens the full text in place, and "Show less" closes it.
  • The popup itself is the only scroll area. It scrolls only when opened text or a stack of conditions outgrows 60% of the screen, which now applies to single cards too.

The toggle is a native <details>, so it works by keyboard and needs no script in the HTML-string popup. The full text is always in the card; the toggle only removes the fade and height limit.

Long source text (A42 congestion, NDW)

Each image shows the card closed on the left and opened on the right.

Light Dark
Two A42 congestion cards: left shows four fading lines and a green Show more, right shows the full text and Show less, with no inner scroll bar The same two cards in dark mode with the lighter brand green

These images are the branch's card HTML with the branch globals.css in a standalone page, not the live map. The text is the A42 report from the review screenshot. Mobile viewports were not captured.

Verification

  • vitest --project node: 1,362 files, 18,495 tests passed. vitest --project web: 590 files, 5,604 passed.
  • tsc --noEmit -p tsconfig.integrations.json: clean. Biome on changed files: no errors. check-translations: no errors.
  • New test: a short text has no toggle; a long one has the whole text plus the "Show more"/"Show less" toggle.
  • In a browser, neither the closed nor the opened card contains a scrolling element.

Release and upgrade impact

Product impact: ordinary

@Medformatik Medformatik added the integration New or changed provider, source or backend integration label Oct 30, 2026
@Medformatik Medformatik self-assigned this Oct 30, 2026
@Medformatik
Medformatik enabled auto-merge (squash) October 30, 2026 14:45
@Medformatik
Medformatik merged commit 2237230 into main Oct 30, 2026
25 checks passed
@Medformatik
Medformatik deleted the fix/incident-text-show-more branch October 30, 2026 14:57
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

integration New or changed provider, source or backend integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant