Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart Search - move Filters - v2 to correct merge conflict #8140

Closed
wants to merge 11 commits into from
Closed

Smart Search - move Filters - v2 to correct merge conflict #8140

wants to merge 11 commits into from

Conversation

pe7er
Copy link
Contributor

@pe7er pe7er commented Oct 24, 2015

New PR to solve Merge Conflict of PR #6959 "Smart Search - move Filters (3x) from left to [Search Tools] "

Please follow the testing procedure of PR #6959


This PR moves the Filter option of all three views of Smart Search to the [Search Tools] button.
(See Issue #6941 regarding the inconsistency with Filter options).

Test instructions

You have to enable the Content - Smart Search Plugin, and Index your test website
Please check the 3 different views before & after the patch:
test all the filters and search box, clear results, choose max amount of results on a page.

Smart Search: Manage Indexed Content

Check the current position of the Filters

In back-end > Components > Smart Search > Indexed Content
The Filters are on the left hand side

screen shot 2015-05-15 at 14 22 52

This PR changes moves the Filter

from the left to the middle column and will be visible when you click on the [Search Tools] button.

screen shot 2015-05-15 at 14 22 52

Smart Search: Manage Content Maps

Check the current position of the Filters

In back-end > Components > Smart Search > Content Maps
The Filters are on the left hand side

screen shot 2015-05-15 at 14 22 52

This PR changes moves the Filter

from the left to the middle column and will be visible when you click on the [Search Tools] button.

screen shot 2015-05-15 at 14 22 52

Smart Search: Manage Search Filters

Check the current position of the Filters

In back-end > Components > Smart Search > Search Filters
The Filters are on the left hand side

screen shot 2015-05-15 at 14 22 52

This PR changes moves the Filter

from the left to the middle column and will be visible when you click on the [Search Tools] button.

screen shot 2015-05-15 at 14 22 52

Note

To Clear the Filters / Search box, you can use the [Clear] button.
However, sometimes you have to press 2 times to clear the results.
I don't know the cause and how to solve it...

@jduerscheid
Copy link

I have tested this item ✅ successfully on 9a763fb


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

<?php echo $this->pagination->getLimitBox(); ?>
</div>
</div>
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<div class="clearfix"> </div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pe7er I think the clearfix should be removed here. You did that in the old PR. Can you check please?

@pe7er
Copy link
Contributor Author

pe7er commented Oct 24, 2015

@roland-d I think that JHtmlSidebar::setAction can be removed.
I've removed the clearfix in all three list views.

@zero-24 zero-24 added this to the Joomla! 3.5.0 milestone Oct 24, 2015
@n9iels
Copy link
Contributor

n9iels commented Oct 31, 2015

I applied the patch before activating the content plugin. The message that tells me that is now very close to the search filters. Maybe we can add some padding there?
smart search message

I also noticed that the filter on "Content maps" are always visible, and for some reason the filter on the right is always marked as an active filter (There are blue lines around it).
On other places where we use this filters (com_content for example) the blue line only appears when we choose an option of the filter.

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @jduerscheid


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

@pe7er
Copy link
Contributor Author

pe7er commented Nov 3, 2015

Thanks @n9iels, I corrected the Branch filter on "Content maps".
Now it is not activated automatically anymore.

btw: I did not change the padding of the warning message...

@n9iels
Copy link
Contributor

n9iels commented Nov 4, 2015

Yes, that works for me! 😄 I see now the same problem appears for "indexed content", the search filter "Select type of content" is always active over there.

Also the search filter on "Content mapping" are always visible on that page. Or is that done by a certain reason?

@n9iels
Copy link
Contributor

n9iels commented Nov 4, 2015

About that padding and the message. Strange enough the message appears below the search filters. Other messages like "save" and "delete" appear above the messages.

Seems like all other message than "successfully saved", "successfully deleted" etc. appear below the filters. Not a problem for this PR I think so.
I will make a PR for that 👍 (after this PR and others are merged, otherwise that merge conflicts never solves 😉 )

@pe7er
Copy link
Contributor Author

pe7er commented Nov 4, 2015

Thanks for testing!

No, I did not set the filter to "always active" on purpose. I'll check if I can correct it.

If someone knows the cause of the problem, please correct it with a PR,
or tell me what to change & I'll do so...

@roland-d
Copy link
Contributor

roland-d commented Nov 4, 2015

@pe7er The "always active" happens because you have set a default value of 0 here: https://github.com/joomla/joomla-cms/pull/8140/files#diff-762a4c09ff9b1a26880f1391232575c2R23

The first option you give to the dropdown has a value of 0:
https://github.com/joomla/joomla-cms/pull/8140/files#diff-762a4c09ff9b1a26880f1391232575c2R29

that is why the first entry becomes an active one. I guess you can drop the default value setting.

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @jduerscheid


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

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @jduerscheid


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

@zero-24
Copy link
Contributor

zero-24 commented Nov 4, 2015

@pe7er Travis cry

FILE: ...d/joomla/joomla-cms/administrator/components/com_finder/models/maps.php
--------------------------------------------------------------------------------
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
 176 | ERROR | Expected "if (...)\n...{...}\n...else\n"; found "if
     |       | (...)\n...{...}\n...else"
 184 | ERROR | Expected "if (...)\n...{...}\n...else\n"; found "if
     |       | (...)\n...{...}...else"
--------------------------------------------------------------------------------
UPGRADE TO PHP_CODESNIFFER 2.0 TO FIX ERRORS AUTOMATICALLY
--------------------------------------------------------------------------------

@roland-d
Copy link
Contributor

roland-d commented Nov 4, 2015

I don't think the last change is correct. In Joomla 3.4.5 the dropdown looks like this:
finder

Branches only as first option and I think we should keep that.

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @jduerscheid


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

@pe7er
Copy link
Contributor Author

pe7er commented Nov 4, 2015

I removed my previous PR "fixed Select Branch dropdown in Smart Search Content Maps"

@dgrammatiko
Copy link
Contributor

Looks good to me:
screenshot 2015-11-04 23 36 38

@roland-d
Copy link
Contributor

roland-d commented Nov 4, 2015

@dgt41 Compare it to the implementation in J3.4.5, it is quite different. The current implementation uses it's own JHtml class, that is completely skipped now.

@dgrammatiko
Copy link
Contributor

ahh yeah, the finder way 😝

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @dgt41, @jduerscheid, @Kubik-Rubik


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

@pe7er
Copy link
Contributor Author

pe7er commented Nov 4, 2015

I've removed the hardcoded SQL
query="SELECT id AS value, title AS branch FROM #__finder_taxonomy WHERE parent_id = 1"
from /administrator/components/com_finder/models/forms/filter_maps.xml and
added /administrator/components/com_finder/models/fields/branches.php
to retrieve the branches.

@@ -263,7 +264,7 @@ protected function populateState($ordering = null, $direction = null)
$state = $this->getUserStateFromRequest($this->context . '.filter.state', 'filter_state', '', 'string');
$this->setState('filter.state', $state);

$branch = $this->getUserStateFromRequest($this->context . '.filter.branch', 'filter_branch', '1', 'string');
$branch = $this->getUserStateFromRequest($this->context . '.filter.branch', 'filter_branch', '', 'string');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have to put back the default value here?

@dgrammatiko
Copy link
Contributor

@pe7er I am afraid that administrator/components/com_finder/models/fields/branches.php doesn;t cover all the functionality of the old JHtml class https://github.com/joomla/joomla-cms/blob/staging/components/com_finder/helpers/html/filter.php#L208-L394

public function getOptions()
{
// Build the query.
$db = JFactory::getDbo();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pe7er Just change this complete function to contain:

return JHtml::_('finder.mapslist');

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @dgt41, @jduerscheid, @Kubik-Rubik


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

@pe7er
Copy link
Contributor Author

pe7er commented Nov 4, 2015

Removed the SQL query from fields/branches.php & replaced with return JHtml::_('finder.mapslist');
Thanks for the tip @roland-d !

@dgrammatiko
Copy link
Contributor

@pe7er can you also implement this #8140 (comment)
so I can re-test this?

File administrator/components/com_finder/views/index/tmpl/default.php

@pe7er
Copy link
Contributor Author

pe7er commented Nov 4, 2015

@dgt41 yes, please!
I think that we should correct the layout issue with the message later because it might need to be corrected at other places as well...

@dgrammatiko
Copy link
Contributor

Works fine here, one small UX tho:
screenshot 2015-11-05 01 18 30

@coolcat-creations
Copy link
Contributor

Small issue:

Before:
bildschirmfoto 2015-11-05 um 00 22 00

After patch:
bildschirmfoto 2015-11-05 um 00 22 41

@coolcat-creations
Copy link
Contributor

I don´t know if this regards this PR but if i don´t have published filters there is a message that "No filters have been created yet. Create a filter." - that´s not true because there are filters but they are unpublished.
bildschirmfoto 2015-11-05 um 00 25 04

@pe7er
Copy link
Contributor Author

pe7er commented Nov 4, 2015

Thanks for testing @dgt41 & @designbengel !
Those UX issues need to be corrected, but I think that it could be done for beta2 in another PR.

@coolcat-creations
Copy link
Contributor

There is a Message that no content has been indexed by filtering unpublished items?

bildschirmfoto 2015-11-05 um 00 27 24

@roland-d
Copy link
Contributor

roland-d commented Nov 4, 2015

@designbengel I think this is an existing issue, this PR only moves the buttons from the sidebur to the Search Tools bar. Perhaps raise a separate issue for that?

@coolcat-creations
Copy link
Contributor

I have tested this item ✅ successfully on b14cbd4

Ok, so like @roland-d says it´s regarding just the location-change of filters - so test for this is ok :)


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

@roland-d roland-d closed this in 6766133 Nov 4, 2015
@pe7er pe7er deleted the search-tools-filters-smartsearch2 branch November 5, 2015 00:08
@infograf768
Copy link
Member

Folks, I can't see
COM_FINDER_MAPS_SELECT_BRANCHE="- Select Branch -"
anywhere.

screen shot 2015-11-27 at 17 43 51

@infograf768
Copy link
Member

@pe7er @roland-d

I have the feeling some new lang strings were merged here that should'nt have...

infograf768 added a commit to infograf768/joomla-cms that referenced this pull request Nov 28, 2015
@infograf768
Copy link
Member

@pe7er @roland-d Please test
#8558

rdeutz added a commit that referenced this pull request Nov 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants