Skip to content

fix: add open-in-new-tab post action#92

Open
AlejandroAkbal wants to merge 1 commit intomainfrom
auto-triage/607-new-tab-for-every-photo
Open

fix: add open-in-new-tab post action#92
AlejandroAkbal wants to merge 1 commit intomainfrom
auto-triage/607-new-tab-for-every-photo

Conversation

@AlejandroAkbal
Copy link
Member

@AlejandroAkbal AlejandroAkbal commented Mar 13, 2026

Summary

Validation

  • pnpm install
  • pnpm test -- test/pages/posts.test.ts ⚠️ fails because @nuxt/test-utils is not installed in this repo's package manifest
  • pnpm build ⚠️ fails on existing missing file assets/lib/rule-34-shared-resources/src/util/BooruUtils imported by pages/premium/additional-boorus.vue

Summary by CodeRabbit

  • New Features

    • Added an external link button to open media files in a new tab.
  • Tests

    • Added test coverage for the media open-in-new-tab functionality.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b1d46320-b98f-4410-86d2-5cc4e80fc527

📥 Commits

Reviewing files that changed from the base of the PR and between eeee500 and ab7f0b3.

📒 Files selected for processing (2)
  • components/pages/posts/post/PostComponent.vue
  • test/pages/posts.test.ts

Walkthrough

The PR adds an external link button to the PostComponent that enables users to open media files in a new tab using the ArrowTopRightOnSquareIcon, with corresponding test coverage validating the link's href and target attributes.

Changes

Cohort / File(s) Summary
External Link Button Feature
components/pages/posts/post/PostComponent.vue
Added import of ArrowTopRightOnSquareIcon and implemented a new NuxtLink button for opening media in a new tab with target="_blank" and rel="noopener noreferrer". Positioned adjacent to existing PostDownload action with conditional rendering based on mediaFile presence.
Test Coverage
test/pages/posts.test.ts
Added test assertions validating the new external link element, verifying href matches post's low_res_file.url and target attribute equals "_blank".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding an open-in-new-tab action for posts, which aligns with the PR's primary objective of adding a per-post action that opens media in a new browser tab.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch auto-triage/607-new-tab-for-every-photo
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch auto-triage/607-new-tab-for-every-photo
📝 Coding Plan
  • Generate coding plan for human review comments

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