Bug 120658 - Reworking of dialogues Organize macros (make from 5 existing only one)
Summary: Reworking of dialogues Organize macros (make from 5 existing only one)
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All All
: medium enhancement
Assignee: Jim Raykowski
URL:
Whiteboard: target:25.2.0 inReleaseNotes:25.2
Keywords:
: 141975 (view as bug list)
Depends on:
Blocks: Dialog-UX BASIC-IDE
  Show dependency treegraph
 
Reported: 2018-10-17 12:39 UTC by Roman Kuznetsov
Modified: 2024-12-03 10:54 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
New dialogue Macros Organizer (55.79 KB, image/jpeg)
2018-10-17 12:40 UTC, Roman Kuznetsov
Details
demonstration of the Macro Organizer Selector dialog (1.72 MB, video/x-matroska)
2024-11-08 08:08 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2018-10-17 12:39:48 UTC
Description:
Reworking of dialogues Organize macros (make from 5 existing only one).

Today we have four+one dialogues for manage of macros in LibreOffice. You can find it in menu Tools->Macros->Organize macros (plus one from dialogue Tools->Macros->Organize macros->LibreOffice Basic, in it need push button "Organizer" for opening dialogue "LO Basic Macros Organizer").

Problem with existings situation:

1. Dialogue Tools->Macros->Organize macros->LibreOffice Basic don't allow organize library/modules/dialogues/macroses, it needs open additional dialogue for it.
2. There are five dialogues for organize macroses instead one (a-la one Template manager dialogue with some filters for all modules of LibreOffice).
3. Follow from item one: dialogue Tools->Macros->Organize macros->LibreOffice Basic has different view from dialogues Tools->Macros->Organize macros->(JavaScript, BeanShell, Python)
4. Users don't see in one place all macroses if they were wrote on different programming languages.

In my variant I offer make one dialogue (see attach), that allows organize library/modules/dialogues/macroses and run/edit/associate macroses in one window for all four supported macros programming languages.
All libraries (with its modules/dialogues/macroses) on different programming languages will be show in one tree in left side of dialogue. But it need highlight it with different icons or color.

Steps to Reproduce:
1. try organize your macroses uses existing dialogues in LibreOffice
2.
3.

Actual Results:
there are five dialogues for organize your macroses in LibreOffice

Expected Results:
there is only one dialogue, that will allow make all organize operations for macroses


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Roman Kuznetsov 2018-10-17 12:40:35 UTC
Created attachment 145778 [details]
New dialogue Macros Organizer
Comment 2 Regina Henschel 2018-10-17 14:51:51 UTC
I appreciate a rework of those dialogs. But you need to be very careful that nothing is lost.

Currently LibreOffice has:

.uno:RunMacro (title "Macro Selector") shows _all_ available macros, regardless of the language, and has a field to show a description of the macro.

.uno:MacroDialog (currently bound to Alt+F11) is only for Basic. It belongs to the same group as the corresponding dialogs for JavaScript, BeanShell and Python. These dialogs keep the selected module open, so that you can quickly get the same macro again. These dialogs filter the macros per language. The dialogs for BeanShell, JavaScript and Python have the same arrangement of their components. The dialog for Basic had the same structure too, but was changed recently.

.uno:ScriptOrganizer distributes to the before mentioned dialogs.

.uno:MacroOrganizer is only for Basic. It has no "Run", but it allows, to copy/move modules per drag&drop between libraries. That is very useful, if you will put some macros into a document.

To consider beyond what your image shows: How to handle other languages? Drag&Drop of modules. Descriptions of macros. Easy repeated access to the same macro. Does it affects the API?
Comment 3 Roman Kuznetsov 2018-10-21 17:31:50 UTC
(In reply to Regina Henschel from comment #2)
> I appreciate a rework of those dialogs. But you need to be very careful that
> nothing is lost.
> 
>....
> 
> To consider beyond what your image shows: 
>How to handle other languages?

All library on all languages will be allow in one tree area in left side of dialogue 

> Drag&Drop of modules. 

It needs realize in tree area, as it is now in dialogue "LO Basic Macros Organizer"

>Descriptions of macros. 

what do you mean? User's decriptions?

>Easy repeated access to the same macro. 

repeat access to the same macro where?

>Does it affects the API?

I don't know =(
Comment 4 Regina Henschel 2018-10-21 19:26:44 UTC
(In reply to Roman Kuznetsov from comment #3)
> (In reply to Regina Henschel from comment #2)
> 
> >Descriptions of macros. 
> 
> what do you mean? User's decriptions?

Descriptions made by the macro author. You can see such descriptions for example in "ExportSheetsToHMTL", "HelloWorld", "Highlight", "MemoryUsage" for the Beanshell-macros. You get the dialog, which has this, if you use "Run Macro" or  shortcut Alt+F11.

> 
> >Easy repeated access to the same macro. 
> 
> repeat access to the same macro where?

If you use the dialog "LibreOffice Basic Macros" and fold out a module and run a macro, the next time you use the dialog, the same module is folded out and you can click on the macro immediately and run it. If you use the above mentioned "Run macro", the next time you use the dialog, all libraries are folded up. You first need to fold out the library, then fold out the module and then you can select the desired macro. That is cumbersome.

> 
> >Does it affects the API?
> 
> I don't know =(

I neither. I don't know whether these dialogs can be reused by a macro author for own content, or whether their exists a method in the API, which uses these dialogs. At least, the existing dialogs are connected to uno-commands and thus can be called via dispatcher in any external macro.
Comment 5 Timur 2022-03-15 15:30:55 UTC
*** Bug 141975 has been marked as a duplicate of this bug. ***
Comment 6 Roman Kuznetsov 2023-08-22 10:35:34 UTC
Jim, may be you will interesting in this enhancement?
Comment 7 Heiko Tietze 2024-03-08 10:09:27 UTC
We discussed the topic in the design meeting.

The issue is worse for Python where most features are not usable in any dialog. Unified dialogs are not always easier to use, and the suggested proposal is difficult to implement and may have a lot of side-effects.

However, if a volunteer wants to tackle the problem there is clearly room for improvement. The issue is valid.
Comment 8 Jim Raykowski 2024-11-08 08:08:48 UTC
Created attachment 197489 [details]
demonstration of the Macro Organizer Selector dialog

Finally at a point that I feel somewhat confident to share this cobbling:

https://gerrit.libreoffice.org/c/core/+/176254

Hmm, gerrit already flagged it as having a merge conflict.

It is at working work in progress stage. The UNO command, .uno:ScriptOrganizerSelector, is set as experimental. Options > Advanced > Enable experimental features (may be unstable) needs to checked for it to be available to test.

Attached is a video demonstration.
Comment 9 Roman Kuznetsov 2024-11-18 08:16:29 UTC
Change status to ASSIGNED by Jim's work in

https://gerrit.libreoffice.org/c/core/+/176254
Comment 10 Commit Notification 2024-12-02 06:13:50 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/55e86edcb37a37123a69ce3e1eb9e20758415fb6

tdf#120658 - Reworking of dialogues Organize macros

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.