Skip to content

Conversation

@kean
Copy link
Contributor

@kean kean commented Oct 29, 2024

This PR updates the Cross Post cells. I kept the logic largely the same as in the previous design, but updated the insets.

Other changes:

  • Extract ReaderAvatarView
  • Add localization
  • Remove ReaderPostContentProvider. As a result, some fields now became accessible as ObjC properties and the call sites had to be updated too.
  • Remove some of the unused fields from ReaderPost

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)

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.

Testing checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@kean kean added the Reader label Oct 29, 2024
@kean kean added this to the 25.5 milestone Oct 29, 2024
@kean kean requested a review from crazytonyli October 29, 2024 18:59
@dangermattic
Copy link
Collaborator

dangermattic commented Oct 29, 2024

2 Warnings
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
⚠️ This PR is assigned to the milestone 25.5. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 29, 2024

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr23722-7aa6478
Version25.4.2
Bundle IDorg.wordpress.alpha
Commit7aa6478
App Center BuildWPiOS - One-Offs #10926
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 29, 2024

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr23722-7aa6478
Version25.4.2
Bundle IDcom.jetpack.alpha
Commit7aa6478
App Center Buildjetpack-installable-builds #9966
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

return self.isBlogAtomic;
}

- (BOOL)isPrivate
Copy link
Contributor Author

Choose a reason for hiding this comment

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

isBlogPrivate is much clearer.

SourceAttributionStyleSite,
};

@protocol ReaderPostContentProvider <PostContentProvider>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could probably remove PostContentProvider later too.

var loadingStyle = LoadingStyle.background

/// The background color to use when the image is loaded.
var successBackgroundColor = UIColor.clear
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added it in one of the previous PRs and decided to remove it since it's not longer needed. It was replaced by ReaderAvatarView.

@kean kean force-pushed the task/reader-code-removal branch from cc7d242 to 630721f Compare October 30, 2024 12:15
@kean kean force-pushed the task/update-cross-post-cell branch from 14cef9c to 84ea375 Compare October 30, 2024 12:23
attrSubtitle.setAttributes(readerCrossPostBoldSubtitleAttributes, range: NSRange(location: 0, length: authorName.length))
let string = NSMutableAttributedString(string: subtitle, attributes: subtitleAttributes)

string.setAttributes(boldSubtitleAttributes, range: NSRange(location: 0, length: authorName.length))
Copy link
Contributor

Choose a reason for hiding this comment

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

The localized template may not start with authorName.

I'm aware this is not a new change. Feel free to leave it if you don't think that's an issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah good catch. I opted to revert the localization for now to focus on other priorities.

Base automatically changed from task/reader-code-removal to trunk October 30, 2024 22:02
@kean kean force-pushed the task/update-cross-post-cell branch 2 times, most recently from 51b3680 to 959c2d7 Compare October 31, 2024 12:39
@kean kean force-pushed the task/update-cross-post-cell branch from 959c2d7 to 7aa6478 Compare October 31, 2024 12:41
@kean kean enabled auto-merge October 31, 2024 12:42
@kean kean added this pull request to the merge queue Oct 31, 2024
Merged via the queue into trunk with commit 8f42a57 Oct 31, 2024
24 checks passed
@kean kean deleted the task/update-cross-post-cell branch October 31, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants