WordPress / classic-editor

A plugin to restore the Classic Editor in WordPress.
https://wordpress.org/plugins/classic-editor/
Other
156 stars 81 forks source link

Test: make the "Open the last editor used..." standard behavior and remove the setting for it #15

Closed azaozz closed 5 years ago

azaozz commented 5 years ago

This will promote the "best behavior" of always using the same editor for each post and simplify the settings UI a bit.

Follow-up from https://github.com/WordPress/classic-editor/issues/9#issuecomment-443489913.

azaozz commented 5 years ago

Added in https://github.com/WordPress/classic-editor/commit/de3213bbb2bc3e471774566e4dd23bc088b81ff6.

Current UI:

settings-admin Admin settings.

settings-user User settings.

posts-lost-table Posts screen (list table).

azaozz commented 5 years ago

Still TBD: currently the additional post state is shown for all posts. Would it be better to show it only for posts that will open in the "other" non-default editor? I.e. if the user selected Block Editor, and some posts were edited in Classic, show "Classic Editor" in the lists-table only for them.

cc: @alexislloyd, @youknowriad, @kwight

youknowriad commented 5 years ago

Just some questions here:

azaozz commented 5 years ago

If the user is not allowed to switch editors, will it still open the post in the "alternative" editor? Seems to me like it should use the "enforced" editor in this case.

Yes, agree it should use the "enforced" editor. Also, when the user is not allowed to switch editors, it doesn't save the editor used for each post (as it cannot be changed).

azaozz commented 5 years ago

Also added in https://github.com/WordPress/classic-editor/commit/1bc87018bb1e576b5a668e3ff0ae00ba639dce9d

It lets other plugins disable editors by post type or by post, and fixes handling of CPTs.

coreymckrill commented 5 years ago

With Default editor set to Block and Allow users to switch set to Yes, the Posts list is showing "Block" for the state of posts that were published via the Classic editor before Gutenberg was installed. Is this the intended behavior?

My expectation was that for legacy posts, the "last editor used" would be the Classic editor.

azaozz commented 5 years ago

@coreymckrill thanks for testing! :)

the Posts list is showing "Block" for the state of posts that were published via the Classic editor before Gutenberg was installed.

Yes, it shows the editor that will be used to edit the post, not the editor that was used before. By default WP opens all older posts in the Gutenberg/Block Editor (when it is set as default or without this plugin). Don't think we should change that, or should we?

We have two options there:

  1. Show "editor state" for all posts. Current behavior.
  2. Show state only for posts which will open in the alternative editor (saved previously or forced by plugins or CPT settings).

There is a third option: show state only for posts where we have saved the editor, but that will be incomplete/confusing as some posts (or post types) will still open in the alternative editor.

I'm still 50/50 on which way is best :) # 1 is really reassuring. The users will always know what will happen before clicking on the edit link. At the same time it is different that the similar feature in Gutenberg. It shows the "previous editor state" there, i.e. posts that were edited with Gutenberg at some point. As far as I understand the "Gutenberg state" is shown to warn the user not to edit posts with blocks in the classic editor. That's not needed here as this plugin will always open posts edited in the Bock Editor with the Block Editor.

The # 2 also looks/works very well. It's not as reassuring as # 1 but is more subtle/toned down as it shows a lot less often. The purpose of showing a "post editor state" changes there a bit. Instead of being a declaration: "This post will be edited in that editor" it becomes more of a warning: "This post will be edited in the alternative editor". In the longer term that's probably better.

What do you think? :)

melchoyce commented 5 years ago

Quick UI note — the yes/no radio options should be vertical, like:

image

azaozz commented 5 years ago

the yes/no radio options should be vertical

Done in https://github.com/WordPress/classic-editor/commit/b75b3bf0ede6a8c5378b62de341abe3bf9f61e9d.

azaozz commented 5 years ago

Latest screenshots: admin-settings

user-settings

block-editor-metabox

classic-editor-metabox

warning

melchoyce commented 5 years ago

In that last screenshot, can you update the margin on the notice to 1em inherit 0;?

azaozz commented 5 years ago

Done in https://github.com/WordPress/classic-editor/commit/8c8e2d47838fb17cdfc4ab9fa36c3f9123d7802c.

luciano-croce commented 5 years ago

@azaozz

I think that the warning message on the "about" page is not appropriate (also the message on the dashboard is not appropriate). I think that another position is better for this message.

For example:

azaozz commented 5 years ago

The "about" page is not immediate for the users, except after the installation or the upgrade.

Exactly. The intention is to warn the users right after they upgrade WordPress and not do "annoyingly repeating" warnings elsewhere.

Not sure why you think that warning may be misleading. Keep in mind that admins can "lock" the editor choice. Then the users won't be able to do anything about it :)

luciano-croce commented 5 years ago

Keep in mind that admins can "lock" the editor choice. Then the users won't be able to do anything about it.

And also the warning disappears?

It's ugly to view...

Is not possible change totally the position, for example completely at the top of the about page?

Also this choice would simplify the code, and all it would be more beautiful to viewing aesthetically...

What do you think about it?

azaozz commented 5 years ago

Do you have a screenshot? :)

luciano-croce commented 5 years ago

I have a screenshot (one moment plese) but not the code...

classic-editor-warning-message-totally-on-top

luciano-croce commented 5 years ago

With appropriate integration and styling the result is more beautiful of this screenshot...

classic-editor-current-warning-message

azaozz commented 5 years ago

Hmm, not sure what's going on there but I see the warning under the title, like in the first screenshot:

warning

(Note that the styling was fixed by melchoice a bit earlier).

This works somewhat "hacky" in WP. The messages are outputted above the title, and then moved below it on page load with jQuery. That's been around forever... Perhaps see if there are any JS errors on that page?

luciano-croce commented 5 years ago

It's just one my idea. I do not have the code for this, in fact. All the tests I've done, have always moved it under the title. Anyway it's just my idea, you decide what is best to do, for me it's okay what you decide.

azaozz commented 5 years ago

All is done. The warning looks good too.