WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 months ago

#40570 closed enhancement (fixed)

Quicktags Toolbar hide if nojs

Reported by: DeusTron Owned by: sabernhardt
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch has-testing-info commit
Focuses: ui Cc:

Description

Without javascript it looks better if the quicktags toolbar is hidden.

Attachments (4)

class-wp-editor.diff (524 bytes) - added by DeusTron 4 years ago.
wp5.4-quicktags-no-js-firefox.png (32.9 KB) - added by sabernhardt 17 months ago.
toolbar shown without JavaScript but empty in WordPress 5.4 (Firefox)
wp5.4-quicktags-no-js-hidden-firefox.png (33.1 KB) - added by sabernhardt 17 months ago.
hiding the empty toolbar with hide-if-no-js class
40570.diff (523 bytes) - added by sabernhardt 17 months ago.
refreshed patch

Download all attachments as: .zip

Change History (21)

#1 @DeusTron
4 years ago

  • Keywords has-patch added

#2 @DeusTron
4 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

#3 @DeusTron
4 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

#4 @johnbillion
4 years ago

  • Version trunk deleted

@sabernhardt
17 months ago

toolbar shown without JavaScript but empty in WordPress 5.4 (Firefox)

@sabernhardt
17 months ago

hiding the empty toolbar with hide-if-no-js class

@sabernhardt
17 months ago

refreshed patch

#5 @sabernhardt
17 months ago

  • Component changed from General to Editor
  • Keywords needs-testing added
  • Type changed from feature request to enhancement

Thanks @DeusTron! I refreshed your patch.

Adding the class works, though the editor textbox might be a little too close to the post title box this way.

This ticket was mentioned in PR #263 on WordPress/wordpress-develop by tronsha.


17 months ago

Without javascript it looks better if the quicktags toolbar is hidden.

Trac ticket: https://core.trac.wordpress.org/ticket/40570

#7 @noisysocks
10 months ago

  • Milestone changed from Awaiting Review to Future Release

#8 @sabernhardt
7 months ago

  • Milestone changed from Future Release to 5.8
  • Owner set to sabernhardt
  • Status changed from reopened to accepted

Since version 5.5, it has been possible to hide that container if you uncheck the "Disable the visual editor when writing" checkbox in your profile settings.

https://live.staticflickr.com/65535/50978837213_234457f807_z.jpg

The title input's 3-pixel bottom margin is small for my preference, but my opinion doesn't matter as much because I have JavaScript enabled. 3 pixels is just enough for the :focus outline.

Version 0, edited 7 months ago by sabernhardt (next)

#9 @sabernhardt
7 months ago

Testing setup before applying the PR/patch:

  1. Go to your Profile and check the box for "Disable the visual editor when writing" (if it's not already checked).
  2. With JavaScript disabled and with the Classic Editor activated/enforced, open the post editor.
  3. See the empty container between the title input and the content field.

After applying the fix, verify the container is no longer visible.

#10 @Boniu91
6 months ago

  • Keywords has-testing-info added

This ticket was mentioned in Slack in #core-test by boniu91. View the logs.


5 months ago

This ticket was mentioned in Slack in #core-test by boniu91. View the logs.


5 months ago

#13 @Boniu91
5 months ago

Confirmed the patch

#14 @Boniu91
5 months ago

  • Keywords needs-testing removed

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


4 months ago

#16 @poena
4 months ago

  • Keywords commit added

I have tested the pull request and it works well for me.

#17 @desrosj
4 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 50980:

Editor: Hide the quicktags toolbar when JavaScript is disabled.

This adds the hide-if-no-js class to the quicktags toolbar in the Classic Editor. This prevents an empty space from showing when JavaScript is disabled.

Props DeusTron, sabernhardt, Boniu91, poena.
Fixes #40570.

Note: See TracTickets for help on using tickets.