Updated: Comment #18

Problem/Motivation

Our UI text standards: https://drupal.org/node/604342#wording say:
Use ‘Configure’, not ‘Settings’

However, on admin/config, we have "Search settings" under the "Search and meta-data" section. This needs to be changed.

Proposed resolution

Since the primary purpose of this page is now to configure SearchPage config items, which are known as "Search pages" in the UI, the admin/config menu item and page title should probably be changed to "Search pages". This is similar to most other entries on admin/config, which are nouns describing what you are configuring. Also, the breadcrumb would then be "Administration > Configuration > Search and meta-data > Search pages".

The description of the Config menu item is also outdated.

And for consistency, it would also be sensible if the URL of the config page changed from admin/search/settings to admin/search/pages. This would also make the URLs of the CRUD management screens for SearchPage config more sensible, as they would move from URLs like admin/config/search/settings/manage/(page)/disable to admin/config/search/pages/manage/(page)/disable (and similar for add/edit/etc.).

Remaining tasks

Patch exists on #17. Get it reviewed and committed.

User interface changes

The URL, page title, and menu entry for the main Search module configuration page will change, as well as the URLs for the SearchPage config entity CRUD operations.

API changes

None.

Comments

jhodgdon’s picture

ianthomas_uk’s picture

Status: Active » Postponed
jhodgdon’s picture

Status: Postponed » Needs work

Other issue is taken care of.

jhodgdon’s picture

Status: Needs work » Needs review
Issue tags: +Quick fix
StatusFileSize
new1.1 KB
new12.04 KB

Here's a 3-line patch, with screen shot of the relevant section of the admin/configure page. I realized the description on the Configuration page was also bogus, so fixed that too.
admin/configure page

ianthomas_uk’s picture

I'm not sure I agree with the switch from Search settings > Search on it's own.

I see two relevant lines in the interface text document:

- Always use a verb and noun as the menu link text ('Add link', 'Configure search')
- Use ‘Configure’, not ‘Settings’.

The first rule is followed for buttons and tabs, but not the main menu itself, which is a list of nouns. The patch also doesn't follow this rule (there is still no verb). I interpret the second rule to apply to instances of the first and if we're not applying the first rule, then we don't need to apply the second.

The word 'settings' has presumably been added because it is grouped under a 'Search and metadata' section (the same applies to 'Regional settings' under 'Regional and language'). I think if we change this menu item, we should also change the section title and/or grouping. I'm not sure 'Url aliases' belong under 'Metadata' either.

On one of my sites, this group contains these items:
- URL aliases
- Metatag
- Robotstxt
- Search API
- URL redirects
- Vote up/down
- Voting API
- XML sitemap
- Clean URLs

What about bringing search (or it's replacement modules) up one level, and splitting the remaining group into 'URL structure' and 'Metadata'?

My menu would then be:
- Metadata
-- Metatag (meta)
-- Robotstxt (meta)
-- Vote up/down (meta)
-- Voting API (meta)
-- XML sitemap (meta)
- Search API
- URL structure
-- URL aliases (url)
-- URL redirects (url)
-- Clean URLs (url)

jhodgdon’s picture

StatusFileSize
new1.12 KB

I am not willing to open up this discussion to the categories on admin/config -- if you want to open up that discussion, please do so in another issue.

Here's another patch that changes things to say "Configure search" instead of just "Search" , even though this makes the Search config page (while complying with our UI text standards) different from every other page on admin/configure. Is that OK or do you have objections to this as well?

ianthomas_uk’s picture

In my opinion neither 'Search and metadata > Search' nor 'Configure Search' is an improvement over 'Search settings', particularly if the URL remains settings. If we were to change this, then we should change 'Regional settings' at the same time and in the same way.

I can understand why you don't want to get into an endless debate about the categories on admin/config, particularly the non-search ones. What about if we keep the change as small as possible and just split Search and Metadata into their own separate categories? That's my preferred option, or closing as won't fix.

jhodgdon’s picture

StatusFileSize
new1.12 KB

I do not think that the team that decided on this structure for Administer really wants to have it broken down into even smaller categories than what it is. On the other hand, I think they just lumped a bunch of random stuff into "Search and metadata"... But I don't want to mess with it, at least on this issue. I also don't want to just "won't fix" this issue.

So, let's see...

What if we changed the link and page title to be "Search pages"? That way, you're in "Search and metadata" area, and you're configuring Search pages, as opposed to the meta-data stuff like URL aliases. That is mostly what that Search config page is for... that and the overall indexing settings, which we can make clear in the Description.

Would that be a viable solution? Here's a patch, just in case. :)

ianthomas_uk’s picture

I could be convinced by "Search pages". It also helps differentiate us a bit from Search API and other modules (in a bit of a meaningless way, but it's hard to explain the differences using just a name).

Shouldn't we also be changing the URL though? Or will that cause too many problems elsewhere.

jhodgdon’s picture

Yes, we should probably change the URL too... So it should be admin/config/search/pages ? That actually makes things about 1000% more rational. We'd have:

search.settings:
  path: '/admin/config/search/pages'
search.reindex_confirm:
  path: '/admin/config/search/pages/reindex'
# and this pattern for all the CRUD etc. operations on search pages:
search.add_type:
  path: '/admin/config/search/pages/add/{search_plugin_id}'
# ... for delete, edit, enable, etc.
ianthomas_uk’s picture

Status: Needs review » Needs work

Yes, I think that would work.

sidharthap’s picture

@jhodgdon we have to change all the instances from test file too.

sidharthap’s picture

Status: Needs work » Needs review
StatusFileSize
new20.92 KB

Changes all instances of "admin/config/settings". let see if it pass the test.

Status: Needs review » Needs work

The last submitted patch, 13: 2156661-13.patch, failed testing.

jhodgdon’s picture

I don't think we actually want to change the route machine name in:

--- a/core/modules/search/search.routing.yml
+++ b/core/modules/search/search.routing.yml
@@ -1,13 +1,13 @@
-search.settings:
-  path: '/admin/config/search/settings'
+search.pages:
+  path: '/admin/config/search/pages'

Just change the paths. That might fix some of the test failures?

sidharthap’s picture

Status: Needs work » Needs review
StatusFileSize
new20.93 KB

Thanks @jhodgdon. Here is the Corrected Patch.

yoroy’s picture

I do wonder how introducing a new, third alternative "pages" is an improvement over "configure" or "settings". I don't think it's that useful to talk about 'pages' in 2014 and onward :-)

And, initially I read "search" as a verb in "Search pages". I think the initial proposal to go just with "Search" is still the best.

jhodgdon’s picture

Title: Configure search vs. Search settings » Search admin menu entry uses "settings" -- UI-text standards violation
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Quick fix

yoroy: The point here is that what the page is configuring is "search pages". You can add a new search page, delete search pages, and configure search pages. That is what the config entities SearchPage that you are configuring are called in the UI, and that is what they actually are: individual pages where you can do searches. That is the bulk of the configuration that you can do at URL admin/config/search/settings ==> admin/config/search/pages in this patch. (There are also a few settings having to do with indexing on this config page.)

So the idea here is actually that, in line with other Config menu entries, we list on the page the noun of what we are configuring, which is "search pages" in this case.

You'll also notice in this patch that the menu entry in hook_menu_link_defaults becomes:

Search pages

Configure search pages and search indexing options.

and the URLs for the SearchPage config CRUD options make a lot more sense, as they are now:

-  path: '/admin/config/search/settings/manage/{search_page}/disable'
+  path: '/admin/config/search/pages/manage/{search_page}/disable'

I think this patch is good... I'm going to go ahead and mark it RTBC, although there may be some usability reviews and/or yoroy may still disagree and mark it back to needs work or needs review. Thanks!

I also made an issue summary outlining this.

yoroy’s picture

Thanks for the explanation, sounds good to go!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

2156661-16.patch no longer applies.

error: patch failed: core/modules/search/search.module:148
error: core/modules/search/search.module: patch does not apply

jhodgdon’s picture

Looks like the patch needs a reroll.

I also just noticed that the previous patch has a bunch of:

diff --git a/core/modules/search/search.routing.yml b/core/modules/search/search.routing.yml
old mode 100644
new mode 100755

in it. Please take those out in the reroll. We don't want to change the mode of files (making them executable etc.). Thanks!

ianthomas_uk’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new20.9 KB

Easy reroll and resolves permissions issue

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! Back to RTBC then. Reroll is clean.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 22: 2156661-22.patch, failed testing.

jsbalsera’s picture

Status: Needs work » Needs review
StatusFileSize
new20.41 KB

Reroll

jhodgdon’s picture

Status: Needs review » Needs work

Thanks for the reroll!

The patch apply failure was due to hook_menu_link_defaults() vanishing from search.module. But it was replaced by file search.menu_links.yml.

So the changes in the #22 patch to the function search_menu_link_defaults():

@@ -148,9 +148,9 @@ function search_menu_link_defaults() {
     'type' => MENU_SUGGESTED_ITEM,
   );
   $links['search.settings'] = array(
-    'link_title' => 'Search settings',
+    'link_title' => 'Search pages',
     'parent' => 'system.admin_config_search',
-    'description' => 'Configure relevance settings for search and other indexing options.',
+    'description' => 'Configure search pages and search indexing options.',
     'route_name' => 'search.settings',
     'weight' => -10,
   );

now need to be made in search.menu_links.yml now. This is missing from the #25 patch.

jsbalsera’s picture

StatusFileSize
new21 KB
new605 bytes

Adding the menu_links changes

jsbalsera’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Perfect, thanks!

I decided I should give this patch a manual test. So I applied the patch and did a "drush cr".

* The Configuration page looks good.
* Clicking through to admin/config/search/pages looks good.
* I tried various operations on the Content and User search pages:
- Edit - fine
- Set as default - fine
- Disable - fine
- Delete - fine

However:
- Enable and add - I got an exception:
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "search.view_user_search" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 150 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Ah. This is a separate issue, not due to this patch.
#2229303: Enable/add of search pages leads to route not found exception

This patch is RTBC. Thanks!

jhodgdon’s picture

(By the way, just to make sure, I just un-patched my site, did a drush cr, and verified that #2229303: Enable/add of search pages leads to route not found exception occurs without the patch as well. I was pretty sure it wasn't due to this patch, but now I actually tested it too.) (So this patch is still RTBC.)

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 27: 2156661-27.patch, failed testing.

jhodgdon’s picture

27: 2156661-27.patch queued for re-testing.

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community

That was some random test failure...

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Since #2178643: Indexing status can show a negative percentage of content as having been indexed landed and that patch contains

+    // Now index the rest of the nodes.
+    // Make sure index throttle is high enough, via the UI.
+    $this->drupalPostForm('admin/config/search/settings', array('cron_limit' => 20), t('Save configuration'));
+    $this->assertEqual(20, \Drupal::config('search.settings')->get('index.cron_limit', 100), 'Config setting was saved correctly');
Jalandhar’s picture

Status: Needs work » Needs review
StatusFileSize
new21.9 KB
new744 bytes

Updating the patch with reroll and changes required for #34 as said by alexpott. Please review it.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Reroll is good, thanks!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

All right, getting this in while it's hot!

Committed and pushed to 8.x. Thanks!

  • Commit 529a024 on 8.x by webchick:
    Issue #2156661 by Jalandhar, jsbalsera, ianthomas_uk, sidharthap,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.