Repository navigation
fix(web): reveal metadata row controls on hover - #6324
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe local Suggested reviewers: Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The metadata controls should regain hover and keyboard-focus visibility without an identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
|
This does indeed fix the issue for me |
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 bywhenEngaged:Tailwind only generates classes it finds written out in the source, so
md:group-hover/row:opacity-100and the related classes are never generated. The built CSS hasmd:opacity-0but nogroup-hover/roworgroup-focus-within/rowrules. 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 nogroup-hover/rowrules. After it,group-hover/row:opacity-{0,75,100}andgroup-focus-within/row:opacity-{0,75,100}are all present.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 was0before the fix and1after. After clicking remove and then Update, the memo reloads without the attachment.pnpm lintandpnpm testpass (172 files, 1371 tests).Before (row hovered):

After (row hovered):

Fixes #6316