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

Follow button - make 'Unsubscribe' the default followed copy. #99943

Conversation

Addison-Stavlo
Copy link
Contributor

@Addison-Stavlo Addison-Stavlo commented Feb 18, 2025

Related to # #98915

Proposed Changes

  • Updates the feed stream header follow button to use "Unsubscribe" as the custom label.
  • Removes a couple redundant uses of followLabel props, since they are passing the same string as the default.

BEFORE
Screenshot 2025-02-18 at 8 50 06 AM

AFTER
Screenshot 2025-02-18 at 8 49 58 AM

Why are these changes being made?

Testing Instructions

  • Go to the reader. The following places are also shown in the Before/After screenshots above.
  • Go to the feed for an individual blog, verify the follow button in the headers followed state says "Unsubscribe"
  • Verify the post card ellipsis menus and discover v2 cards still have the same "Subscribe" label when unsubscribed.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@Addison-Stavlo Addison-Stavlo requested a review from a team as a code owner February 18, 2025 14:06
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 18, 2025
@Addison-Stavlo Addison-Stavlo self-assigned this Feb 18, 2025
@matticbot
Copy link
Contributor

matticbot commented Feb 18, 2025

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~9 bytes removed 📉 [gzipped])

name                             parsed_size           gzip_size
write-flow                             -54 B  (-0.0%)       -9 B  (-0.0%)
reader                                 -54 B  (-0.0%)       -9 B  (-0.0%)
plugins                                -54 B  (-0.0%)       -9 B  (-0.0%)
link-in-bio-tld-flow                   -54 B  (-0.0%)       -9 B  (-0.0%)
jetpack-cloud-plugin-management        -54 B  (-0.0%)       -9 B  (-0.0%)
home                                   -54 B  (-0.0%)       -9 B  (-0.0%)
build-flow                             -54 B  (-0.0%)       -9 B  (-0.0%)
a8c-for-agencies-plugins               -54 B  (-0.0%)       -9 B  (-0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~4 bytes added 📈 [gzipped])

name                                                 parsed_size           gzip_size
async-load-design-blocks                                   -54 B  (-0.0%)       -9 B  (-0.0%)
async-load-calypso-components-web-preview-component        -54 B  (-0.0%)       -9 B  (-0.0%)
async-load-calypso-reader-site-stream                      +32 B  (+0.2%)      +13 B  (+0.2%)
async-load-calypso-reader-feed-stream                      +32 B  (+0.2%)      +13 B  (+0.2%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Contributor

@holdercp holdercp left a comment

Choose a reason for hiding this comment

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

I didn't find any regressions and the toggle is updated:
Screenshot 2025-02-18 at 2 50 33 PM
Screenshot 2025-02-18 at 2 51 28 PM
Screenshot 2025-02-18 at 2 53 15 PM

One question though: I noticed the issue suggested changing the icon to "lineSolid". Was there a reason to keep the icon as is?

@Addison-Stavlo
Copy link
Contributor Author

Addison-Stavlo commented Feb 19, 2025

One question though: I noticed #98915 (comment) suggested changing the icon to "lineSolid". Was there a reason to keep the icon as is?

Ah nice catch, thank you. That will make a bit more sense here i think. I will update this to use that.

@Addison-Stavlo
Copy link
Contributor Author

Im pausing to discuss on the issue: #98915 (comment)

There are a handful of already implemented "Unsubscribe" that don't use the lineSolid icon. And Im really not sure that we would want to update all of these to be - Unsubscribe.

@Addison-Stavlo Addison-Stavlo added [Status] Blocked / Hold and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 19, 2025
@Addison-Stavlo
Copy link
Contributor Author

This has been simplified from its original form. I have updated the PR description and testing instructions.

We are only changing the one button, and removing a couple of the same redundant props we already tested. I will ship this once checks are good.

@Addison-Stavlo Addison-Stavlo merged commit bc6f5dc into trunk Feb 19, 2025
14 checks passed
@Addison-Stavlo Addison-Stavlo deleted the update/reader-subscribe-button-subscribed-copy-to-unsubscribe branch February 19, 2025 14:22
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