-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[GlobalStep] Non-functional edit button present when viewing own site. #13314
Comments
This is a tricky case. In the past, we disabled the edit icon as a stopgap because admin area links, including the editor as well as some other areas of WP Admin, weren't working well within Webviews (the view that opens when you tap 'View Site') and causing quite a bit of confusion for people using the app. That said, there is an issue at #12074 requesting to make that Edit link open the editor within the app if possible and I'd like to close this in favor of that request. Thank you! |
Re-opening because I talked it out with my team and the edit link should either be removed completely if it's non-functional or we should make the link work and open the editor within the app as requested at #12074. |
@jeherve I think this might be a regression of Automattic/jetpack#12867 and I noticed you were the code reviewer on that issue. Is there any chance you can help us out in getting this re-checked and fixed so that we don't have a non-functional edit link in Webviews in the mobile apps? (internal reference: p77Llu-ccd-p2) |
I tested this in Safari on iPhone 6S iOS 13.3 and found that "Edit" appears next to the icon as a clickable link and the icon is also there but is not clickable. It seems like the edit link got removed (as intended) but the icon got left behind and the icon isn't clickable on the web or in the mobile app Webviews. |
Fixes wordpress-mobile/WordPress-iOS#13314 This issue was introduced in #12867. The original goal of this change was to to hide the Edit Post link whenever you would access your site via the mobile app's in-app browser. To hide the Edit Post link, we originally opted to hook into the edit_post_link filter. While this works, it only changes the string returned for the Edit Post link itself. It does not account for any "before" or "after" parameters that may be passed when calling the edit_post_link function; those are not part of the filter: https://github.com/WordPress/WordPress/blob/001ffe81fbec4438a9f594f330e18103d21fbcd7/wp-includes/link-template.php#L1439 Instead, let's shortcircuit that link earlier, by hooking into the get_edit_post_link filter. If that filter is set to return an empty string, the edit_post_link function will return early: https://github.com/WordPress/WordPress/blob/001ffe81fbec4438a9f594f330e18103d21fbcd7/wp-includes/link-template.php#L1420
@designsimply I can't seem to be able to reproduce your issue on my end (on Android). I don't have an iOS device to test I'm afraid. The PR you linked to above aimed to remove the Edit link, but only when viewing the site via the in-app browser. It does appear to work still: Edit link visible when viewing the post in Chrome Edit link is gone when viewing the same post via the in-app browser Looking at your screenshot above, I don't see the toolbars added by the in-app browser. Were you accessing your site in the browser instead?
I believe this may be because your theme uses the Twenty Nineteen, for example, does this: I've just pushed this PR to try to work around this when themes do that: |
My screenshot was comparing Safari (to note the difference). I've updated the original issue to show the Webview screenshot inline. For reference, I believe the site in the screenshot is from I reviewed the PR workaround for both Jetpack and WP.com and both LGTM! ❤️ Thank you @jeherve! |
Fixes wordpress-mobile/WordPress-iOS#13314 This issue was introduced in #12867. The original goal of this change was to to hide the Edit Post link whenever you would access your site via the mobile app's in-app browser. To hide the Edit Post link, we originally opted to hook into the edit_post_link filter. While this works, it only changes the string returned for the Edit Post link itself. It does not account for any "before" or "after" parameters that may be passed when calling the edit_post_link function; those are not part of the filter: https://github.com/WordPress/WordPress/blob/001ffe81fbec4438a9f594f330e18103d21fbcd7/wp-includes/link-template.php#L1439 Instead, let's shortcircuit that link earlier, by hooking into the get_edit_post_link filter. If that filter is set to return an empty string, the edit_post_link function will return early: https://github.com/WordPress/WordPress/blob/001ffe81fbec4438a9f594f330e18103d21fbcd7/wp-includes/link-template.php#L1420
Description
If the user chooses to view their own site, each post within it will have a footer with information such as the author name, and the data published. The last part of the footer will be an edit icon with no text. Tapping this icon has no function.
On web the edit icon is present with the text “Edit” next to it. Tapping this text will allow the user to edit that post.
Reproduction Rate
4/4 100%
Expected behavior
Either the edit button should be function when tapped, or having matching text “edit” which allows the user to edit their post.
Or the edit button should be removed as the functional text link is not present on mobile.
Actual behavior
An edit icon is present with no function.
Steps to reproduce the behavior
Tested on
iPhone XS (12.3.1)
iOS - Edit Icon.zip
Submitted By:
Alex Wood
The text was updated successfully, but these errors were encountered: