How to hide menu File and Help menu options

Hello I’m trying to hide some menu options by using the PostMessage API, however nothing seems to work.

I’m sending these messages right after receving the “App_LoadingStatus” “Document_Loaded” feedback:
{“MessageId”:“Hide_Menu_Item”,“SendTime”:1677600490227,“Values”:{“id”:“help”}}
{“MessageId”:“Hide_Menu_Item”,“SendTime”:1677600490227,“Values”:{“id”:“file”}}

Also I’m trying to disable the Download option by setting the “CheckFileInfo” properties “HideExportOption” and “DisableExport” to true, but the option to Download as is still there on the menu.
I successfully hid the Print and Save options through the “CheckFileInfo” properties.

Looking forward to hear from you.

Nobody can help here?

After some testing I found that it has to do with the type of View.
In mode “Compact” these functions work since the element <ul id="main-menu"> (which is the one where the function searches elements) is populated with childs.
However in mode “Tabbed” the element <ul id="main-menu"> is empty; the one populated with childs is <div class="notebookbar-tabs-container">.

This is definitely a bug since items can be hidden in “Compact” mode, but not in “Tabbed”.

I want also to add that an optimal way of handling UI customization would be through the “CheckFileInfo” response properties, as it is for Save and Print options.
This way we can have the ability to customize the UI according to the users’ capabilities on our hosting platform (ex. I might want to display an user just the Review controls and nothing else, since it has the role “Reviewer” on my hosting platform).