Skip to content

Fix drop dates display#2385

Merged
prxt6529 merged 3 commits into
mainfrom
fix-drop-dates-display
May 14, 2026
Merged

Fix drop dates display#2385
prxt6529 merged 3 commits into
mainfrom
fix-drop-dates-display

Conversation

@prxt6529
Copy link
Copy Markdown
Collaborator

@prxt6529 prxt6529 commented May 14, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Image modal now closes only when clicking outside the image’s rendered area (e.g., letterbox), preventing unintended closes when clicking within the visible image.
    • Dates in subscription and upcoming drop views are now rendered explicitly in UTC to avoid local timezone shifts.
  • Tests

    • Added tests covering image modal click behavior and UTC date formatting.

Review Change Stack

prxt6529 added 2 commits May 14, 2026 09:33
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 49e9f5ec-d1f7-4e25-83af-6e73753f1597

📥 Commits

Reviewing files that changed from the base of the PR and between e7f2d19 and b356d42.

📒 Files selected for processing (1)
  • components/drops/view/item/content/media/ImageMediaModal.tsx

📝 Walkthrough

Walkthrough

Adds click-position detection to the image modal so it only closes for letterbox clicks outside the rendered image; removes height constraint when intrinsicHeight is true for images; and changes multiple components/tests to format mint-day dates explicitly in UTC.

Changes

Image Modal Click Detection and Styling

Layer / File(s) Summary
Modal Click Handler and Layout
components/drops/view/item/content/media/ImageMediaModal.tsx
ImageMediaModal adds isPointInsideRenderedImage and handleExpandedImageButtonClick, wraps expanded media in a full-size button, and conditionally calls onClose when clicks occur outside the rendered image bounds.
Image Height Constraint Adjustment
components/drops/view/item/content/media/DropListItemContentMediaImage.tsx
imageClassName now applies tw-max-h-full only when intrinsicHeight is false; intrinsicHeight uses tw-max-w-full without the height constraint.
Modal Interaction and Styling Tests
__tests__/components/DropListItemContentMediaImage.test.tsx
Adds tests that mock image sizing and bounding rects to assert the modal closes on letterbox clicks and remains open for clicks inside the rendered image; adds class assertion for intrinsic-height images.

UTC Date Formatting Consolidation

Layer / File(s) Summary
Component Date Formatting Updates
components/subscriptions-report/SubscriptionsReport.tsx, components/user/subscriptions/MemeSubscriptionRow.tsx
Both components now pass explicit "utc" timezone to formatFullDate when rendering upcoming mint day dates.
UTC Date Formatting Tests
__tests__/components/meme-calendar/meme-calendar.helpers.timezone.test.ts, __tests__/components/user/subscriptions/UserPageSubscriptionsUpcoming.test.tsx
Tests import formatFullDate, add a UTC-preservation test for a Friday mint day in America/Los_Angeles, and assert upcoming subscription rows call formatFullDate(..., "utc").

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • simo6529
  • ragnep

Poem

🐰 I scoped the click to letterbox and frame,

Click inside the art — the modal stays the same.
Dates are UTC, no midnight surprise,
Mint days stable under far-off skies.
🥕✨

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix drop dates display' directly aligns with the core changes: updates to date formatting across drop/subscription components to use explicit UTC timezone handling, ensuring correct date display across different timezones.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-drop-dates-display

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

Signed-off-by: prxt6529 <prxt@6529.io>
@sonarqubecloud
Copy link
Copy Markdown

@prxt6529 prxt6529 merged commit 412ab78 into main May 14, 2026
8 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.

2 participants