Skip to content

fix: add min-width to LinkInput fallback for usable link editing#1995

Open
Dikshant0Git wants to merge 2 commits into
TryGhost:mainfrom
Dikshant0Git:fix/feature-image-caption-search-links
Open

fix: add min-width to LinkInput fallback for usable link editing#1995
Dikshant0Git wants to merge 2 commits into
TryGhost:mainfrom
Dikshant0Git:fix/feature-image-caption-search-links

Conversation

@Dikshant0Git

@Dikshant0Git Dikshant0Git commented Jun 18, 2026

Copy link
Copy Markdown

The LinkInput component is the fallback used when cardConfig.searchLinks is unavailable (e.g., feature image caption editor). Without a min-width, it shrinks to content size and becomes unusably small.

Adding min-w-[240px] ensures the link input is always wide enough to comfortably view and edit URLs, even in contexts where the full LinkInputWithSearch is not available.

refs TryGhost/Ghost#28359

Dikshant0Git and others added 2 commits June 18, 2026 21:25
The LinkInput component is the fallback used when cardConfig.searchLinks
is unavailable (e.g., feature image caption editor). Without a min-width,
it shrinks to content size and becomes unusably small.

Adding min-w-[240px] ensures the link input is always wide enough to
comfortably view and edit URLs, even in contexts where the full
LinkInputWithSearch is not available.

refs TryGhost/Ghost#22067
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The LinkInput component's outer container div has a min-w-[240px] Tailwind utility class added to its className. No other structural, behavioral, or API changes are made.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a minimum width to the LinkInput component as a fallback fix.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description clearly explains the problem (LinkInput shrinking to content size) and the solution (adding min-w-[240px]), directly relating to the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant