-
Notifications
You must be signed in to change notification settings - Fork 51
Fix category switch to clear search #300
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
base: master
Are you sure you want to change the base?
Conversation
Related to #136 Clear the search when switching categories in the emoji picker. Generated with copilot, need to test locally and review test more thoroughly, make sure it works and verifies the fix. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/serebrov/emoji-mart-vue/issues/136?shareId=XXXX-XXXX-XXXX-XXXX).
|
/gemini summary |
Summary of ChangesThis pull request addresses issue #136 by clearing the search input field when the user switches between emoji categories in the emoji picker. This ensures that the category switch works as expected. The changes include a new test case to verify this behavior and a modification to the Highlights
Changelog
Activity
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request addresses issue #136 by clearing the search input when switching categories in the emoji picker. The changes include a new test case and a modification to the onAnchorClick
method in the Picker.vue
component. Overall, the changes seem reasonable and address the issue effectively.
Summary of Findings
- Test Coverage: The new test case added in
spec/picker-spec.js
effectively verifies the fix. It simulates a search, switches categories, and asserts that the search input is cleared. However, more test cases covering different scenarios could be added to improve test coverage. - Code Clarity: The comment added in
Picker.vue
explains the purpose of clearing the search input. However, the comment could be improved by providing more context on why the category switch doesn't work without clearing the search.
Merge Readiness
The pull request appears to address the issue effectively and includes a test case to verify the fix. However, consider improving the code comment in Picker.vue
for better clarity. I am unable to directly approve the pull request, and other reviewers should review and approve this code before merging.
// Clear the search when switching categories | ||
// otherwise categories switch does not work. | ||
// See #136. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment explains the purpose of this code, but it could be more descriptive. Consider adding more context about why the category switch doesn't work without clearing the search. For example, does the search filter interfere with the category display logic?
// Clear the search when switching categories.
// The search filter interferes with the category display logic,
// preventing the correct emojis from being displayed after switching.
// See #136.
Related to #136
Clear the search when switching categories in the emoji picker.
Generated with copilot, need to test locally and review test more thoroughly, make sure it works and verifies the fix.
For more details, open the Copilot Workspace session.