Page MenuHomePhabricator

It should be possible to choose the default search (tab/profile) on Special:Search
Open, MediumPublicFeature

Details

Reference
bz38395

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:11 AM
bzimport added a project: MediaWiki-Search.
bzimport set Reference to bz38395.
bzimport added a subscriber: Unknown Object (MLST).

Do you mean moving the search options to Special:Search, and making them "sticky", so that the checkboxes you tick there are saved between searches?

If so - this is actually on our to-do list as part of http://www.mediawiki.org/wiki/Micro_Design_Improvements (or should be) - if it's not it'll be part of the Preferences reorganisation later this year. I'll see if we can bump it up a bit in priority.

(In reply to comment #1)

Do you mean moving the search options to Special:Search, and making them
"sticky", so that the checkboxes you tick there are saved between searches?

No. That's bug 31881; this is about the tab aka profile, not the checkboxes.

So this would be more "making the tabs sticky"?

(In reply to comment #2)

(In reply to comment #1)

Do you mean moving the search options to Special:Search, and making them
"sticky", so that the checkboxes you tick there are saved between searches?

No. That's bug 31881; this is about the tab aka profile, not the checkboxes.

If you checked "correct" searchNs checkboxes in Special:Preferences, a profile can be shown as being used.

For example you choose File namespace, then the Multimedia profile is used when you perform a default search.

(In reply to comment #3)

So this would be more "making the tabs sticky"?

No: this, together with bug 31881, is a blocker for "making the tabs sticky".

Currently there's no option at all for the tabs, and this bug asks one to be
created in the first place, be it in Special:Preferences (easiest; could then
be set site-wide in $wgDefaultUserOptions which is what I asked in the URL), in
Special:Search itself (bug 31881) or whatever.

(In reply to comment #4)

If you checked "correct" searchNs checkboxes in Special:Preferences, a profile
can be shown as being used.

You've not clicked the URL have you? Profiles are not always about namespaces, profile=translation isn't.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:24 PM
Aklapper removed a subscriber: Kosikfl.

We (Wiki Valley) were asked this feature and I just studied the (current, 1.41/1.43-alpha) behaviour. It is in fact partly already implemented but the logic is quite difficult to discover (ref: source code as of 1.43-alpha):

  • when a user has used the 'advanced' profile and saved some set of namespaces, then they are sticked with the 'advanced' profile and this set of namespaces, but
  • when the same user saves exactly the set of namespaces of some other profile (see below), then this other profile becomes the default displayed profile (i.e. when you enter a search in the search box, or an URL on the page Special:Search without any parameter "nsNNN" or "profile").

Profiles:

  • default/content = ns0, but if SMW is installed: ns0, ns106 (Property), ns108 (Concept), this is given by the parameter $wgNamespacesToBeSearchedDefault on the given wiki
  • multimedia = ns6
  • all = all current namespaces (until a new extension adding some namespaces is added)

I find a better behaviour, as proposed in this task, would be to add a user preference 'searchProfile' (naming consistent with the existing user preferences 'searchNsNNN') and when the use selects another profile then this profile is implicitely saved in the user preferences, and the preferences 'searchNsNNN' would be only used in the 'advanced' profile. The sysadmin may set a default value of this new user preference, so that new users may be shown the first time (e.g.) the profile 'translation' on translatewiki (until they selects some other profile).

There remains to be decided if the selection of the "default" profile is:

  1. the last selected profile (as proposed in my previous comment), or
  2. a profile the user has explicitely fixed in their preferences, whatever they will then navigate between different profiles during their searches.

This UX question is the same as the current checkbox in the 'advanced' profile "Remember selection for future searches": is the current selection ephemeral for this search or should it become perennial?