Skip to content

fix(products): follow product open_type strictly on anchor button - #357

Merged
trtajim merged 1 commit into
mainfrom
fix/product-card-open-type
Sep 21, 2026
Merged

trtajim merged 1 commit into
mainfrom
fix/product-card-open-type

Conversation

@trtajim

@trtajim trtajim commented Sep 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Replaces conditional Inertia Link with a standard <a> element in ProductCard.vue.
  • Directly binds :target="product.open_type || '_self'" and :rel="isBlank ? 'noopener noreferrer' : undefined".
  • Respects _self vs _blank target mode unconditionally for both internal and external URLs.

Summary by CodeRabbit

  • Bug Fixes
    • Updated product card actions to consistently use the configured link target.
    • External-link indicators now appear only when links are explicitly set to open in a new tab.
    • Added secure link handling for links opened in new tabs.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: hscstack/platform/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: fae72896-b7f3-447d-8b4a-306385ed865a

📥 Commits

Reviewing files that changed from the base of the PR and between 4a12586 and fd7307e.

📒 Files selected for processing (1)
  • resources/js/components/ProductCard.vue

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


📝 Walkthrough

Walkthrough

ProductCard.vue now renders actions with one anchor. It uses product.open_type for the target, applies secure link attributes for blank targets, and no longer detects external URLs by scheme.

Changes

Product card link handling

Layer / File(s) Summary
Unify product card action links
resources/js/components/ProductCard.vue
The component removes the Inertia Link import and renders one <a> element. The target defaults to _self and uses product.open_type when provided. The blank-target condition controls rel and the displayed icon.

Priority: ⬇️ Low

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

Change: Bug fix

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: the product anchor button now follows product.open_type strictly.
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 0…
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@trtajim
trtajim merged commit e8c7f78 into main Sep 21, 2026
6 checks passed
@trtajim
trtajim deleted the fix/product-card-open-type branch September 21, 2026 16:17
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