Skip to content

fix(react): polish the link editor popover - #545

Merged
ocavue merged 4 commits into
masterfrom
link-editor-polish
Sep 10, 2026
Merged

fix(react): polish the link editor popover#545
ocavue merged 4 commits into
masterfrom
link-editor-polish

Conversation

@ocavue

@ocavue ocavue commented Sep 10, 2026

Copy link
Copy Markdown
Member

The link editor now opens on the Link field (selected when editing an existing link), only offers Remove link for an existing link, right-aligns Save, and disables it until both fields are filled instead of relying on the native required bubble. Inputs get a visible resting border plus a soft focus ring through the new --meowdown-input-border / --meowdown-focus-ring variables, and the buttons get hover, active, and focus-visible states.

Before After
Create from a selection (default theme) Before: create link, default theme After: create link, default theme
Create from a selection (host theme, URL typed) Before: create link, host theme After: create link with URL typed, host theme
Edit an existing link (host theme) Before: edit link, host theme After: edit link, host theme

Summary by CodeRabbit

  • Bug Fixes

    • Link editing now places focus on and selects the destination field when opened.
    • Saving remains unavailable until both link text and destination are provided.
    • The “Remove link” action is shown only when editing an existing link.
  • Style

    • Updated link form fields, buttons, focus indicators, spacing, hover states, and reduced-motion behavior.
    • Added themeable colors for input borders and focus rings.

@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
meowdown Ready Ready Preview Sep 10, 2026 6:43am UTC

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 5baf6fbb-9c27-47b2-9a97-ea3bd7d73625

📥 Commits

Reviewing files that changed from the base of the PR and between 9d2f5af and 8a0d7ea.

📒 Files selected for processing (5)
  • packages/core/src/style.css
  • packages/react/src/components/link-menu.module.css
  • packages/react/src/components/link-menu.module.d.css.ts
  • packages/react/src/components/link-menu.test.tsx
  • packages/react/src/components/link-menu.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The link menu adds themeable input tokens, revised form and button styling, destination-input focus behavior, guarded save validation, conditional link removal, and tests for keyboard-driven creation and editing.

Changes

Link menu updates

Layer / File(s) Summary
Form styling and theme tokens
packages/core/src/style.css, packages/react/src/components/link-menu.module.css, packages/react/src/components/link-menu.module.d.css.ts
The theme defines input border and focus-ring tokens. The link menu updates input, label, action, and button styles, including the new SaveButton key.
Link form focus and save behavior
packages/react/src/components/link-menu.tsx
The form focuses and selects the destination input. Save requires non-empty trimmed text and destination values, and Remove link is only available when editing an existing link.
Keyboard interaction tests
packages/react/src/components/link-menu.test.tsx
Tests cover link creation after Mod-k, disabled Save behavior, destination replacement, and destination-input focus.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: maccman

Merge Risk: ⚪ Minimal · up to 8a0d7

The link editor now focuses the URL field, prevents incomplete saves, and hides removal for new links, with interaction coverage for these flows. No actionable merge-blocking risk remains.

🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: polishing the React link editor popover. It matches the behavior and styling updates in the pull request.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch link-editor-polish

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/core/src/style.css

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

packages/react/src/components/link-menu.module.css

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

packages/react/src/components/link-menu.module.d.css.ts

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

  • 2 others

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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@meowdown/core@545
npm i https://pkg.pr.new/@meowdown/markdown@545
npm i https://pkg.pr.new/@meowdown/react@545

commit: 8a0d7ea

@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 94.01% 5117 / 5443
🔵 Statements 91.76% 5782 / 6301
🔵 Functions 91.79% 1219 / 1328
🔵 Branches 87.63% 3742 / 4270
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/style.css 0% 0% 0% 0%
packages/react/src/components/link-menu.module.css 0% 0% 0% 0%
packages/react/src/components/link-menu.module.d.css.ts 0% 0% 0% 0%
packages/react/src/components/link-menu.tsx 91.21% 90.82% 92% 93.79% 81, 157-159, 215, 222, 413, 444-445, 450, 472, 485
Generated in workflow #2139 for commit 8a0d7ea by the Vitest Coverage Report Action

@ocavue
ocavue marked this pull request as ready for review September 10, 2026 13:42
@ocavue
ocavue merged commit db472c1 into master Sep 10, 2026
14 checks passed
@ocavue
ocavue deleted the link-editor-polish branch September 10, 2026 13:54
@ocavuebot ocavuebot mentioned this pull request Sep 10, 2026
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