Skip to content

[ROMM-1943] Consistent use of click handlers #1945

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

Merged
merged 1 commit into from
Jun 7, 2025
Merged

[ROMM-1943] Consistent use of click handlers #1945

merged 1 commit into from
Jun 7, 2025

Conversation

gantoine
Copy link
Member

@gantoine gantoine commented Jun 7, 2025

Description
Explain the changes or enhancements you are proposing with this pull request.

For callback functions where we don't pass params, remove the empty () so we can access the $event is needed.

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Screenshots

@gantoine gantoine requested review from Copilot and zurdi15 June 7, 2025 16:11
Copy link

trunk-io bot commented Jun 7, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR aims to standardize event handler bindings by removing unnecessary empty parentheses so that the $event can be accessed when needed. Key changes include:

  • Removing empty parentheses from click and keyup event handlers across various Vue components.
  • Updating a translation key in the EditRom component.
  • Adding a margin class to an element in PlatformInfoDrawer for alignment consistency.

Reviewed Changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
frontend/src/components/common/Game/Dialog/MatchRom.vue Removed empty parentheses from @keyup.enter and @click handlers.
frontend/src/components/common/Game/Dialog/EditRom.vue Updated @keyup.enter and @click bindings; changed translation key from "rom.foldername" to "rom.folder-name" and removed a possibly redundant keyup handler.
frontend/src/components/common/Game/AdminMenu.vue Removed empty parentheses from @click handler.
frontend/src/components/common/Collection/Dialog/CreateCollection.vue Removed empty parentheses from @keyup.enter bindings.
frontend/src/components/Settings/Administration/Users/Dialog/DeleteUser.vue Removed empty parentheses from the @click handler.
frontend/src/components/Settings/Administration/Users/Dialog/CreateUser.vue Removed empty parentheses from the @click handler.
frontend/src/components/Gallery/FabOverlay.vue Removed empty parentheses from the @click handler.
frontend/src/components/Gallery/AppBar/common/SelectingBtn.vue Removed empty parentheses from @click binding.
frontend/src/components/Gallery/AppBar/common/GalleryViewBtn.vue Removed empty parentheses from @click binding.
frontend/src/components/Gallery/AppBar/common/FilterDrawer/FilterUnmatchedBtn.vue Removed empty parentheses from @click binding.
frontend/src/components/Gallery/AppBar/common/FilterDrawer/FilterRaBtn.vue Removed empty parentheses from @click binding.
frontend/src/components/Gallery/AppBar/common/FilterDrawer/FilterPlayablesBtn.vue Removed empty parentheses from @click binding.
frontend/src/components/Gallery/AppBar/common/FilterDrawer/FilterMatchedBtn.vue Removed empty parentheses from @click binding.
frontend/src/components/Gallery/AppBar/common/FilterDrawer/FilterFavouritesBtn.vue Removed empty parentheses from @click binding.
frontend/src/components/Gallery/AppBar/common/FilterDrawer/FilterDuplicatesBtn.vue Removed empty parentheses from @click binding.
frontend/src/components/Gallery/AppBar/common/FilterBtn.vue Removed empty parentheses from @click binding.
frontend/src/components/Gallery/AppBar/Platform/PlatformInfoDrawer.vue Removed empty parentheses from event handlers and added a margin class for alignment.
frontend/src/components/Gallery/AppBar/Platform/FirmwareBtn.vue Removed empty parentheses from @click binding.
frontend/src/components/Gallery/AppBar/Platform/Base.vue Removed empty parentheses from @click binding.
frontend/src/components/Gallery/AppBar/Collection/CollectionInfoDrawer.vue Removed empty parentheses from event handlers and added a margin class for alignment.
Comments suppressed due to low confidence (2)

frontend/src/components/common/Game/Dialog/EditRom.vue:232

  • [nitpick] Verify that the updated translation key 'rom.folder-name' is intentional and consistent with the naming conventions in the translation files.
:label="rom.multi ? t('rom.folder-name') : t('rom.filename')"

frontend/src/components/common/Game/Dialog/EditRom.vue:235

  • Confirm that the removal of the @keyup.enter handler in this input is deliberate and that it won't affect the expected behavior of updating the ROM when the Enter key is pressed.
@keyup.enter="updateRom"

@gantoine gantoine merged commit 087240e into master Jun 7, 2025
9 checks passed
@gantoine gantoine deleted the romm-1943 branch June 7, 2025 21:59
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