feat(DescriptionList): render description as link via item.to - #478
Draft
IgorShevchik wants to merge 3 commits into
Draft
feat(DescriptionList): render description as link via item.to#478IgorShevchik wants to merge 3 commits into
IgorShevchik wants to merge 3 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Revives
feat/description-list-link—ca8b44a1and90457795, 2026-05-07. The original branch is untouched.Why this exists
mainwas re-rooted atb55bd3e7(2026-07-10) and now holds 173 commits. The old feature branches share no merge base with it, so a PR opened straight fromfeat/description-list-linkreports over 1200 files changed and reads as a PR that deletes most of the repository. Both authored commits are cherry-picked onto currentmaininstead; they applied without conflict.Type of change
Description
An item may render its description as a link:
item.to(anythingB24Linkaccepts) plusitem.target. Withouttothe description renders exactly as before, so nothing existing moves — the whole change is onev-if/v-elseinside the existingdescriptionslot.tois documented as ignored whenslotis 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
tois set,hrefcorrect, plain text otherwise, andtargetforwarded. Mutation-checked rather than assumed: revertingDescriptionList.vuewith 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, sodocs:generatefailed 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-startedandhttps://bitrix24.com, matching what every other example with an internaltodoes.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
Generated by Claude Code