Skip to content

feat(DescriptionList): render description as link via item.to - #478

Draft
IgorShevchik wants to merge 3 commits into
mainfrom
revive/description-list-link
Draft

feat(DescriptionList): render description as link via item.to#478
IgorShevchik wants to merge 3 commits into
mainfrom
revive/description-list-link

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Frozen — draft on purpose. Opened to preserve work that was stranded on an old branch, not to land it. Mark it ready when it is wanted.

Linked issue

Revives feat/description-list-linkca8b44a1 and 90457795, 2026-05-07. The original branch is untouched.

Why this exists

main was re-rooted at b55bd3e7 (2026-07-10) and now holds 173 commits. The old feature branches share no merge base with it, so a PR opened straight from feat/description-list-link reports over 1200 files changed and reads as a PR that deletes most of the repository. Both authored commits are cherry-picked onto current main instead; they applied without conflict.

Type of change

  • New feature (a non-breaking change that adds functionality)

Description

An item may render its description as a link: item.to (anything B24Link accepts) plus item.target. Without to the description renders exactly as before, so nothing existing moves — the whole change is one v-if/v-else inside the existing description slot.

to is documented as ignored when slot is set, since the consumer is rendering the description themselves.

Two things added on top of the May commits

Tests. The branch shipped none for the feature. Added two render cases and two behaviour tests — link only when to is set, href correct, plain text otherwise, and target forwarded. Mutation-checked rather than assumed: reverting DescriptionList.vue with the tests kept turns all four red, plus both new snapshots.

A prerender fix. The May example pointed at /users/owner, a route that has never existed here. Today's docs crawler follows in-example links, so docs:generate failed with [404] Page not found: /users/owner, linked from the DescriptionList page. That is not a flaw in the feature — it is an example written before the crawler behaved this way. The example now links to /docs/getting-started and https://bitrix24.com, matching what every other example with an internal to does.

Verification

Gate with CI=true: dev:prepare · lint · typecheck · test (7136 passed, 6 skipped, 310 files) · build · docs:generate (1262 routes, green after the example fix).

Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Generated by Claude Code

claude added 3 commits August 24, 2026 04:43
Add optional 'to' (and 'target') fields to DescriptionListItem so
consumers can turn a value into a B24Link without registering a custom
slot. When 'slot' is set on an item the link wrapping is skipped, so
existing custom-rendered items keep their previous behaviour.

https://claude.ai/code/session_013gYN6XWQ18LRJdDsatDpf7
Two render cases and two behaviour tests for `item.to` / `item.target`. Each
fails against the pre-feature component — verified by reverting DescriptionList.vue
with the tests kept: all four go red, plus the two render snapshots.
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