Skip to content

Conversation

malinajirka
Copy link
Contributor

@malinajirka malinajirka commented Apr 30, 2019

Fixes #9725

Inflate the "toggle posts list item view layout" button on the post list screen from the xml instead of adding the button dynamically using Kotlin.

To test:

  1. My Site
  2. Blog Posts
  3. Click on the "toggle rows view" button -> the compact version of the post list items is displayed
  4. Go back to My Site
  5. Blog Posts - make sure the compact version of the post list items is still being displayed + the menu icon is in correct state

toggle-compact

Update release notes:

  • There is no need to update the release-notes as the feature hasn't been merged into develop yet

Note - This code was mostly developed by @onepointsixtwo in #9732, but the fork of the repo was deleted before we merged the PR.

@malinajirka malinajirka added this to the 12.4 milestone Apr 30, 2019
@malinajirka malinajirka requested a review from maxme April 30, 2019 14:38
@maxme maxme self-assigned this Apr 30, 2019
@malinajirka malinajirka requested review from shiki and removed request for shiki May 1, 2019 09:45
<string name="posts_draft_empty">You don\'t have any draft posts</string>
<string name="posts_trashed_empty">You don\'t have any binned posts</string>
<string name="multiple_status_label_delimiter" translatable="false">\u0020·\u0020</string>
<string name="post_list_toggle_item_view_layout">toggle rows view</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be nitpicking, but to improve accessibility, should we describe the change instead: "Switch to cards view" and "Switch to list view"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! I'll create another PR for the fix so we don't block the PRs which are dependant on this one. Even though it's a really small change, I'll need to create an UiState for menu item to keep things consistent with other VMs. Does it sounds good?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep sure, time to cascade merge everything :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks;)!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in #9778

@maxme
Copy link
Contributor

maxme commented May 2, 2019

:shipit:

@maxme maxme merged commit d3d4c97 into feature/post-filters-compat-view-toggle May 2, 2019
@maxme maxme deleted the issue/9725-post-list-inflate-xml branch May 2, 2019 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants