Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Site Design Revamp] Main View - remove filtering and action buttons #18506

Merged

Conversation

twstokes
Copy link
Contributor

@twstokes twstokes commented May 4, 2022

This PR aims to resolve:

Before

Portrait Landscape
Simulator Screen Shot - iPhone 13 - 2022-05-03 at 14 35 16 Simulator Screen Shot - iPhone 13 - 2022-05-03 at 14 35 25

After

Portrait Landscape
Simulator Screen Shot - iPhone 13 - 2022-05-03 at 14 32 25 Simulator Screen Shot - iPhone 13 - 2022-05-03 at 14 36 26
iPad Portrait iPad Landscape
Simulator Screen Shot - iPad (9th generation) - 2022-05-03 at 20 43 24 Simulator Screen Shot - iPad (9th generation) - 2022-05-03 at 20 43 31

Animated Border

Simulator.Screen.Recording.-.iPhone.13.-.2022-05-04.at.15.19.39.mp4

Observations:

  1. The gray separator no longer appears between the title and the collection. This matches the designs for the project.
  2. Extra spacing between the title and the collection. We should consider tightening the design after (or while) implementing [Site Design Revamp] Main View - Add recommended designs section #18434.
  3. In landscape the collapsed title isn't shown in the nav bar. This is a known issue.
Change Design

Testing

No filter bar

  1. Start the Site Creation flow
  2. On the Design Screen, expect that there is no filter bar at the top

No action buttons appear upon design selection

  1. Start the Site Creation flow
  2. On the Design Screen, tap a design
  3. Expect that the design is shown in a Preview modal view

Only the border is shown around a selected design thumbnail when tapping

  1. Start the Site Creation flow
  2. Tap on a design
  3. Expect that a border is shown around the design
  4. Expect that no checkmark is shown
  5. Expect that when dismissing the preview, the border disappears (the design is no longer selected)

Page creation isn't affected

  1. From the My Site view, tap the FAB button (blue circle at the bottom right)
  2. Tap "Site page"
  3. Expect a filter bar
  4. Tap one or more categories on the filter bar and expect the page designs to be filtered
  5. Expect that the primary action button at the bottom says "Create Blank Page"
  6. Tap a design
  7. Expect the action buttons at the bottom to now be "Preview" and "Create Page"
  8. Expect that the selected design has a checkmark and border

Regression Notes

  1. Potential unintended areas of impact

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

  3. What automated tests I added (or what prevented me from doing so)

    • None as this altered the view and not much logic.

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@twstokes twstokes added this to the 19.9 milestone May 4, 2022
@twstokes twstokes self-assigned this May 4, 2022
@twstokes twstokes changed the base branch from trunk to feature/site-design-revamp May 4, 2022 01:08
@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 4, 2022

You can test the changes in WordPress from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr18506-d17c426 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

primaryActionTitle: createsSite ? TextContent.createSiteButton : TextContent.chooseButton,
secondaryActionTitle: TextContent.previewButton
// the primary action button is never shown
primaryActionTitle: ""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only part where CollapsableHeaderViewController didn't quite support what we needed. We'll never show a primary action, so there's no need for us to supply a title.

@twstokes twstokes marked this pull request as ready for review May 4, 2022 01:56
@twstokes twstokes requested review from a team and Gio2018 May 4, 2022 01:56
@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 4, 2022

You can test the changes in Jetpack from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr18506-d17c426 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@twstokes twstokes changed the title [Site Design Revamp] Main view - remove filtering and action buttons [Site Design Revamp] Main View - remove filtering and action buttons May 4, 2022
Copy link
Contributor

@Gio2018 Gio2018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @twstokes , the test cases work. I left one code comment, and have one observation:
when selecting a design from the design picker, there is no feedback to the user that they have actually selected that design. This is not totally desirable, but can also be addressed in a future PR. If we do so, we should add it here as a known issue.

return sections[sectionIndex].designs[position]
var selectedPreviewDevice: PreviewDevice {
get { .mobile }
set { /* no op */ }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if set does nothing, can we just

var selectedPreviewDevice: PreviewDevice {
        .mobile
}

Copy link
Contributor Author

@twstokes twstokes May 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I'll get this fixed. This was left over from being a subclass of FilterableCategoriesViewController which required a setter. 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I see 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be resolved with this commit.

@twstokes
Copy link
Contributor Author

twstokes commented May 4, 2022

when selecting a design from the design picker, there is no feedback to the user that they have actually selected that design

Just to make sure I follow @Gio2018 - are we referring to the time between tapping a design and the preview modal appearing? I agree that we could improve that by adding some sort of animation, though I don't find it super critical since the user will be aware of what they selected after shortly after tapping (assuming the web demo loads!).

Side note: When testing this I found a small bug.

  1. Tap a design, showing the preview
  2. Close the preview
  3. Tap the same design
  4. Nothing happens
  5. Tap the same design again
  6. Preview is shown

It's requiring an extra tap to invisibly "deselect" before firing didSelectItemAt again. I'll get this touched up as well.

@Gio2018
Copy link
Contributor

Gio2018 commented May 4, 2022

are we referring to the time between tapping a design and the preview modal appearing?

Yes that's what I was referring to. It isn't super critical and we don't need to block this PR for it, but we should add that improvement at some point, I think.

@twstokes
Copy link
Contributor Author

twstokes commented May 4, 2022

are we referring to the time between tapping a design and the preview modal appearing?

Yes that's what I was referring to. It isn't super critical and we don't need to block this PR for it, but we should add that improvement at some point, I think.

Ok sounds good - I agree. 👍

…d remove the selection when dismissing the preview view.
@twstokes
Copy link
Contributor Author

twstokes commented May 4, 2022

The latest commits should address the following:

  • selectedPreviewDevice is now a constant in SiteDesignContentCollectionViewController
  • When selecting a design from the Site Design view, a border is shown until its preview is dismissed

I tested for regressions in the Page Design view and didn't find any, though you may notice a slight flicker of the border:

  1. Open the Page Design picker
  2. Tap a design
  3. Tap Preview
  4. Pop the Preview
  5. Observe the border around the picked design - it will flicker

I've confirmed this behavior predates this PR. 😅

@twstokes twstokes requested a review from Gio2018 May 4, 2022 19:17
@twstokes
Copy link
Contributor Author

twstokes commented May 4, 2022

I've discovered two more issues that will need fixing before this is reviewed, sorry about that.

  • Tests are broken with my latest commits
  • There's an issue where the UITableView in SiteDesignContentCollectionViewController is being told to layout views before they're in the view hierarchy due to fetchDesigns() and the isLoading setter

@twstokes
Copy link
Contributor Author

twstokes commented May 4, 2022

I've discovered two more issues that will need fixing before this is reviewed, sorry about that.

  • Tests are broken with my latest commits
  • There's an issue where the UITableView in SiteDesignContentCollectionViewController is being told to layout views before they're in the view hierarchy due to fetchDesigns() and the isLoading setter

Looks like the UITableView issue has been around a while and predates this PR, so I'll file an issue. 😬 Tests should be fixed - now that selectedPreviewDevice is a constant we were able to remove the "broken" test entirely. 🎉

This is ready for re-re-review. 🙇

@twstokes
Copy link
Contributor Author

twstokes commented May 4, 2022

Looks like the UITableView issue has been around a while and predates this PR, so I'll file an issue. 😬

Issue filed.

Copy link
Contributor

@Gio2018 Gio2018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: !

@twstokes twstokes merged commit 48ac178 into feature/site-design-revamp May 5, 2022
@twstokes twstokes deleted the task/site-design-remove-buttons-filtering branch May 5, 2022 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants