extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[AirPods Noise Control] Fix index of AirPods expand toggle

Open dnlfrst opened this issue 1 year ago • 1 comments

Description

On macOS 15 (Sequoia), the extension no longer works, while previous macOS versions had no issues. The internal order of user interface elements in the sound menu changed with macOS 15. While earlier versions of macOS had the expansion toggle placed before the AirPods menu item, the toggle is now placed after the corresponding menu item.

After changing the corresponding index in the extension's AppleScript from i - 1 to i + 1, the extension works as expected. Unfortunately, this fix probably breaks the extensions for other versions of macOS. Is there a different way to expand the detailed menu of the AirPods menu item? Anything through accessibility, maybe? This would also make the extension more future-proof.

This fix may be related to the problem described in #15058.

Screencast

N/A

Checklist

dnlfrst avatar Oct 27 '24 21:10 dnlfrst

Thank you for your contribution! :tada:

🔔 @chrahe @hllvc you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

You can expect an initial review within five business days.

raycastbot avatar Oct 27 '24 21:10 raycastbot

There are other extensions looking up version to do something different, maybe we can do the same here?

https://github.com/raycast/extensions/blob/3ecb72fc6119efab3178943c440364680739ce72/extensions/toggle-desktop-visibility/src/utils/index.ts#L15

Could you add an entry in the CHANGELOG.md file? Here's our guidelines about that: Version History.

pernielsentikaer avatar Nov 04 '24 14:11 pernielsentikaer

That's much better 👏 It seems like the extension is able to crash, can you handle that gracefully?

airpods-noise-control 2024-11-13 at 12 22 13

pernielsentikaer avatar Nov 13 '24 11:11 pernielsentikaer

I did not encounter this issue, yet. Neither was I able to reproduce the error using any of the extension's settings or commands. Do you know how to reproduce the error?

Regardless, I have added graceful handling of AppleScript runtime errors. Hence, the extension should no longer crash.

dnlfrst avatar Nov 13 '24 21:11 dnlfrst

Published to the Raycast Store: https://raycast.com/chrahe/airpods-noise-control

github-actions[bot] avatar Nov 14 '24 09:11 github-actions[bot]

:tada: :tada: :tada:

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

raycastbot avatar Nov 14 '24 09:11 raycastbot