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

Menu tweaks #224

Merged
merged 54 commits into from
May 4, 2021
Merged

Menu tweaks #224

merged 54 commits into from
May 4, 2021

Conversation

Araxeus
Copy link
Collaborator

@Araxeus Araxeus commented Apr 3, 2021

Follows-up PR #215

commit order below is non-chronological, ordered for readability

  • 2b3a20c :

    • Tray menu doesn't use mainTemplate anymore - added instead just a restart button
      🔽
      That fixes the visual bug that cause desync between checkbox/radio buttons in tray menu and main app menu
      (could be tweaked, but I'm not sure if any other buttons are needed there)
  • 80a7d2c :

    • Remove roles from main menu template (since their original goal was to minimize code, but it ended up being double the length), it also obviously fixes compatibility issues with in-app-menu
  • 5524a14 :

    • Declutter mainTemplate by moving advanced options to dedicated submenu, (also removed advanced options button from plugin submenu, since it already exists in another menu - and isn't directly related to plugins)

  • a194046 .

    • using win.once() instead of win.on in multiple places fixes callbacks being called twice and frees up redundant listeners
  • 2162052 :

    • Fixes bugs with css styling of in-app-menu and made scrollbar thumb gray to be more in theme
  • 28d366a Fix a critical bug ⚠️ :
    it seems there is an unknown bug with in-app-menu causing did-fail-load to be called with error code -3 , its seems to be some kind of false positive (it doesn't actually fail to load anything and also error code -3 means "ABORTED" )

so now it only loads error.html if not in this exact false-positive case (in-app-menu active + error code -3)

When a song started to play, did-fail-load was called - resulting in displaying error.html
I don't understand why it happened it the first place, and how it works. but it's the only thing that fixed it


Sorry that it ended up being a long PR. I tried making it readable.
If needed, I could split it

@Araxeus Araxeus changed the title Menu fixes Menu Fixes: Cleanup trayMenu + delete Roles from mainTemplate + Fix in-app-menu navbar opacity Apr 3, 2021
@Araxeus Araxeus changed the title Menu Fixes: Cleanup trayMenu + delete Roles from mainTemplate + Fix in-app-menu navbar opacity Menu tweaks Apr 3, 2021
@Araxeus Araxeus marked this pull request as draft April 3, 2021 17:13
@Araxeus Araxeus marked this pull request as ready for review April 3, 2021 19:05
@Araxeus Araxeus marked this pull request as draft April 4, 2021 17:12
@Araxeus Araxeus marked this pull request as ready for review April 4, 2021 20:06
@Araxeus Araxeus marked this pull request as draft April 27, 2021 20:31
@Araxeus Araxeus marked this pull request as ready for review April 28, 2021 00:08
Copy link
Owner

@th-ch th-ch left a comment

Choose a reason for hiding this comment

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

Some small nits but otherwise looks good! Removing plugins from the tray menu is a breaking change but it simplifies the code and not sure it was very useful (it's still possible to show the app and the main menu when changing plugins).
Thanks for the PR, feel free to address the comments, otherwise I can merge it and make the changes as a follow up!

Copy link
Owner

@th-ch th-ch left a comment

Choose a reason for hiding this comment

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

Left a few additional comments after some testing, feel free to address them, otherwise I am fine merging as is and making changes as a follow up!

directly preload front-logger
simplify front-logger
@Araxeus
Copy link
Collaborator Author

Araxeus commented May 3, 2021

@th-ch
Thanks for all the feedback !

I just realized this whole front-logger thing fixed the did-fail-load error only because it was throwing that IPC serialize error and then not loading the error page because of it...

There is an unknown bug with in-app-menu causing did-fail-load to be called with error code -3 on song start.
its seems to be some kind of false positive (it doesn't actually fail to load anything and also error code -3 means "ABORTED"? )

ill note again that it happens only in the packaged application

Since I was unable to find the source of the event (anonymous), and it doesn't seem to be an actual error:
changed did-fail-load to only load error.html if not in this exact false-positive case (in-app-menu active + error code -3)

After the last commit, It all works well for me.

Copy link
Owner

@th-ch th-ch left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the contribution, merging! ✅

@th-ch th-ch merged commit 8aeddcf into th-ch:master May 4, 2021
@Araxeus Araxeus deleted the menu-fixes branch May 6, 2021 17:01
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