-
-
Notifications
You must be signed in to change notification settings - Fork 150
Conversation
source belongs in repos, build data belongs in releases, and never the two shall meet except in dev repos and build servers. :-) (at least, that's my personal take on it) code changes look good, although i don't know where the duplicate checkbox toggling thing is. i don't know anything about the menu stuff actually, don't use it in my own instance at all.. but it looks good at a glance to me |
@ericblade That was the duplicate checkbox |
Yes, the checkbox toggled twice would explain #116. I would love to see your changes merged, they are looking great. |
I see where you removed one, I was just curious where the other one is, since you said it was getting triggered twice, and that's not in the changelog, since you didn't touch it :-)
a repo might collect many changes before a release is made... Above, I was addressing your concern about the src not being in the release, and the lib not being in the src, which is imo, something that should never occur. A repo collecting changes before a release is highly dependent on the maintainers, though. I personally advocate for an automatic release generator that will always package up master branch whenever there's a change and make a release. A lot of people haven't got to setting that sort of thing up though. I haven't even got it close to working the way I'd like it to, on even any of my bigger repos. |
Anyway! LGTM, also 👍 |
Hello everybody. Thanks guys for always being on the lookout for updates and bugs from the library. I haven't really had time to publish the 3.2.6 changes to npm. Thanks again for your support. |
@AlexTorresSk |
@AlexTorresSk I ended up fixing more stuff:
|
@ericblade checkbox + radio checked status are updated when
So Source:https://github.com/electron/electron/blob/master/lib/browser/api/menu-item.ts#L47-L52 |
I'll start with saying I love the idea of this lib, but I faced some problems while using it, that I fixed in my program awhile ago
But I decided I should probably also share some fixes on the original source.
The Initial Problems:
.menubar-menu-container
CSS propertyoverflow-y
wasn't set tovisible
)checkbox
looked like it didn't do anything (it was settingitem.checked = !item.checked
twice)titlebar.updateMenu(null || undefined)
throws an error but works (dispose of current menu)The Fixes :
9dc885f
Set menu-container internal css to
overflow-y: visible;
. fix Submenu appears with a scrollbar #1245e17933
Fixes checkbox's being triggered twice. fix Checkmark menu items do not work. #116 (First trigger is in electron/menu-item.ts)
a7cfa0a / 918e8e6
inherit
closeSubmenu()
inSubmenu
class allows submenus to close when their content is clickedThat fix items in submenu's not closing on click
da8999c
Following the last change, submenu will close only if item type isn't
checkbox
orradio
which allows them to work as before76b0726
Fixes menu roles by emulating the accelerator shortcut buttonDown when menuitem is clicked. fix menu roles not working (electron 11.2.3) #133
abit of a hacky way but I think its way better than the ipc method that didn't even work
e4a5df1
Dynamically visually update radio button groups by passing menuContainer to
CETMenuItem
and updating all radio buttons in the menuContainer whenCETMenuItem.click()
is called andtype === radio
0e61412
if
menu
intitlebar.updateMenu(menu)
isnull || undefined
, dispose of menu and exit function to avoid errorsWould love feedback on this if there is any :)
Click to view sample menu template for testing
Also, why is this git repo not actually the same version as the npm package? (3.2.5 vs 3.2.6)
It also has an src folder instead of lib, which means that when cloning the repo you don't have access to all files
and running
dev
will result in an error because oflib
folder missing which is abit weird 😅