Skip to content
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

Pattern Creator: Only show applicable options & preferences #192

Closed
ryelle opened this issue Jun 17, 2021 · 7 comments
Closed

Pattern Creator: Only show applicable options & preferences #192

ryelle opened this issue Jun 17, 2021 · 7 comments
Labels
[Component] Pattern Creator Anything related to the pattern front end editor or preview

Comments

@ryelle
Copy link
Contributor

ryelle commented Jun 17, 2021

Pulling from #97, where the convo has slightly derailed the PR.

We should also look into replacing the Options menu entirely, since about half the menu should not be available to pattern authors.

Screen Shot 2021-06-14 at 5 33 53 PM

@ryelle ryelle added the [Component] Pattern Creator Anything related to the pattern front end editor or preview label Jun 17, 2021
@ryelle ryelle added this to the Initial Launch milestone Jun 17, 2021
@ryelle
Copy link
Contributor Author

ryelle commented Jun 17, 2021

@StevenDufresne said:

I'm seeing both welcome guides on the page now, so I think we need a way to disable the core one. Could you toggle it off as soon as the page loads?

Yes, added.

We should also look into replacing the Options menu entirely, since about half the menu should not be available to pattern authors.

I was able to remove the Tools section but we won't be able to replace the Preferences section.

What features are left that can't be supported? The preferences appear to be pretty timid and still more or less applicable?

@ryelle
Copy link
Contributor Author

ryelle commented Jun 17, 2021

@shaunandrews said:

The preferences appear to be pretty timid and still more or less applicable?

Some of them are probably fine to keep, but others need to be removed.

The pre-publish checklist is being replaced with our modal, so this option will need to go.

image

The whole Panels section will probably need to go, too. There's a blank setting, and the Template setting doesn't actually appear. The Custom fields option is broken, but also seems unrelated to the pattern editor.

image

--

As for the tools section of the menu, I think some of these could be helpful. Keyboard Shortcuts, Copy All Content, and Welcome Guide (our variant in the issue) should probably remain available. I could see Help being updated to point to a relevant support page.

image

@ryelle
Copy link
Contributor Author

ryelle commented Jun 17, 2021

@ryelle said:

We'd need to replace the welcome guide to make it work with ours, otherwise it will toggle the core one. Same with Help, we probably can't control that link. We could add a new list with our own menu items though.

@ryelle
Copy link
Contributor Author

ryelle commented Jun 17, 2021

@StevenDufresne said:

We'd need to replace the welcome guide to make it work with ours, otherwise it will toggle the core one. Same with Help, we probably can't control that link. We could add a new list with our own menu items though.

Correct. All the Tools items get removed at the same time. There aren't any ways to turn them off selectively... at least in a respectable manner.

Additionally, there isn't a way to turn off specific toggles in the Preferences modal... even with CSS. In my opinion, the publish toggle that would skirt our modal confirmation dialog is not a big deal since we force it off on load and that publish panel should still work anyway. If they click that toggle on, a user has specifically requested that flow and we'll need to make sure that flow works or at least runs validation properly because an astute developer could always turn that flow back on programmatically.

Regarding the empty and template panels, those can be removed (the empty one is weird.. hmmm). Custom fields are not a great feature to keep but are non-breaking.

Now I'm obviously taking the position that we can work with it because there isn't a great way to create our own dropdown. The more menu is only hideable via css and we would have to render a new root component in the menu to have a dropdown and that's not an ideal setup.

I'll hold off until we have a consensus.

@ryelle @shaunandrews Thoughts?

@ryelle
Copy link
Contributor Author

ryelle commented Jun 17, 2021

Personally, I would still hide the whole preferences screen. If we can't control what we keep, I think it would be better to get rid of all of it.

We don't want people turning off the panels in Document Settings, because those are "required" data for patterns. As for custom fields, there are no custom fields that a pattern author would need to add (that aren't handled by other settings).

For the pre-publish flow, I think a dev intentionally adding code to the page to turn it on is rare enough that we can ignore it. It would probably break the submission, not allow invalid submissions (since validation happens at the API). That panel doesn't add anything to the pattern publishing flow, since we have #112, so I wouldn't give users another way to turn it on. Making sure it doesn't break is not a high priority, IMO, but once we're closer to launch you could investigate if you want.

Of the rest of the preferences, I really only think these are useful, but even then I don't think they're required.

  • The Decide what to focus on section, and Spotlight mode is also in the more menu dropdown
  • Appearance > Display button labels
  • Blocks > Contain text cursor inside block

Could we use one of the more menu slots to add our own menu options, and hide the Tools section entirely?

@shaunandrews
Copy link
Collaborator

I'm fine with hiding/removing the Tools and Preferences. Maybe we can look at a way to add/update the keyboard shortcuts, a11y options, and help sometime after 5.8?

@ryelle
Copy link
Contributor Author

ryelle commented Oct 20, 2021

I think this issue is invalid now that we've switched away from the edit-post editor.

@ryelle ryelle closed this as completed Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Pattern Creator Anything related to the pattern front end editor or preview
Projects
None yet
Development

No branches or pull requests

2 participants