Skip to content

Conversation

@gabrielcaires
Copy link
Contributor

@gabrielcaires gabrielcaires commented Jan 8, 2026

Proposed Changes

  • Remove conditional sidebar rendering and references
  • Remove the code duplications to handle tracking.

Why are these changes being made?

  • Reviewing the reader sidebar code, I saw we are conditionally rendering the GlobalSidebar or the layout/sidebar based on the this flag, and the method that calculates this flag is always returning true for any reader page, so the logic and the component references were useless.

Testing Instructions

  • Go to /reader
  • Check if there is no visual change, comparing with the production version; no visual change is expected
  • Click on any link, check that a tracking event is triggered.

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 tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • 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)?

@gabrielcaires gabrielcaires changed the title Reader: Initial clean up Reader: Remove references from unused components Jan 8, 2026
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/cleanup-sidebar on your sandbox.

@matticbot
Copy link
Contributor

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

Async-loaded Components (~109 bytes removed 📉 [gzipped])

Details
name                               parsed_size           gzip_size
async-load-calypso-reader-sidebar      -1158 B  (-1.1%)     -109 B  (-0.3%)

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.

@gabrielcaires gabrielcaires marked this pull request as ready for review January 8, 2026 11:21
@gabrielcaires gabrielcaires requested a review from a team as a code owner January 8, 2026 11:21
@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 Jan 8, 2026
@gabrielcaires gabrielcaires requested review from a team and removed request for a team January 12, 2026 16:00
@gabrielcaires gabrielcaires changed the title Reader: Remove references from unused components Reader: Remove unused code from sidebar Jan 12, 2026
Copy link
Member

@mehmoodak mehmoodak left a comment

Choose a reason for hiding this comment

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

Changes looks good.

@gabrielcaires gabrielcaires merged commit a988d6f into trunk Jan 16, 2026
19 of 20 checks passed
@gabrielcaires gabrielcaires deleted the update/cleanup-sidebar branch January 16, 2026 13:47
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 16, 2026
heydemoura pushed a commit that referenced this pull request Jan 18, 2026
* Remove unused old sidebar

* Remove duplicated methods
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.

4 participants