online icon indicating copy to clipboard operation
online copied to clipboard

Replace all menubartoolitems with customtoolitems

Open eszkadev opened this issue 1 year ago • 5 comments

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 runs command using map.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

eszkadev avatar Jan 15 '24 18:01 eszkadev

hello could i be assigned to work on this?

adighiero1 avatar Feb 09 '24 14:02 adighiero1

hi, @adighiero1 sure

eszkadev avatar Feb 09 '24 15:02 eszkadev

hi, @adighiero1 how it goes? :) Do you have some questions / progress to share?

eszkadev avatar Feb 22 '24 10:02 eszkadev

Hi @eszkadev. I've been sick. I should have an update by monday.

adighiero1 avatar Feb 22 '24 12:02 adighiero1

@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)

eszkadev avatar Feb 22 '24 15:02 eszkadev