? Pending

User tests: Successful: Unsuccessful:

avatar ciar4n
ciar4n
5 Jun 2017

Pull Request for Issue # .

Summary of Changes

Moves the container styling class out of joomla.searchtools and in to the view layout. Allows other fields to be placed inline with the search tools.

@laoneo

Testing Instructions

Apply patch and navigate to Content -> Articles -> Fields.

Before

fields1

After

fields2

Documentation Changes Required

avatar ciar4n ciar4n - open - 5 Jun 2017
avatar ciar4n ciar4n - change - 5 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jun 2017
Category Administration com_associations com_banners com_cache com_categories com_checkin com_contact com_content com_fields com_finder com_installer com_languages com_menus com_messages com_modules com_newsfeeds
avatar Bakual
Bakual - comment - 5 Jun 2017

I'm not to sure about this. While I appreciate the idea to be able to insert additional fields into that container (something I struggled myself with), it's more a bandaid around this JLayout.
Imho the whole JLayout should be reevaluated because passing the whole view into it isn't good to begin with. Instead the filterform, activefilters and other needed things should be passed explicitely.
Maybe we should deprecate the existing JLayout and use a new one (or the same but other arguments), basically passing only in what is required instead of the whole view. This way it may even be easier to pass in additional fields.

avatar wilsonge
wilsonge - comment - 5 Jun 2017

I agree. One of the biggest issues with JLayout's that we cheated and injected the JView object. This was the biggest thing that made swapping legacy mvc to something else near impossible

avatar laoneo
laoneo - comment - 6 Jun 2017

I guess that discussion about injecting the view into the layout should not be addressed in a different issue. This one fixes the styling case where the box of different contextes swapps on a different line.

avatar Bakual
Bakual - comment - 6 Jun 2017

It is related, because I'm not a fan of moving the searchtools container outside the searchtools JLayout. The Jlayout should be respsonible for the whole thing.
If we rewrite the JLayout so it is more flexble and you can inject additional fields into it, then it should solve both problems witht he current JLayout.

avatar ciar4n
ciar4n - comment - 6 Jun 2017

Just to further explain my intent here as I didn't explain very well in the summary..

Currently the bordered div with grey background is applied to the .js-stools class which is a class in the searchtools JLayout. This PR removes that styling and applies it to a new class (.js-stools-container). The view layout then becomes...

<div class="js-stools-container">
	<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
</div>

Regardless if JLayouts should be changed (I am not knowledgeable enough on that subject to comment) I believe the PR still correct. The JLayout should only contain the fields and not div styling.

avatar Bakual
Bakual - comment - 6 Jun 2017

Ah I didn't get that this container didn't exist before. I assumed you moved it out of the JLayout
Still not sure if I like it. It feels wrong to have part of the design of that element outside the element.

Am I correct in assuming JLayout should only contain the fields and not div styling?

The JLayout is meant as a reusable layout component which holds all the HTML elements needed for a given purpose (SearchTools in that case).
It has those advantages (amonsgt others):

  • We don't have to write the same HTML code over and over again.
  • If we want to adjust something, we can do it in one place.
  • If a template wants to adjust the appearance of the Search Tools, they can override that JLayout and it changes the appearance in all components.
avatar ciar4n
ciar4n - comment - 6 Jun 2017

Ty @Bakual .. I see now your logic.

I guess the question is if that area of the design is specifically for searchtools or more of a general 'table header' which may contain other non-searchtool fields. The latter appears to be the case for com_fields.

Also do we want the searchtools to be styled with a border/background in every case (eg. modals).

avatar Bakual
Bakual - comment - 6 Jun 2017

Actually, while looking if we can refactor the JLayout I found that there is a possibility already to include the context into the searchtools JLayout. That seems to be new with J3.7 or so.
See #16546

We still should rewrite that JLayout someday, but this should solve the issue with the context field.

avatar ciar4n
ciar4n - comment - 6 Jun 2017

Going to close this for now as @Bakual has offered an alternative solution to the initial reason for this PR with #16546

avatar ciar4n ciar4n - change - 6 Jun 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-06-06 14:37:29
Closed_By ciar4n
Labels Added: ?
avatar ciar4n ciar4n - close - 6 Jun 2017

Add a Comment

Login with GitHub to post a comment