WordPress.org

Make WordPress Core

Opened 2 weeks ago

Last modified 6 hours ago

#42100 assigned task (blessed)

File editor warning copy / UI tweaks

Reported by: helen Owned by: helen
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: Themes Keywords:
Focuses: ui Cc:

Description

Starting fresh as #31779 is rather long. This may involve copy changes, links, and Codex/Handbook writing.

Admin interstitial copy from first commit:

Plugin editor

Heads up!

You appear to be making direct edits to your plugin in the WordPress dashboard. We recommend that you don’t! Editing plugins directly introduce incompatibilities that break your theme or other plugins, and can leave you unable to log back in to WordPress and undo changes.

If you absolutely have to edit this plugin, create copy with a new name and hang on to the original version, so you can re-enable a functional version if something goes wrong.

[I understand]

Theme editor

Heads up!

You appear to be making direct edits to your theme in the WordPress Dashboard. We recommend that you don’t! Editing this code directly is dangerous, and can leave you unable to log back in to WordPress and undo changes. There’s no need to change your CSS here — you can edit and live preview CSS changes in WordPress’s [built in CSS editor](customizer deep link).

If you decide to go ahead with direct edits anyway, make sure to back up all your site’s files before making changes so you can restore a functional version if something goes wrong.

[I understand]

Attachments (2)

42100.diff (5.0 KB) - added by helen 5 days ago.
42100.2.diff (5.4 KB) - added by helen 5 days ago.

Download all attachments as: .zip

Change History (10)

#1 @nic.bertino
2 weeks ago

Two really quick run-throughs and some things to think about. Plugin editor has potentially more severe consequences, so I thought that might be important to stress in the copy.

Also, I would consider changing the action items for theme editing, exposing the CSS editor as a call-to-action instead of an inline link; it would serve to guide the user to the "safer" alternative while still allowing easy access to direct editing for those that want it. I understand this is a dismissible modal, but it may promote discovery of the CSS editor in a more effective way.


Plugin Editor

Heads up!


You are editing a plugin directly in the WordPress dashboard. Making direct edits to plugins can cause unexpected behavior or errors with your theme or other plugins and is not recommended. Adding, editing, or removing code can leave you unable to log back in to undo changes.

If you absolutely have to edit this plugin, create a copy with a new name and hang on to the original version. You will be able to enable the working version if you encounter any issues.

[I understand]

Theme editor

Heads up!


You are editing your theme directly in the WordPress Dashboard. Editing this code directly is dangerous, and can leave you unable to log back in to WordPress and undo changes. Using the CSS Editor is recommended.

If you decide to go ahead with direct edits anyway, make sure to back up your site’s files before making changes so you can restore a functional version if something goes wrong.

[Open CSS Editor] [Continue Editing]

#2 follow-up: @helen
2 weeks ago

Some thoughts:

  • The theme editor should also talk about child themes. This was in Michelle's original text when there was a split between template and CSS files proposed.
  • The text in each about creating a copy/backup probably needs to link off to more docs somewhere, since you can't do that in the admin by default.
  • "break your theme or other plugins" could probably be reduced down to "your site", since that's the effect that's felt.
  • Does anything need to be altered given that the code editors have linting and sandboxing now? That's new since the copy was first written.
  • This needs small screen consideration :)

@helen
5 days ago

#3 @helen
5 days ago

Suggestion that we add a "go back" button, see 42100.diff for that, which also then puts the focus on that button instead. Also fixes one incorrectly capitalized usage of "Dashboard" - should be lowercase as it's referring to the admin as a whole and not specifically the Dashboard screen.

http://s.hyhs.me/n4fI/image.png

@helen
5 days ago

#4 @helen
5 days ago

In 41859:

File editor warning: Add a "Go back" button.

see #42100, #31779.

#5 in reply to: ↑ 2 @melchoyce
2 days ago

Replying to helen:

  • The theme editor should also talk about child themes. This was in Michelle's original text when there was a split between template and CSS files proposed.

Let's cut the text about CSS here, and add it as an additional notice that appears on .css files, like in https://core.trac.wordpress.org/attachment/ticket/31779/WF%20-%20CSS%20Warning.png. Then we can replace that text with some copy about child themes.

  • The text in each about creating a copy/backup probably needs to link off to more docs somewhere, since you can't do that in the admin by default.

Which do you think is better, linking to https://codex.wordpress.org/WordPress_Backups or https://wordpress.org/plugins/search/backups/?

  • "break your theme or other plugins" could probably be reduced down to "your site", since that's the effect that's felt.

👍

  • Does anything need to be altered given that the code editors have linting and sandboxing now? That's new since the copy was first written.

Folks are still able to introduce plugin or theme conflicts, but *hopefully* now you can't whitescreen your site... so we should probably adjust the text to reflect that.

  • This needs small screen consideration :)

Fixed in https://core.trac.wordpress.org/changeset/41854.

This ticket was mentioned in Slack in #core by melchoyce. View the logs.


2 days ago

#7 @jeherve
32 hours ago

Kudos on all the work on this so far. I was wondering if you would be willing to add filters around the 2 messages, so one can customize the 2 warnings' copy in their own environment. It could be useful on sites with multiple admins for example, if the site admin wants to offer other alternatives to those who land in there to edit a file; it could be a link to another plugin like this one, or an invitation to contact a specific person to get your changes in.

#8 @westonruter
6 hours ago

  • Owner set to helen
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.