?
avatar schnuti
schnuti
23 Aug 2016

As yet another button is on the way there are at least 6 buttons with text in the article edit toolbar. Additional buttons can be added by the custom button and 3.d party extensions.
#11721 New Feature=>editor-xtd to insert menu items links in content

As I'm waiting for
#11157 document "scriptoptions", and allow to override tinyMCE Javascript parameters

I've forked parts of the tinyMCE Joomla plugin. For that I've coded the example below. As I'm not that fit with JS, it's in a tinyMCE JS plugin and not flexibel enough for the core but shows what is possible.

@Fedik Maybe you are interested? Some of the code could probably be moved to the scriptoptions.

Before:
before

After:
after

I've used all 5 buttons in this example. It's not a fake.

avatar schnuti schnuti - open - 23 Aug 2016
avatar schnuti schnuti - edited - 23 Aug 2016
avatar brianteeman
brianteeman - comment - 23 Aug 2016

I see where you are going with this and the problem you are trying to
resolve. An alternative would be to only display the icons when the
xtd-editor buttons are in the toolbar

On 23 August 2016 at 06:44, Ove Eriksson notifications@github.com wrote:

As yet another button is on the way there are at least 6 buttons with text
in the article edit toolbar. Additional buttons can be added by the custom
button and 3.d party extensions.

#11721 #11721 New
Feature=>editor-xtd to insert menu items links in content

As I'm waiting for
#11157 #11157 document
"scriptoptions", and allow to override tinyMCE Javascript parameters
I've forked parts of the tinyMCE Joomla plugin. For that I've coded the
example below. As I'm not that fit with JS, it's in a tinyMCE JS plugin and
not flexibel enough for the core but shows what is possible.

@Fedik https://github.com/Fedik Maybe you are interested? Some of the
code could probably be moved to the scriptoptions.

Before:
[image: before]
https://cloud.githubusercontent.com/assets/956537/17881388/3c846ff6-6905-11e6-8a9d-106e037a0232.jpg

After:
[image: after]
https://cloud.githubusercontent.com/assets/956537/17881403/592b436e-6905-11e6-8747-60e57f143129.jpg


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#11750, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8eaau9lhJ4ey1E6YVb3u7JYIM-0cks5qioitgaJpZM4JqkpW
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar brianteeman brianteeman - change - 23 Aug 2016
Category UI/UX
avatar brianteeman
brianteeman - comment - 23 Aug 2016

Also as the xtd-buttons are enabled/disabled by the site owner what happens if they only have one or two enabled. Are they still in a dropdown?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11750.

avatar C-Lodder
C-Lodder - comment - 23 Aug 2016

I was actually thinking exactly the same thing yesterday. I'd also suggest that all Joomla XTD buttons are combined into 1 plugin if this happens.....I can't see why they should be separate plugins

avatar dgt41
dgt41 - comment - 23 Aug 2016

That would be extremely easy to achieve: the code for each button exist as a native tinyMCE plugin here: https://github.com/joomla/joomla-cms/pull/7152/files
It needs one more plugin that will load only the selected buttons and append them in a drop down button.
Also this will reduce the lines of the produced inline script of tinyMCE

avatar Fedik
Fedik - comment - 23 Aug 2016

I think make the drop-down make sense only if there > 4-5 buttons available

avatar C-Lodder
C-Lodder - comment - 23 Aug 2016

@Fedik - Once #11721 is merged, there will be 6

avatar dgt41
dgt41 - comment - 23 Aug 2016

@Fedik that should be doable with an if statement e.g. (if buttons.length > 3) { dropdown) } else (single buttons)}

avatar dgt41
dgt41 - comment - 23 Aug 2016

@C-Lodder as @brianteeman mentioned above this is the TOTAL amount of button, but that number depends on what is enabled for each instance of tinyMCE (which might be a lot less, e.g. module custom don't have modules, page break, read more etc)

avatar C-Lodder
C-Lodder - comment - 23 Aug 2016

@dgt41 - In which case, after the above PR mentioned is merged, there will be 3 on Custom module. Will be fine putting 3 in a dropdown

avatar dgt41
dgt41 - comment - 23 Aug 2016

Another interesting approach could be the introduction of 2 dropdown: Joomla and 3PD (or Custom)
This way the toolbar will be tidier for people with many 3pd xtd-buttons. Also the same logic could be applied here for displaying single buttons or dropdown

avatar brianteeman brianteeman - change - 23 Aug 2016
Status New Discussion
avatar schnuti
schnuti - comment - 23 Aug 2016

Dropdown when more than 2 buttons is a good idea.
I managed to move the code to the php plugin. That proves that it's not that hard.
Mainly editor.addButton has to be changed to editor.addMenuItem + a menubutton with editor.menuItems["$button"] for each button.
But please first merge #11157. Also includes code improvements.

Here is a screenshot of frontemd editing in "responsive view" with tinyMCE set to max. I want to override that and not use a fork.

smallscreen

avatar dgt41
dgt41 - comment - 23 Aug 2016

@schnuti if you don't mark your test in the issue tracker then #11157 won't be merged

avatar schnuti
schnuti - comment - 23 Aug 2016

@dgt41 I have tested and marked it as successful long ago. Do I have to do it again because of the sync?

avatar dgt41
dgt41 - comment - 23 Aug 2016

Unfortunately, yes. Each iteration needs two passing tests

avatar mbabker
mbabker - comment - 23 Aug 2016

I can't see why they should be separate plugins

Separate functionality should always be in separate modules (generic term for anything re-usable or extending something, not our extension type). Single Responsibility Principle; instead of having a "mega object" trying to do all the things, it's better structurally to have multiple objects all focusing on individual tasks.

avatar brianteeman
brianteeman - comment - 23 Aug 2016

..I can't see why they should be separate plugins

Also dont forget that these are available when you are NOT using the tinymce editor

avatar schnuti
schnuti - comment - 23 Aug 2016

..I can't see why they should be separate plugins

Be aware that this has nothing to do with the idea of the dropdown. I'm sure you can find ways to optimize parts of the code. The mentioned PR has some nice "hacks" like using the "scriptoptions".

@dgt41 Ok. I'll test the PR again when @Fedik has resolved the new conflictsl

avatar brianteeman brianteeman - change - 23 Aug 2016
Labels Added: ?
avatar JoshuaLewis
JoshuaLewis - comment - 30 Aug 2016

The parent text of the dropdown menu should be something like "More" instead of "Joomla" so that normal site users are not confused on what the text means.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11750.

avatar schnuti
schnuti - comment - 30 Aug 2016

The name of the menu button is not given. The buttons in the drop down are Joomla specific and More could be in multiple use. Any other idea?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11750.

avatar tonypartridge
tonypartridge - comment - 3 Jun 2017

What are the thoughts on this? Given it is buttons if we move it into a dropbown it's no longer button/buttons.

I like the idea of a dropdown, but believe this should be a new method.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11750.

avatar C-Lodder
C-Lodder - comment - 3 Jun 2017

+1 for dropdown

avatar brianteeman
brianteeman - comment - 3 Jun 2017

Dont forget the accessibility on the dropdown

avatar tonypartridge
tonypartridge - comment - 3 Jun 2017

Should we not move this to J4 and have it as a new method xd-dropdown.

People WILL want buttons still and I don't think we should remove them completely. Adding a dropdown to me is good, but users will complain or additional clicks.

avatar schnuti schnuti - change - 23 Jun 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-06-23 11:29:55
Closed_By schnuti
avatar schnuti schnuti - close - 23 Jun 2017
avatar C-Lodder
C-Lodder - comment - 23 Jun 2017

@schnuti how come you closed this?

avatar tonypartridge
tonypartridge - comment - 23 Jun 2017

I really don't think that's a right assumption. This is what debates are about. What is best for the CMS and not what is right for one person or the other but as a collective.

Just because you ideas are not always seen as right shouldn't mean you give up on something straight away. We have millions of users to consider.

On 23 Jun 2017, 13:28 +0100, Ove Eriksson notifications@github.com, wrote:

Sorry! Please open a new issue for it.
Enough is enough. I've heard this besserwisser tone and lookdown behaviour a couple of times. Always leaving me in rage.

You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

avatar brianteeman
brianteeman - comment - 23 Jun 2017

As I stated in that issue it was just one individuals opinion that it should not proceed.

avatar schnuti
schnuti - comment - 23 Jun 2017

I romoved some of my comments and reopened this issue

avatar schnuti schnuti - change - 23 Jun 2017
Status Closed New
Closed_Date 2017-06-23 11:29:55
Closed_By schnuti
avatar schnuti schnuti - reopen - 23 Jun 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jun 2017
The description was changed
Status New Discussion
avatar joomla-cms-bot joomla-cms-bot - edited - 25 Jun 2017
avatar Quy
Quy - comment - 10 Mar 2018

@schnuti Is this for v3 or v4? This has been implemented in v4 with #19789.

avatar schnuti
schnuti - comment - 11 Mar 2018

@Quy - v4 wasn't born at proposal time.

As it make no sense to have a special solution for v 3.9 only I close this.

avatar schnuti schnuti - change - 11 Mar 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-03-11 18:47:22
Closed_By schnuti
avatar schnuti schnuti - close - 11 Mar 2018

Add a Comment

Login with GitHub to post a comment