Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Ensure "Edit Site" option is consistent in both places (top toolbar and floating toolbar) #94079

Open annezazu opened 2 months ago

annezazu commented 2 months ago

Steps to reproduce

  1. Look at the front end of a logged in site with a block theme
  2. Notice there's "edit site" in the floating toolbar and "edit site" in the top toolbar.
  3. Click each and notice they take you different places. Edit site in floating toolbar takes you to the Site Editor > Templates where as "Edit site" in the top toolbar will take you to the respective template you are choosing.

What I expected

Expect the buttons to act the same.

What happened instead

The buttons took me two different places.

Browser / OS version

MacOS, Chrome

Screenshot / Video

https://github.com/user-attachments/assets/e8a947c8-1184-49a2-bd82-5454d71e36de

ramonjd commented 2 months ago

I noticed there's an item from @richtabor to remove the "Edit site" link from the floating action toolbar completely.

It might save adding the logic in Calypso to take you to the respective template you are choosing.

Then again, while testing it, I noticed that canvas=edit is missing from the link.

YOUR_WORDPRESS_COM_SITE/wp-admin/site-editor.php?postType=wp_template&postId=pub%2Fassembler%2F%2Fhome

vs

YOUR_WORDPRESS_COM_SITE/wp-admin/site-editor.php?postType=wp_template&postId=pub%2Fassembler%2F%2Fhome&canvas=edit

The latter will open the editor.

This is a DotCom backend change regardless of which happens. 👍🏻 See

p1725838043966329-slack-C07H21B2W59?thread_ts=1725637696.261559&cid=C07H21B2W59

ramonjd commented 2 months ago

This is a DotCom backend change regardless of which happens.

If we remove the "Edit site" link, I'd assume the "Customize" link should stay for classic themes?

Screenshot 2024-09-09 at 9 26 40 AM
ramonjd commented 1 month ago

I've appended "canvas=edit" to these links so that the editor opens.

https://github.com/user-attachments/assets/afb0068a-62b5-4522-8542-fdfa30530357

D162881-code

ramonjd commented 1 month ago

D162881-code now removes the Edit Site from the toolbar completely

Related issue:

niranjan-uma-shankar commented 1 month ago

Related issue:

ramonjd commented 3 weeks ago

I think this PR is waiting on a redesign. See @mmtr's comments:

That action bar with just an ellipsis button looks quite wrong to me, so I'm moving this back to "Needs design" because I think we need to revisit how the action bar should look like under these circumstances.

D162881-code removes the "Edit Site" link and the result is a lonely ellipsis button. 😄

richtabor commented 1 week ago

I noticed there's an item from @richtabor to remove the "Edit site" link from the floating action toolbar completely.

Yes, let's just remove "Edit site" from the action bar. It's not the same as "Customize" — which is a much more contained environment where it's harder to break your website: https://github.com/Automattic/wp-calypso/issues/95363

There's an argument for removing "Customize" as well, since it's repeated in the admin bar. Shall I propose that in a follow-up?