-
Notifications
You must be signed in to change notification settings - Fork 4.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
Allow clicking the site editor frame to enter edit mode #47676
Conversation
@@ -158,3 +158,7 @@ | |||
box-shadow: inset 0 0 0 2px var(--wp-admin-theme-color); | |||
} | |||
} | |||
|
|||
.edit-site-visual-editor__editor-canvas.is-canvas-view { | |||
cursor: pointer; |
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.
For some reason, I don't see the cursor changing, I'm not sure I understand the reason. @jasmussen any idea?
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.
Designwise this feels like the right direction.
Size Change: +50 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Yeah, this is what I tried with my style above but it's not working, I'm not sure exactly why. |
Not a code review: I think this is an improvement. It feels intuitive to click on the canvas. |
Flaky tests detected in 447b311. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4074231550
|
Looks like the iframe element don't support "cursor". You need to apply the style within the iframe which is harder :). @carolinan After speaking with Joen, I think they have some design tweaks in the works that go into this direction. |
Yeah the feedback around the edit button has been sufficient enough that it might be worth reconsidering it. One idea is to show an edit button next to each template, which could make much more sense. I hope one from the group can share a mockup to that effect soon! |
Turns out adding the cursor is not an easy task here and have some big implications, I'm going to leave this separate for now. The current PR will do. |
That's fine — as noted, I believe we will want to add edit buttons in context of each page or template instead of having a singular edit button at the top. In that vein, clicking the big site preview is more of an added secondary affordance. |
We can figure it out alongside the cursor, but a hover effect might be nice. One other thought, now that the frame acts as one big button, does the scrollability seem a bit unexpected? |
I think it's valuable to have, and it could even be an argumet for keeping the default cursor. A snackbar-esque tooltip could inform of the ability to click or even double click. Main point being, scrolling it is useful for the preview aspect, and clicking to edit can hopefully become a secondary thing next to explicit edit buttons in context of pages and templates. |
b389d3e
to
447b311
Compare
I just cherry-picked this PR to the release/15.1 branch to get it included in the next release: 228c2de |
Great! Thank you! This will be helpful! |
Related to #36667
What?
This PR simplifies the flows in the site editor by allowing users to click the "frame" to enter edit mode.
Testing Instructions
1- Open the site editor.
2- you should be able to tab and click the frame or just click using the mouse to enter edit mode.