Repository navigation
feat: choose the link card when quoting - #1094
Merged
Merged
Conversation
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.
Summary
The commit and reply composers let you choose which link in your text gets the link card, or turn the card off. The quote composer did not, so a quote always unfurled its first link. Now the quote dialog has the same link-card picker, its preview shows the chosen link, and the posted quote unfurls that link.
This finishes the quote composer parity work started in #1029, which added the preview.
Changes
QuoteComposeruses the shareduseLinkCardandLinkCardPicker, wired the same way as the reply composer: the picker sits after the preview toggle, the label is visually hidden belowsm, andlink_preview_urlis sent only once a choice is made, so the server still defaults to the first link.link_preview_urlvalidation error appears under the body, and discarding the stash also resets the choice, as in the commit composer.CreateCommitRequestalready validates and applieslink_preview_urlfor quotes.KNOWLEDGE_BASE.mdnow lists the quote composer among those with link-card choice.Validation
bun run test:types,bun run test:lint,composer test:lint: pass (pre-existing warnings only).composer test:type-coverage: 100%.tests/Unit/QuoteDraft.test.tsx, written first and seen failing: the picker offers every link in the draft, and alink_preview_urlerror is shown.bun run test:unit: 152 pass, 1 fail. Component suite (tests/draft-images.config.ts): 427 pass, 6 fail. The same tests (tab-title unread caps, background inbox polling, and the draft-images wrapper) fail locally on unmodifiedproductionat fab3279, where CI passed, so they are local environment failures, not regressions. All quote tests pass.github.com/laravel/frameworkupdated the trigger and the preview, and the submitted quote was stored with that link preview. After unfurling, it rendered the GitHub card instead of the first link's.Visual evidence
Local demo data. Before: production quote composer (no picker). After: this branch. Chromium captures at 1440×900, 1366×650, and 390×844 (mobile is viewport emulation).
Choosing the card, previewing, and quoting (1280×800)
MP4
Quote dialog, 1440×900
Quote dialog, 1366×650
Quote dialog, 390×844
Restored draft: the footer wraps instead of overlapping
Posted quote with the chosen card
Device verification
iPhone 18 Pro Simulator, iOS 27.0, Safari. With the keyboard open, Cancel and Quote stay visible. The first tap on the picker dismisses the keyboard, and the next opens the menu clear of the bottom navigation and Safari's toolbar. Choosing the second link updated the trigger and the preview, and the quote submitted from the simulator was stored with that link.
Simulator MP4
Independent review
Independent reviewer: GPT-6.1 Sol (high reasoning, priority tier), read-only, two rounds against base
fab32794.92fad3cf: CODE FAIL, VISUAL FAIL. The only finding was that a restored draft's stash label overlapped Cancel at 390px. Fixed in16db6457by letting the footer wrap.16db6457: CODE: PASS, VISUAL: PASS, no actionable findings. The reviewer independently ran 39 focused tests and checked the footer, discarding the draft, the form values, and the preview at 1440×900, 1366×650, and 390×844 in light and dark.Review limits: the reviewer did not submit a quote, use the simulator, run the full PHP suite, or measure layout shift exhaustively; that evidence comes from the implementer.
Limitations
sm, the trigger shows only the link icon; the chosen link appears in the preview and is announced to screen readers.