Skip to content

Fix toggle menus to adhere to HIG, #3116 #3980

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 4 commits into from
Oct 18, 2022
Merged

Fix toggle menus to adhere to HIG, #3116 #3980

merged 4 commits into from
Oct 18, 2022

Conversation

low-batt
Copy link
Contributor

This commit will change these toggle menus to use "Hide" in their title instead of "Show" when selecting the menu item hides the panel:

  • Show Chapters Panel
  • Show Playlist Panel
  • Show Quick Settings Panel

This commit adds text that will require localization.

This fix only corrects one part of the reported issue. The behavior of buttons still needs to be updated to adhere to the HIG.


Description:
This PR replaces the original PR, removing localization files.

This commit will change these toggle menus to use "Hide" in their
title instead of "Show" when selecting the menu item hides the panel:
- Show Chapters Panel
- Show Playlist Panel
- Show Quick Settings Panel

This commit adds text that will require localization.

This fix only corrects one part of the reported issue. The behavior of
buttons still needs to be updated to adhere to the HIG.
Copy link
Member

@uiryuu uiryuu left a comment

Choose a reason for hiding this comment

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

The inconsistency annoys me. Currently there are Show Playlist Panel and Show Chapter Panel in the playback menu, but in it is Show Quick Settings Panel in Video, Audio, and Subtitle menu.

We should rename them into Show Video/Audio/Subtitle Panel and Hide Quick Settings Panel correspondingly.

@low-batt
Copy link
Contributor Author

The inconsistency in menu item names is due to the inconsistency in the menu structure. Using Video, Audio and Subtitles in the item names seems like duplicate text. Menu items according to the HIG are supposed to use "a condensed style". Of course you can argue that we are already violating that with items such as "Audio filters...". I can go ahead and make this change and we can see how it looks.

At the moment I am distracted by the fact that this fix is not working. MainWindowController has changed. The sideBarStatus used to indicate which panel was set, .settings or .playlist. That is no longer working. It is set to .settings when the playlist/chapter panel is being displayed. So the menus are malfunctioning.

Was hoping to post an additional commit that as requested adds the english translations. But I need to investigate why the sideBarStatus seems to be incorrect. A quick fix did not work. Need to dig into what happened in the MainWindowController code.

Tomorrow busy. Might be able to post an update Saturday.

@uiryuu
Copy link
Member

uiryuu commented Oct 14, 2022

Using Video, Audio and Subtitles in the item names seems like duplicate text.

Sorry I didn't make it clear. I meant we should rename them into

  • Show Audio Panel
  • Show Video Panel
  • Show Subtitle Panel
    in the corresponding menu

@uiryuu
Copy link
Member

uiryuu commented Oct 14, 2022

The sideBarStatus used to indicate which panel was set, .settings or .playlist. That is no longer working.

@low-batt This is caused by 60b944f when copy-pasting the reused code. I've pushed the fix, please pull and try.

@low-batt
Copy link
Contributor Author

I picked up the commit and confirmed that fixes the problem.
I need to rename the menu items. Tied up today. I should be able to get that done tomorrow.

This commit will change these toggle menus to use "Hide" in their
title instead of "Show" when selecting the menu item hides the panel:
- Show Chapters Panel
- Show Playlist Panel
- Show Quick Settings Panel

In addition the Show Quick Settings Panel menu item in the Video,
Audio and Subtitles menu have been renamed to reflect the type of
settings:
- Show Video Panel
- Show Audio Panel
- Show Subtitles Panel

This commit adds text that will require localization.

This fix only corrects one part of the reported issue. The behavior of
buttons still needs to be updated to adhere to the HIG.
@low-batt
Copy link
Contributor Author

I've renamed the menu items. This does create a slight inconsistency with the buttons used in the OSC:

issue-3116

Should Quick Settings be renamed to Video, audio and subtitles?

@saagarjha
Copy link
Member

What’s the inconsistency?

@low-batt
Copy link
Contributor Author

I remembered this morning that I forgot to update MainMenu.xib. Even though the text in the xib is not used it should be updated to not confuse developers. So that needs to be changed before this PR is ready to be merged.

On the question about the button inconsistency...

Currently the menu items are:

  • Show Quick Settings Panel
  • Show Chapters Panel
  • Show Playlist Panel

And the OSC buttons are:

  • Quick Settings
  • Playlist and chapters

So it is clear that the Quick Settings button corresponds to Show Quick Settings Panel.

By renaming the menu items to make them more consistent:

  • Show Video Panel
  • Show Audio Panel
  • Show Subtitles Panel
  • Show Chapters Panel
  • Show Playlist Panel

We have eliminated the term "Quick Settings" and broken the correspondence with the OSC button.

If we want to proceed with the change to the menu items then I think the buttons should be renamed as well:

  • Video, audio and subtitles
  • Playlist and chapters

Should I go ahead and change the button name as well?

@uiryuu
Copy link
Member

uiryuu commented Oct 17, 2022

Should Quick Settings be renamed to Video, audio and subtitles?

No, "Quick Settings" means the video panel + audio panel + subtitle panel.

@uiryuu uiryuu self-requested a review October 17, 2022 01:10
@uiryuu uiryuu self-requested a review October 17, 2022 01:11
@low-batt
Copy link
Contributor Author

How does the user know what "Quick Settings" means now that we removed that text from the menus? The panel itself has no such label. That was my worry.

Should I also update the menu item text in MainMenu.xib? It gets overwritten, but if I leave it set to "Show Quick Settings Panel" it could confuse a developer.

@uiryuu
Copy link
Member

uiryuu commented Oct 17, 2022

How does the user know what "Quick Settings" means now that we removed that text from the menus? The panel itself has no such label. That was my worry.

I think this is a valid concern, but since we have used "Quick Settings" for years in IINA, removing that will also surprise some of the users. I think we can discuss this in another issue, let's get this merged first!

Should I also update the menu item text in MainMenu.xib? It gets overwritten, but if I leave it set to "Show Quick Settings Panel" it could confuse a developer.

Yes please do that. That should change the corresponding text in Base.lproj.

This commit will change these toggle menus to use "Hide" in their
title instead of "Show" when selecting the menu item hides the panel:
- Show Chapters Panel
- Show Playlist Panel
- Show Quick Settings Panel

In addition the Show Quick Settings Panel menu item in the Video,
Audio and Subtitles menu have been renamed to reflect the type of
settings:
- Show Video Panel
- Show Audio Panel
- Show Subtitles Panel

This commit adds text that will require localization.

This fix only corrects one part of the reported issue. The behavior of
buttons still needs to be updated to adhere to the HIG.
@low-batt
Copy link
Contributor Author

I've pushed a commit that updated the menu item text in MainMenu.xib and en.lproj/MainMenu.strings. Of course that text is overwritten by MenuController to support the show/hide toggle.

Surprised that the toggle concept is not directly supported by the framewor/XIB.. If there is a way I could not find it. I only found packages from people that created components that were layered on top of the framework to encapsulate the toggle concept.

@uiryuu uiryuu merged commit ad3d5ab into develop Oct 18, 2022
@uiryuu uiryuu deleted the fix-3116 branch October 18, 2022 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
3 participants