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

fix: Select correct Superkey/Macro in Layout Editor #907

Merged

Conversation

lbrooks
Copy link
Contributor

@lbrooks lbrooks commented Oct 11, 2024

Found In: Bazecor v1.5.2
Found With: Virtual Defy Keyboard

In the Layout Editor when a key with a Macro or Superkey assigned is clicked the description below the dropdown is correct, but the selected element in the dropdown is not correct.

Steps to reproduce initial inaccuracy:

  1. Assign a Macro (or Superkey) to a key in the Layout Editor
  2. Click a different category of key functions (eg: Mouse)
  3. Click back to the Macro (or Superkey) category.
  • Expected: The dropdown selects the Macro/Superkey that is applied to the key
  • Result: The dropdown now displays "Select Macro" (or Superkey) rather than the Macro/Superkey set on that key.

Remaining Edge Case

This PR will select the correct value in the dropdown in most scenarios, but there is still one path (that I've found) that displays an incorrect value:

  1. Select a key that does NOT have a Macro/Superkey
  2. Assign a Macro/Superkey
  3. Click another key which does NOT have a Macro/Superkey assigned.
  • Expected: Select Macro/Superkey to be "selected" in the dropdown
  • Error: The Superkey/Macro set on the previous key is still selected.

Maybe related to: radix-ui/primitives#3089

Wrong selection could still occur by the following steps:
1) Select a key that does NOT have a Superkey/Macro
2) Assign a Superkey/Macro
3) Click another key which does NOT have a Superkey/Macro assigned.
Error: The Superkey/Macro set on the previous key is still selected.

Maybe related to: radix-ui/primitives#3089

Signed-off-by: Lawrence Brooks <[email protected]>
@lbrooks lbrooks marked this pull request as ready for review October 11, 2024 16:26
@alexpargon
Copy link
Contributor

Hey there @lbrooks !

I will review it and pilot that edge case with state management to ensure consistent behavior.

Thanks for the fix! ❤️💪🏻

@lbrooks
Copy link
Contributor Author

lbrooks commented Oct 17, 2024

I'm not sure if there's anything for me to address with these failures as they appear to be failures with secrets during the build.

Please let me know if there's anything I need to address.

@alexpargon
Copy link
Contributor

Yes, do not worry about the errors when compiling for windows and MacOS, it´s due to the lack of secrets during the signing phase, so no worries

@alexpargon alexpargon merged commit e42fdac into Dygmalab:development Oct 18, 2024
5 of 8 checks passed
@lbrooks lbrooks deleted the superkey-macro-selected-value branch October 18, 2024 14:14
@lbrooks lbrooks restored the superkey-macro-selected-value branch October 18, 2024 14:15
@lbrooks lbrooks deleted the superkey-macro-selected-value branch October 21, 2024 00:25
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