Skip to content

fix(web): reveal metadata row controls on hover - #6324

Merged
boojack merged 1 commit into
usememos:mainfrom
anandghegde:fix/delete-attachments
Sep 14, 2026
Merged

boojack merged 1 commit into
usememos:mainfrom
anandghegde:fix/delete-attachments

Conversation

@anandghegde

@anandghegde anandghegde commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

The remove button for attachments in the memo editor never shows up on desktop, so it looks like attachments can no longer be removed.

Cause

98d8322 moved the editor rows onto shared helpers in MetadataSection.tsx. Their hover and focus classes are built at runtime by whenEngaged:

const whenEngaged = (value: string) => `md:group-hover/row:${value} md:group-focus-within/row:${value}`;

Tailwind only generates classes it finds written out in the source, so md:group-hover/row:opacity-100 and the related classes are never generated. The built CSS has md:opacity-0 but no group-hover/row or group-focus-within/row rules. The trailing controls (move up/down, remove) stay invisible on hover and on keyboard focus. The same problem affects the relation and location rows, the file download hint, and the detail rail that should fade out on hover.

Fix

Write the class names out in full and remove the helper. No behaviour changes apart from the classes now being generated.

Verification

  • pnpm build: before the fix the CSS had no group-hover/row rules. After it, group-hover/row:opacity-{0,75,100} and group-focus-within/row:opacity-{0,75,100} are all present.
  • Headless Chromium against a local backend and pnpm dev (fresh data dir and dev server for each run). I created a memo with a PDF attachment, opened it with Edit and hovered the attachment row. The computed opacity of the controls was 0 before the fix and 1 after. After clicking remove and then Update, the memo reloads without the attachment.
  • pnpm lint and pnpm test pass (172 files, 1371 tests).

Before (row hovered):
Before

After (row hovered):
After

Fixes #6316

The row helpers built their hover and focus classes with a template
literal, so Tailwind never saw md:group-hover/row:opacity-100 and the
related classes and never generated them. Attachment, relation and
location controls stayed at opacity 0 on desktop, so the remove button
could not be found. Spell the classes out in full.
@anandghegde
anandghegde requested a review from a team as a code owner September 14, 2026 06:22
@coderabbitai

coderabbitai Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 611ddb1c-f3c5-4352-a3c8-cd881c2e20d5

📥 Commits

Reviewing files that changed from the base of the PR and between 2e33e7a and 9d996fd.

📒 Files selected for processing (1)
  • web/src/components/MemoMetadata/MetadataSection.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


Walkthrough

The local whenEngaged helper was removed from MetadataSection.tsx. The metadata row class constants now include complete md:group-hover/row: and md:group-focus-within/row: class names. A comment documents the requirement for literal Tailwind classes. The resulting class strings remain unchanged.

Suggested reviewers: boojack

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 9d996

The metadata controls should regain hover and keyboard-focus visibility without an identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR addresses [#6316]. MetadataSection.tsx now contains literal hover and focus-within Tailwind class names for metadata row controls. This allows Tailwind to generate the CSS that displays attac…
Out of Scope Changes check ✅ Passed The changes stay within the metadata-row visibility fix. The relation, location, download-hint, and detail-rail classes use the same explicit hover and focus treatment and support the same regression …
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Title check ✅ Passed The title clearly identifies the main change: restoring metadata row controls on hover. It is concise and specific.
Description check ✅ Passed The description directly explains the regression, the Tailwind class generation cause, the fix, affected controls, and verification results.

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.

@sjorge

sjorge commented Sep 14, 2026

Copy link
Copy Markdown

This does indeed fix the issue for me

@boojack boojack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@boojack
boojack merged commit a69d286 into usememos:main Sep 14, 2026
3 checks passed
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.

[bug] no longer possible to delete attachments

3 participants