Discussion:
[patches] all items are now disabled in insert menu if read only
Scott Kostyshak
2014-02-19 22:02:05 UTC
Permalink
I'm planning to commit these after 2.1 is released. If anyone has
comments or would like to see them in 2.1 let me know.

Scott
Richard Heck
2014-02-19 23:29:30 UTC
Permalink
Post by Scott Kostyshak
I'm planning to commit these after 2.1 is released. If anyone has
comments or would like to see them in 2.1 let me know.
This looks pretty safe to me. I'd have no objection to its going into
2.1.0, but it's Vincent's call.

rh
Jean-Marc Lasgouttes
2014-02-20 09:02:05 UTC
Permalink
Post by Scott Kostyshak
I'm planning to commit these after 2.1 is released. If anyone has
comments or would like to see them in 2.1 let me know.
Concerning menus, the Apple HIG says:

Ensure that a submenu’s title is undimmed even when all its commands are
unavailable. As with menu titles, it’s important for users to be able to
view a submenu’s contents, even if none of them are available in the
current context.

https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Menus/Menus.html#//apple_ref/doc/uid/TP30000356-TP6


I did not look at what other HIGs might say, but in this case it is
clear. And if one wants to disable submenus which contains only disabled
entries, it can be done automatically in the Menus.cpp machinery.

JMarc
Scott Kostyshak
2014-02-21 15:36:51 UTC
Permalink
On Thu, Feb 20, 2014 at 4:02 AM, Jean-Marc Lasgouttes
Post by Scott Kostyshak
I'm planning to commit these after 2.1 is released. If anyone has
comments or would like to see them in 2.1 let me know.
Ensure that a submenu's title is undimmed even when all its commands are
unavailable. As with menu titles, it's important for users to be able to
view a submenu's contents, even if none of them are available in the
current context.
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Menus/Menus.html#//apple_ref/doc/uid/TP30000356-TP6
This has a lot of good info. Thank you for the reference.
I gave a poor description of the patches. They disable the LFUNs and
only affect the menus indirectly. I was motivated by the following:
1. Open help > Introduction (it should be opened as read only).
2. Go to Insert > File > Plain Text and select a file

The file is inserted. This should not happen for read only.
I did not look at what other HIGs might say, but in this case it is clear.
And if one wants to disable submenus which contains only disabled entries,
it can be done automatically in the Menus.cpp machinery.
As for the submenus not being accessible if all of the items are
disabled, attached is a patch.

Scott
Kornel Benko
2014-02-21 15:50:53 UTC
Permalink
Post by Scott Kostyshak
On Thu, Feb 20, 2014 at 4:02 AM, Jean-Marc Lasgouttes
Post by Scott Kostyshak
I'm planning to commit these after 2.1 is released. If anyone has
comments or would like to see them in 2.1 let me know.
Ensure that a submenu's title is undimmed even when all its commands are
unavailable. As with menu titles, it's important for users to be able to
view a submenu's contents, even if none of them are available in the
current context.
I prefer this behaviour too.
Post by Scott Kostyshak
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Menus/Menus.html#//apple_ref/doc/uid/TP30000356-TP6
This has a lot of good info. Thank you for the reference.
I gave a poor description of the patches. They disable the LFUNs and
1. Open help > Introduction (it should be opened as read only).
2. Go to Insert > File > Plain Text and select a file
The file is inserted. This should not happen for read only.
I did not look at what other HIGs might say, but in this case it is clear.
And if one wants to disable submenus which contains only disabled entries,
it can be done automatically in the Menus.cpp machinery.
As for the submenus not being accessible if all of the items are
disabled, attached is a patch.
:(
Post by Scott Kostyshak
Scott
Kornel
Scott Kostyshak
2014-02-21 15:56:19 UTC
Permalink
Post by Kornel Benko
Post by Scott Kostyshak
On Thu, Feb 20, 2014 at 4:02 AM, Jean-Marc Lasgouttes
Post by Scott Kostyshak
I'm planning to commit these after 2.1 is released. If anyone has
comments or would like to see them in 2.1 let me know.
Ensure that a submenu's title is undimmed even when all its commands are
unavailable. As with menu titles, it's important for users to be able to
view a submenu's contents, even if none of them are available in the
current context.
I prefer this behaviour too.
Post by Scott Kostyshak
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Menus/Menus.html#//apple_ref/doc/uid/TP30000356-TP6
This has a lot of good info. Thank you for the reference.
I gave a poor description of the patches. They disable the LFUNs and
1. Open help > Introduction (it should be opened as read only).
2. Go to Insert > File > Plain Text and select a file
The file is inserted. This should not happen for read only.
I did not look at what other HIGs might say, but in this case it is clear.
And if one wants to disable submenus which contains only disabled entries,
it can be done automatically in the Menus.cpp machinery.
As for the submenus not being accessible if all of the items are
disabled, attached is a patch.
:(
I think that I again gave a poor description of the patch (I'm on a
roll here). The patch *enables* expanding of submenus even when all of
the items are disabled. For example, go to Help > Introduction. The
submenu Insert > Special Character now expands, where without the
patch it does not.

Note that this is also consistent with LibreOffice.

Scott
Kornel Benko
2014-02-21 16:04:37 UTC
Permalink
Post by Scott Kostyshak
I think that I again gave a poor description of the patch (I'm on a
roll here). The patch enables expanding of submenus even when all of
the items are disabled. For example, go to Help > Introduction. The
submenu Insert > Special Character now expands, where without the
patch it does not.
Ah, OK.
Post by Scott Kostyshak
Note that this is also consistent with LibreOffice.
Scott
Kornel
Scott Kostyshak
2014-07-28 15:35:17 UTC
Permalink
Post by Scott Kostyshak
On Thu, Feb 20, 2014 at 4:02 AM, Jean-Marc Lasgouttes
Post by Scott Kostyshak
I'm planning to commit these after 2.1 is released. If anyone has
comments or would like to see them in 2.1 let me know.
Ensure that a submenu's title is undimmed even when all its commands are
unavailable. As with menu titles, it's important for users to be able to
view a submenu's contents, even if none of them are available in the
current context.
https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Menus/Menus.html#//apple_ref/doc/uid/TP30000356-TP6
This has a lot of good info. Thank you for the reference.
I gave a poor description of the patches. They disable the LFUNs and
1. Open help > Introduction (it should be opened as read only).
2. Go to Insert > File > Plain Text and select a file
The file is inserted. This should not happen for read only.
I did not look at what other HIGs might say, but in this case it is clear.
And if one wants to disable submenus which contains only disabled entries,
it can be done automatically in the Menus.cpp machinery.
As for the submenus not being accessible if all of the items are
disabled, attached is a patch.
JMarc (don't worry if you can't look at this before you leave on
vacation), I first interpreted your response in this thread as
disagreeing with the patches I proposed. Upon rereading I think there
was a misunderstanding because of poor description on my part. You
actually made the same change I suggested in the first patch in your
commit at ad56bded.

The other patches still apply cleanly. There are three patches from my
first email and one patch based on your suggestion referencing the
Apple HIG (our recent discussion on UI guides is what brought this
thread back in my mind). I reattach all four to this email (but I did
not change anything).

Scott
Jean-Marc Lasgouttes
2014-07-28 15:42:34 UTC
Permalink
Post by Scott Kostyshak
JMarc (don't worry if you can't look at this before you leave on
vacation), I first interpreted your response in this thread as
disagreeing with the patches I proposed. Upon rereading I think there
was a misunderstanding because of poor description on my part. You
actually made the same change I suggested in the first patch in your
commit at ad56bded.
I think we agree indeed.
Post by Scott Kostyshak
The other patches still apply cleanly. There are three patches from my
first email and one patch based on your suggestion referencing the
Apple HIG (our recent discussion on UI guides is what brought this
thread back in my mind). I reattach all four to this email (but I did
not change anything).
I am surprised that you have to lookupthe read-only status for
LFUN_FILE_INSERT_PLAINTEXT. The flags in LyXAction.cpp (in the case
Noop) are enough to indicate that this particular function does not work
in read-only. Instead of fixing it by hand, the global mechanism used
elsewhere should apply here too.

JMarc
Scott Kostyshak
2014-07-28 17:01:54 UTC
Permalink
On Mon, Jul 28, 2014 at 11:42 AM, Jean-Marc Lasgouttes
Post by Jean-Marc Lasgouttes
Post by Scott Kostyshak
JMarc (don't worry if you can't look at this before you leave on
vacation), I first interpreted your response in this thread as
disagreeing with the patches I proposed. Upon rereading I think there
was a misunderstanding because of poor description on my part. You
actually made the same change I suggested in the first patch in your
commit at ad56bded.
I think we agree indeed.
I applied the patches (except the LFUN_FILE_INSERT_PLAINTEXT one) at
d449e7e, 0bf61a4, and 4843618.
Post by Jean-Marc Lasgouttes
Post by Scott Kostyshak
The other patches still apply cleanly. There are three patches from my
first email and one patch based on your suggestion referencing the
Apple HIG (our recent discussion on UI guides is what brought this
thread back in my mind). I reattach all four to this email (but I did
not change anything).
I am surprised that you have to lookupthe read-only status for
LFUN_FILE_INSERT_PLAINTEXT. The flags in LyXAction.cpp (in the case Noop)
are enough to indicate that this particular function does not work in
read-only. Instead of fixing it by hand, the global mechanism used elsewhere
should apply here too.
Good point. I can put this on my todo list to investigate if no one
else gets to it.

Thanks for the comments,

Scott

Loading...