?
avatar brianteeman
brianteeman
23 Oct 2017

If you look at the toolbar helper and the way that we implement the icon selection for a custom toolbar item and the way we determine an id for the button you will see that it is based on an image name eg

\JToolbarHelper::custom('searches.reset', 'refresh.png', 'refresh_f2.png', 'JSEARCH_RESET', false);
IIRC this was for backwards compatibility with J2.5. As we dont have those images in core the code needs to be refactored to just use an icon and id name AND we need to be able to have an id that is not based on the icon so that we can avoid duplicate id on the page just because we have the same icon used more than once

avatar brianteeman brianteeman - open - 23 Oct 2017
avatar joomla-cms-bot joomla-cms-bot - change - 23 Oct 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Oct 2017
avatar dgt41
dgt41 - comment - 23 Oct 2017

I've already started refactoring the toolbar with basic aims:

  • buttons context aware
  • no inline javascript
  • CSR (client side rendering)
  • more flexible, easier customisable
  • 100% B/C

Check the code: https://github.com/joomla/joomla-cms/compare/4.0-dev...dgt41:ยง4.0-dev-toolbar-cleanup?expand=1

NOTE: That branch is effectively frozen for some time now awaiting UX devisions

avatar brianteeman
brianteeman - comment - 23 Oct 2017

I guess that we will be waiting until hell freezes over then ;)

avatar dgt41
dgt41 - comment - 23 Oct 2017

Let's give them the time they need to finish the research/tests, it's not even 3 months
screen shot 2017-10-23 at 12 34 39

avatar franz-wohlkoenig franz-wohlkoenig - change - 23 Oct 2017
Category Code style
avatar franz-wohlkoenig franz-wohlkoenig - change - 23 Oct 2017
Status New Discussion
avatar brianteeman
brianteeman - comment - 23 Oct 2017

Have they started?

avatar C-Lodder
C-Lodder - comment - 23 Oct 2017

You do make me laugh, @brianteeman

avatar brianteeman
brianteeman - comment - 6 Dec 2017

@dgt41 are you still waiting on ux decisions for this toolbar refactor or has the refactoring restarted?

avatar dgt41
dgt41 - comment - 10 Dec 2017

@brianteeman still on hold till we finalise the specs

avatar asika32764
asika32764 - comment - 11 Dec 2017

I have some idea very similar to #18501 on only php part and still 100% B/C

$toolbar = $container->get('toolbar');

// First button
$toolbar->addNew('JTOOLBAR_NEW')
    ->addClass('hasTooltip btn-success')
    ->setIcon('ok')
    ->setTask('article.new')
    ->setDisabled(!$canDo->core_create);

// Second button
$toolbar->addPublished('JTOOLBAR_PUBLISHED')
    -> //...

// B/C
$toolbar->addButton('Custom', ...);
avatar brianteeman
brianteeman - comment - 23 Mar 2018

closed as in progress elsewhere

avatar brianteeman brianteeman - close - 23 Mar 2018
avatar brianteeman brianteeman - change - 23 Mar 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-03-23 23:08:55
Closed_By brianteeman

Add a Comment

Login with GitHub to post a comment