Page MenuHomePhabricator

Collapse namespace section by default
Closed, ResolvedPublic3 Estimated Story Points

Description

Motivation
Currently, the namespace section of AdvancedSearch is always open. This makes AdvancedSearch use up more space than the "plain" search page, it increases loading time, and the namespace section slightly overshadows the "Advanced Parameters" section, so that it was sometimes not noticed.
Since not all searches run from Special:Search include users tinkering with namespace parameters, this all calls for a collapsing of the namespace section.

Mocks

Bildschirmfoto 2019-03-01 um 21.26.18.png (314×1 px, 31 KB)

Bildschirmfoto 2019-03-01 um 21.26.13.png (536×1 px, 64 KB)

Acceptance Criteria

  • There is a collapse/expand arrow in the top right corner of the namespace section (see mocks)
  • By default, the namespace section is collapsed
  • When the namespace section is collapsed, it shows pills with all active namespaces, like advanced search terms in the advanced parameters panel
  • Pills in the collapsed view can be deleted by clicking on their "x", just like for pills of the advanced parameter's panel
  • The expandable pane for namespaces should be tracked separately from the expandable pane for search options

Note
The mocks also change the general look of the namespaces panel slightly (new titles and such). These are not part of this ticket, but TODO
This ticket only concerns itself with the redesign of the elements shown in the mocks above. Performance optimizations are to be taken care of in a separate ticket.

Related Objects

Mentioned In
rEASR4b5d172c7fb8: [DNM] Collapse namespace panel by default
rEASR795cac05fa07: Track namespaces and search optoions expandable panes separately
rEASR91e0c2192977: [DNM] Collapse namespace panel by default
rEASR4300907a62ab: Track namespaces and search optoions expandable panes separately
rEASRe5ccd3e915ef: Track namespaces and search optoions expandable panes separately
rEASRda9ecda366da: [DNM] Collapse namespace panel by default
rEASR36bdc35b32d8: [DNM] Collapse namespace panel by default
rEASR9a8088f16d4c: [DNM] Collapse namespace panel by default
rEASR10185f859dbe: [DNM] Collapse namespace panel by default
rEASR43f3d3b946fc: [DNM] Collapse namespace panel by default
rEASR5cdc9fd0ff79: [DNM] Collapse namespace panel by default
rEASRe30d0caf36f5: [DNM] Collapse namespace panel by default
rEASR39bf5eff7c70: [DNM] Collapse namespace panel by default
rEASR35ab7384f7ad: [DNM] Collapse namespace panel by default
rEASRd0f4e954876a: [DNM] Collapse namespace panel by default
rEASR7d5e7722c46e: Collapse namespace panel by default
rEASR34d7b1df5308: Improve generateTag function after OOUI provided a fix
rEASR69240720dfa7: Collapse namespace panel by defaul
rEASR349daee27f0c: Collapse namespace panel by defaul
rEASR5bd149b3ab18: Collapse namespace panel by defaul
rEASR132a0e77a63a: Collapse namespace panel by defaul
rEASRf4be07a4a634: Collapse namespace panel by defaul
rEASR8d37e0d1a148: Collapse namespace panel by defaul
rEASRedbccaa50913: Collapse namespace panel by defaul
rEASRfccf7e1dfe19: Collapse namespace panel by defaul

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

There was the problem that there is nothing gained if a user activates "all" by default (since the pills are so many that any other space saving is small in comparison). However, it seems that "Articles" is the default, which means it makes sense.

Tim_WMDE set the point value for this task to 8.

Change 495922 had a related patch set uploaded (by Tonina Zhelyazkova; owner: Tonina Zhelyazkova):
[mediawiki/extensions/AdvancedSearch@master] Collapse namespace panel by defaul

https://gerrit.wikimedia.org/r/495922

I just saw some tracking code in the ExpandablePane class, which is reused. This might skew our tracking of "Advanced search expanded/collapsed" as it will now also track namespace expands/collapses. Should we do a more fine-grained tracking, @Lea_WMDE?

Change 496414 had a related patch set uploaded (by Tonina Zhelyazkova; owner: Tonina Zhelyazkova):
[mediawiki/extensions/AdvancedSearch@master] Improve generateTag function after OOUI provided a fix

https://gerrit.wikimedia.org/r/496414

kai.nissen changed the point value for this task from 8 to 5.
kai.nissen moved this task from Todo to Doing on the WMDE-FUN-Sprint-2019-03-18 board.

Change 496414 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] Improve generateTag function after OOUI provided a fix

https://gerrit.wikimedia.org/r/496414

Change 498912 had a related patch set uploaded (by Tonina Zhelyazkova; owner: Tonina Zhelyazkova):
[mediawiki/extensions/AdvancedSearch@master] Track namespaces and search optoions expandable panes separately

https://gerrit.wikimedia.org/r/498912

@Lea_WMDE @Jan_Dittrich

In the mocks provided for this change the checkbox [] Remember selection for future searches is in the header of the expandable namespaces pane and it appears only when the pane is expanded.
Unfortunately that creates quite a few headaches for the development. For some reason the CheckBox's click event is hijacked by the expandable pane's click event which means when you try to click [] Remember selection for future searches the pane collapses. We would have to invest some more time and resources to figure out how to get around that.

How about we put that checkbox above the presets, in the actual expandable part? Like in the screenshots below:

AS-expanded.png (402×777 px, 22 KB)

AS-collapsed.png (311×749 px, 15 KB)

How about we put that checkbox above the presets, in the actual expandable part? Like in the screenshots below:

Not super nice looking, but fine with me…
(It is a bit of a tricky UI with lots of compromises/tricks already so changes are likely to have ripple effects (like the one encountered))

I'm wondering if it would look at least a little bit better, if the line was moved to below the selection (i.e. just before the Add namespaces input field), logically I guess it makes more sense to first see what you select, and then decide that you want to have that selection as a default.
@Jan_Dittrich what do you think?

if the line was moved to below the selection

I assume "line" here refers to a "line of text", in this case "[ ] Remember selection for future searches".

So the order now is:

  • Header Search in
  • Save Selection
  • Presets
  • Selected Namespaces
  • Namespace addition

and with your suggestion change to:

  • Header Search in
  • Presets
  • Selected Namespaces
  • Save Selection
  • Namespace addition

The reasoning is fine (though I am unsure of first… then I… in this case eases understanding for the users), but by that change we create a new problem: Then, the connection between "add namespace" and the namespace list to which we add is broken up.

We could move it to the very end,

  • Header Search in
  • Presets
  • Selected Namespaces
  • Namespace addition
  • Save Selection

image.png (366×724 px, 28 KB)

It looks a bit striped then, though and the change have further ripple effects due to the interconnections of the elements.

kai.nissen changed the point value for this task from 5 to 3.

Change 495922 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] Collapse namespace panel by default

https://gerrit.wikimedia.org/r/495922

Change 498912 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] Track namespaces and search options expandable panes separately

https://gerrit.wikimedia.org/r/498912