Make WordPress Core

Opened 7 years ago

Closed 3 years ago

#40570 closed enhancement (fixed)

Quicktags Toolbar hide if nojs

Reported by: deustron's profile DeusTron Owned by: sabernhardt's profile 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 7 years ago.
wp5.4-quicktags-no-js-firefox.png (32.9 KB) - added by sabernhardt 4 years 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 4 years ago.
hiding the empty toolbar with hide-if-no-js class
40570.diff (523 bytes) - added by sabernhardt 4 years ago.
refreshed patch

Download all attachments as: .zip

Change History (21)

#1 @DeusTron
7 years ago

  • Keywords has-patch added

#2 @DeusTron
7 years ago

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

#3 @DeusTron
7 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

#4 @johnbillion
7 years ago

  • Version trunk deleted

@sabernhardt
4 years ago

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

@sabernhardt
4 years ago

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

@sabernhardt
4 years ago

refreshed patch

#5 @sabernhardt
4 years 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.


4 years ago
#6

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

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

#7 @noisysocks
4 years ago

  • Milestone changed from Awaiting Review to Future Release

#8 @sabernhardt
4 years 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 4 years ago by sabernhardt (next)

#9 @sabernhardt
4 years 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
4 years ago

  • Keywords has-testing-info added

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


3 years ago

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


3 years ago

#13 @Boniu91
3 years ago

Confirmed the patch

#14 @Boniu91
3 years ago

  • Keywords needs-testing removed

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


3 years ago

#16 @poena
3 years ago

  • Keywords commit added

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

#17 @desrosj
3 years 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.