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

UI: Make multiple item selection work on macOS #378

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

twobiers
Copy link
Contributor

The Feature to select multiple tags in the UI (#216) does not work properly on macOS. The problem is that on MacOS, the Ctrl key is typically used in conjunction with other keys, such as the Cmd key, to perform system-level functions. As a result, the Ctrl key is not always recognized as a modifier key in Vue.js applications.

This change introduces the usage of the mod key as a fallback, as there is currently no nice way to select between Ctrl/Mod based on the platform. See vuejs/vue#4843 for discussion.

@axllent
Copy link
Owner

axllent commented Oct 24, 2024

Thanks @twobiers, I wasn't aware this did not work on macOS. Could you please explain to me why the @contextmenu.prevent is needed though (ie: what happens if this is not included)?

@twobiers
Copy link
Contributor Author

twobiers commented Oct 24, 2024

@axllent By default on macos a Ctrl+Click opens the contextmenu. Basically I tried to enable both key combinations so it might work on a different version of MacOS. But I think technically it is not necessary if only Cmd+Click should be supported on macOS. This is btw also the default key combination to select multiple files, so it should feel natural.

I forgot to update the docs accordingly, will do that shortly.

@twobiers
Copy link
Contributor Author

I removed @contextmenu.prevent. It doesn't bring anything to the table besides not displaying the contextmenu if you by accident hit Ctrl+Click.

@axllent axllent changed the base branch from develop to feature/multi-select-macos October 24, 2024 09:14
@axllent
Copy link
Owner

axllent commented Oct 24, 2024

Right - I thought that may be the case. Thanks for removing it as I'd really prefer not to disable native browser functionality (ie: right-mouse clicking) on Windows and Linux just because Mac works differently ;-)

I have one more request while you're at it please: You have updated the multi-tag select but not the multi-message select. I assume that has exactly the same issue on MacOS? Please see server/ui-src/components/ListMessages.vue. Assuming I'm commect, would you mind please updating that one too? Thank you.

@twobiers
Copy link
Contributor Author

Yes, you're correct, the same issue under macOS, good catch. Updated 🚀

@twobiers twobiers changed the title UI: Make multiple tag selection work on macOS UI: Make multiple item selection work on macOS Oct 24, 2024
@axllent axllent merged commit 324a0ac into axllent:feature/multi-select-macos Oct 24, 2024
3 checks passed
@axllent
Copy link
Owner

axllent commented Oct 24, 2024

Thank you very much (also for the website documentation update). This will be released shortly in a new version ❤️

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 21, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [axllent/mailpit](https://github.com/axllent/mailpit) | minor | `v1.20.7` -> `v1.21.4` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>axllent/mailpit (axllent/mailpit)</summary>

### [`v1.21.4`](https://github.com/axllent/mailpit/blob/HEAD/CHANGELOG.md#v1214)

[Compare Source](axllent/mailpit@v1.21.3...v1.21.4)

##### Bugfix

-   Fix external CSS stylesheet loading in HTML preview ([#&#8203;388](axllent/mailpit#388))

### [`v1.21.3`](https://github.com/axllent/mailpit/blob/HEAD/CHANGELOG.md#v1213)

[Compare Source](axllent/mailpit@v1.21.2...v1.21.3)

##### Chore

-   Update Go dependencies
-   Minor UI tweaks
-   Mute Dart Sass deprecation notices
-   Update node dependencies
-   Upgrade Alpine packages on Docker build
-   Add swagger examples & API code restructure

### [`v1.21.2`](https://github.com/axllent/mailpit/blob/HEAD/CHANGELOG.md#v1212)

[Compare Source](axllent/mailpit@v1.21.1...v1.21.2)

##### Feature

-   Add additional ignored flags to sendmail ([#&#8203;384](axllent/mailpit#384))

##### Chore

-   Remove legacy Tags column from message DB table
-   Update Go dependencies
-   Update node dependencies

##### Fix

-   Fix browser notification request on Edge ([#&#8203;89](axllent/mailpit#89))

### [`v1.21.1`](https://github.com/axllent/mailpit/blob/HEAD/CHANGELOG.md#v1211)

[Compare Source](axllent/mailpit@v1.21.0...v1.21.1)

##### Feature

-   Add ability to search by size smaller or larger than a value (eg: `larger:1M` / `smaller:2.5M`)
-   Add ability to search for messages containing inline images (`has:inline`)

##### Chore

-   Update Go dependencies
-   Separate attachments and inline images in download nav and badges ([#&#8203;379](axllent/mailpit#379))

### [`v1.21.0`](https://github.com/axllent/mailpit/blob/HEAD/CHANGELOG.md#v1210)

[Compare Source](axllent/mailpit@v1.20.7...v1.21.0)

##### Feature

-   Experimental Unix socket support for HTTPD & SMTPD ([#&#8203;373](axllent/mailpit#373))

##### Fix

-   Allow multiple item selection on macOS with Cmd-click  ([#&#8203;378](axllent/mailpit#378))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
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