online
online copied to clipboard
Replace all menubartoolitems with customtoolitems
This is an Easy Hack. Potential mentors: @eszkadev
Detailed description and rationale
There were in the past initial approach to share code between menubar and notebookbar by using (big)menubartoolitem
element in the notebookbar JSON. Now we have better widget for that: (big)customtoolitem
that will not use Menubar code at all so reduces external dependencies for us (to smartmenus library).
Code pointers
- use
git grep menubartoolitem
command to identify existing items - we want to move implementation of command/action from menubar (https://github.com/CollaboraOnline/online/blob/master/browser/src/control/Control.Menubar.js#L1841) to
dispatch
function https://github.com/CollaboraOnline/online/blob/master/browser/src/control/Toolbar.js#L945 -
customtoolitem
runscommand
usingmap.dispatch(command)
function where we need to put command implementation - adjust Menubar code to also use
map.dispatch(command)
for item you moved - JSON with notebookbar description is in
https://github.com/CollaboraOnline/online/blob/master/browser/src/control/Control.NotebookbarWriter.js
for Writer and similar files for other apps
hello could i be assigned to work on this?
hi, @adighiero1 sure
hi, @adighiero1 how it goes? :) Do you have some questions / progress to share?
Hi @eszkadev. I've been sick. I should have an update by monday.
@adighiero1 no problem, just checking if you are still interested in this issue :) All the needed information is in the description of this bug I think (code pointers)