Fix navigation regressions
ClosedPublic

Authored by cblack on Apr 16 2020, 4:06 PM.

Details

Summary

This patch fixes navigation regressions caused by larger cards in the gallery.

  • Keyboard focus is properly handled
  • Cards collapse to a smaller form when a second page is present
  • A home button is present to allow returning to the large-form cards
Test Plan

Diff Detail

Repository
R1014 Kirigami Gallery
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cblack created this revision.Apr 16 2020, 4:06 PM
Restricted Application added projects: Plasma, Kirigami. · View Herald TranscriptApr 16 2020, 4:06 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
cblack requested review of this revision.Apr 16 2020, 4:06 PM
cblack edited the test plan for this revision. (Show Details)Apr 16 2020, 4:07 PM
cblack edited the summary of this revision. (Show Details)

Hmm, now the cards collapse into weird pseudo-list-items in the sidebar. Could they just go back to using real list items instead?

Hmm, now the cards collapse into weird pseudo-list-items in the sidebar. Could they just go back to using real list items instead?

That's what I initially attempted, but non-deterministic behaviour was caused by swapping out a list of cards for a list of listitems.

I can understand that there are technical challenges, but, not to put too fine a point on it, this doesn't look very good:

ndavis added a subscriber: ndavis.EditedApr 16 2020, 8:24 PM

Hmm, now the cards collapse into weird pseudo-list-items in the sidebar. Could they just go back to using real list items instead?

That's what I initially attempted, but non-deterministic behaviour was caused by swapping out a list of cards for a list of listitems.

Could you be more specific?

mart added a subscriber: mart.Apr 20 2020, 4:29 PM

if there can't be a super smooth transition between a listview and this thing (perhaps with a stackview, but i'm not sold) then there should always be just the cardlayout with the same cards look, just as a single column

mart added a comment.Apr 20 2020, 4:33 PM

btw may be worth trying to have a stackview that switches between this view and the one before based on page with (wideMode property of pagerow)

cblack updated this revision to Diff 80822.Apr 22 2020, 12:55 AM

Switch between ListView and CardsLayout

Close. There's extra spacing on the right for some reason, and I think the sidebar's background used to be white.

cblack updated this revision to Diff 81127.Apr 24 2020, 6:31 PM

Adjust listview

cblack updated this revision to Diff 81129.Apr 24 2020, 6:38 PM

Swap collapsed header and image

Much nicer! There appear to be issues with the left margin and the color of the search field's toolbar background though:

Also the text in the cards seems a too large to me. Maybe go down to a level 2 or 3 heading?

cblack updated this revision to Diff 81130.Apr 24 2020, 7:05 PM

Address feedback

Much better. But the left corners of the cards aren't rounded.

cblack updated this revision to Diff 81132.Apr 24 2020, 7:51 PM

Add left margin to image

That works, but wouldn't it be nicer if the border of the card just clipped the image?

Also I just noticed that Sidebar Drawer view is a mess.

This needs to be rebased

cblack updated this revision to Diff 81713.May 1 2020, 10:58 PM

Use normal list delegates

ndavis accepted this revision.May 1 2020, 11:08 PM
This revision is now accepted and ready to land.May 1 2020, 11:08 PM

Thanks, this fixes the navigation issue after a page has been selected. The main grid view is still annoying though.

mart accepted this revision.May 4 2020, 12:05 PM
This revision was automatically updated to reflect the committed changes.