-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add link to reader profile on /me page #99064
base: trunk
Are you sure you want to change the base?
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
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 |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~196 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small comment below wrt the link staying in the same environment, but this looks good and works for me.
client/me/profile/index.jsx
Outdated
a: <a href={ profileUrl }></a>, | ||
url: <>{ profileUrl }</>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think using the https://wordpress.com
bit in the visible URL makes sense for the users perception. But for the anchor href i might simply go with /read/users/${username}
, that way if we are doing a walkthrough or testing on a testing environment like horizon, calypso.live, or localhost, the link moves us to the profile but keeps us in the same environment (instead of pushing us back to production).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! That's been updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks and works great. Nicely done.
client/me/profile/index.jsx
Outdated
@@ -40,6 +40,11 @@ class Profile extends Component { | |||
}; | |||
|
|||
render() { | |||
// We want to use a relative URL so we can test effectively in each | |||
// environement, but show the absolute URL in the UI for end users. | |||
const relativeProfileUrl = `/read/users/${ this.props.user.username }`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const relativeProfileUrl = `/read/users/${ this.props.user.username }`; | |
const relativeProfileUrl = getUserProfileUrl( this.props.user.username ); |
Related to #99015
Additional context here: p1738106541068789-slack-C083J8DHLLD
Proposed Changes
Adds a link and description to the reader profile on the /me page.
Why are these changes being made?
We'd like to provide an easily accessible link to users so they can see their reader user profiles.
Testing Instructions
Pre-merge Checklist