Reader: Misc changes needed for showing feed preview while adding subscription#101425
Reader: Misc changes needed for showing feed preview while adding subscription#101425
Conversation
…bedNonWpcomFeedItem to ReaderFeedItemRow
…bedNonWpcomFeedItem to ReaderFeedItemRow
…llow-feed-item-subscribe-button-to-unsusbcribe-as-well
…llow-feed-item-subscribe-button-to-unsusbcribe-as-well
…llow-feed-item-subscribe-button-to-unsusbcribe-as-well
…llow-feed-item-subscribe-button-to-unsusbcribe-as-well
…e-as-well' into loop-478/add-unsubscribe-track-event-on-ReaderFeedItem
…onError callbacks
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~705 bytes removed 📉 [gzipped]) DetailsCommon code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~1181 bytes removed 📉 [gzipped]) DetailsSections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~288 bytes added 📈 [gzipped]) DetailsReact 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. Generated by performance advisor bot at iscalypsofastyet.com. |
…and 'Reddit' tab for logged in users
bd77a15 to
a85b321
Compare
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
DustyReagan
left a comment
There was a problem hiding this comment.
Code review:
- ✅ REMOVE: sign up modal because we only show add sites form for logged our users
- ✅ REMOVE: useCallback hooks as it seems unnecessary
- ✅ IMPROVE: url validation on add sites form by allowing urls without HTTP Protocol
- I think this is fine as is, but I wanted to highlight we also have @wordpress/url.
- ✅ IMPROVE: subscribe and unsubscribe mutations by adding onSuccess and onError callbacks
- ✅ UPDATE: logic of showing follow button on discover page.
- ✅ IMPROVE: Makes add sites form inline throughout the app
- ✅ REFACTOR: separate styling of subscriptions row and reader feed item - I'm not sure how to test this, but it looks ok.
- ✅ ADDS: util class to avoid padding on stream - I'm not sure how to test this, but it looks ok.
- ✅ REMOVE: isUserLoggedIn selector because we are only show 'Add New' and 'Reddit' tab for logged in users
Functional test:
- ✅ Go to /reader/subscriptions. verify subscription and unsubscription of site is working fine.
- ✅ Go to /reader/subscriptions. Open "New Subscription" modal. Verify subscription and unsubscription of the site is working fine.
- ✅ Go to /discover/add-new. Verify site can be added successfully.
- ✅ Go to /discover/add-new. Verify feeds can be added successfully.
- ✅ Go to /discover/reddit. Verify reddit feeds can be added successfully.
I was under the impression from the code review that I should no longer need to add a protocol to add a site? However, it looks like the form field (Firefox & Chrome) prevents that.

|
Thanks for the review and thoroughly testing it.
This will be fixed in #101426 |
Related to https://github.com/Automattic/loop/issues/478
Note: It will be helpful to review this PR commit by commit. Now there are lot of commits due to trunk merge so kindly review each commit from the description.
Proposed Changes
I've worked on the Feed Preview PR, which had grown too large so taking out independent changes that can be merged separately.
REMOVE: sign up modal because we only show add sites form for logged our users - no screenshot
REMOVE: useCallback hooks as it seems unnecessary - no screenshot
IMPROVE: url validation on add sites form by allowing urls without HTTP Protocol - no screenshot
IMPROVE: subscribe and unsubscribe mutations by adding onSuccess and onError callbacks
REFACTOR: separate styling of subscriptions row and reader feed item - no screenshot
ADDS: util class to avoid padding on stream - no screenshot
REMOVE: isUserLoggedIn selector because we are only show 'Add New' and 'Reddit' tab for logged in users - no screenshot
Why are these changes being made?
To make the Feed Preview PR smaller.
Testing Instructions
/reader/subscriptions. verify subscription and unsubscription of site is working fine./reader/subscriptions. Open "New Subscription" modal. Verify subscription and unsubscription of the site is working fine./discover/add-new. Verify site can be added successfully./discover/add-new. Verify feeds can be added successfully./discover/reddit. Verify reddit feeds can be added successfully.Pre-merge Checklist