Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ユーザー検索結果画面からユーザーページに飛べない問題の改善 #186

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

Futadaruma
Copy link
Contributor

@Futadaruma Futadaruma commented Jul 4, 2024

PR Type

Bug fix


Description

  • ユーザー検索結果画面からユーザーページに飛べない問題を修正
  • router-linkto属性をmember.idからmember.nameに変更

Changes walkthrough 📝

Relevant files
Bug fix
UserListItem.vue
`router-link`の`to`属性を修正                                                                   

src/components/Search/UserListItem.vue

  • router-linkto属性をmember.idからmember.nameに変更
+1/-1     

💡 PR-Agent usage:
Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

@Futadaruma Futadaruma requested a review from Pugma July 4, 2024 06:25
Copy link

github-actions bot commented Jul 4, 2024

PR Reviewer Guide 🔍

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Key issues to review

リンクの変更による影響:
member.idからmember.nameへの変更は意図した動作をしているか確認が必要です。ユーザー名がURLとして適切か、または特殊文字が含まれている場合の扱いを検討する必要があります。

Copy link

github-actions bot commented Jul 4, 2024

PR Code Suggestions ✨

CategorySuggestion                                                                                                                                    Score
Possible issue
Improve URL safety and uniqueness by encoding the user name or using a unique identifier

Ensure that the URL parameter used in the router-link is appropriate for user
identification. If member.name is not unique or could contain special characters that
affect URL behavior, consider using a URL-safe identifier like member.id.

src/components/Search/UserListItem.vue [12]

-<router-link :class="$style.link" :to="`/users/${member.name}`">
+<router-link :class="$style.link" :to="`/users/${encodeURIComponent(member.name)}`">
 
Suggestion importance[1-10]: 9

Why: The suggestion correctly identifies a potential issue with using member.name directly in the URL, which may not be unique or URL-safe. Encoding the user name or using a unique identifier like member.id improves both the safety and reliability of the URL.

9

Copy link
Collaborator

@Pugma Pugma left a comment

Choose a reason for hiding this comment

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

ありがとうございます!!!
okです!

@Futadaruma Futadaruma merged commit 9352cbf into master Jul 4, 2024
9 checks passed
@Futadaruma Futadaruma deleted the fix/SearchListItem branch July 4, 2024 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants