Page MenuHomePhabricator

Make "View" appear disabled when there are no results
Closed, ResolvedPublic

Assigned To
Authored By
Dominicbm
Sep 7 2022, 4:27 PM
Referenced Files
F35544818: Screen Shot 2022-10-02 at 11.00.36 PM.png
Oct 3 2022, 4:01 AM
F35544819: Screen Shot 2022-10-02 at 11.00.29 PM.png
Oct 3 2022, 4:01 AM
F35544817: Screen Shot 2022-10-02 at 11.00.24 PM.png
Oct 3 2022, 4:01 AM
F35534416: image.png
Sep 26 2022, 8:29 AM
F35512306: image.png
Sep 7 2022, 4:27 PM
Subscribers
Tokens
"Like" token, awarded by alexhollender_WMF.

Description

When there are no results to show, the tab currently shows up as "View (0)". We received a good suggestion to alter the appearance of the tab in this situation to show up as disabled, to better visually convey there are no results. I think we should do this whether or not we keep the result counts.

image.png (765×913 px, 161 KB)

Event Timeline

Dominicbm changed the task status from Open to In Progress.Sep 12 2022, 6:31 PM
Dominicbm moved this task from Backlog to In Progress on the View-it! board.

I've got this working with Vector (the old version), though it's not pushed live yet. I may tune the gradient and text color.

image.png (158×332 px, 22 KB)

It works by using JavaScript to replace the anchor (link) tag inside the portlet with a span that just says "View (0)", along with CSS to modify the appearance of the portlet and text.

Since each skin styles portlet links differently, I'll have to come up with the CSS for the other skins we plan to support, which I assume is at least Vector Legacy, Vector 2022, and Timeless.

This has been launched for Vector Legacy, Vector 2022, and Timeless.

Vector Legacy:

Screen Shot 2022-10-02 at 11.00.24 PM.png (154×356 px, 14 KB)

Vector 2022:

Screen Shot 2022-10-02 at 11.00.29 PM.png (190×342 px, 16 KB)

Timeless:

Screen Shot 2022-10-02 at 11.00.36 PM.png (134×512 px, 34 KB)

SuperHamster moved this task from In Progress to Done on the View-it! board.