#54407 closed defect (bug) (fixed)
Move CSS code that hides visibility and status for wp_navigation type posts from Gutenberg to Core
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Editor | Keywords: | has-patch has-testing-info commit |
Focuses: | ui | Cc: |
Description
The Gutenberg plugin currently contains CSS code that hides visibility and status for wp_navigation type posts. If and when the Gutenberg plugin is merged to Core, we need to move that CSS code from "gutenberg_hide_visibility_and_status_for_navigation_posts" function to the wp-admin/css/edit.css.
Attachments (2)
Change History (19)
#2
@
19 months ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 5.9
The Gutenberg plugin is forced to use CSS to do this but there's no such limitation in Core.
We should fix this by modifying wp-admin/includes/meta-boxes.php
. Either by hardcoding a check for wp_navigation
, or, ideally, by adding two new hooks which wp-includes/defalt-filters.php
uses similarly to _disable_block_editor_for_navigation_post_type
.
#3
@
18 months ago
Hey @antonvlasenko, what's the status of this ticket? Could it be ready for Beta 1?
#4
@
18 months ago
@hellofromTonya I should be able to create a PR in 30-60 minutes or so.
But I'm not sure if we should add new hooks as proposed here.
Most likely, we will disable UI (show_ui option) for wp_navigation posts in the future. These hooks will become unused.
cc @noisysocks
This ticket was mentioned in PR #1980 on WordPress/wordpress-develop by anton-vlasenko.
18 months ago
#5
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/54407
#6
@
18 months ago
- Focuses ui added
- Version set to trunk
Steps to test this PR:
- Activate Twenty Twenty-Two theme.
- Go to Appearance -> Navigation Menus.
- Click Add New button.
- Make sure you can't edit visibility and status settings (they should be hidden).
This ticket was mentioned in Slack in #core-test by hellofromtonya. View the logs.
18 months ago
#9
@
18 months ago
Test Report
Env
- WordPress 5.9-alpha-51272-src
- Chrome 96.0.4664.45
- WSL2
- Theme: Twenty Twenty Two
- Gutenberg Editor
- Plugin: None activated
Steps to test
- Activate Twenty Twenty-Two theme.
- Go to Appearance -> Navigation Menus.
- Click Add New button.
- Make sure you can't edit visibility and status settings (they should be hidden).
Results
Before PR 1980: The visibility and status settings are available and can be edited. ❌
After PR 1980: The visibility and status settings are hidden and can't be edited. ✅
Notes
After creating a Navigation Menu and navigating to /edit.php?post_type=wp_navigation
, it is possible to edit the Status
by clicking Quick Edit
.
Pinging @antonvlasenko for an update as this was to be raised as an issue in the GB repo and would be worthwhile to have as part of this PR.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
18 months ago
#12
@
18 months ago
- Keywords reporter-feedback removed
As we (@costdev and I) agreed, I've committed @costdev's fix.
So https://core.trac.wordpress.org/ticket/54407#comment:9 should be fixed now.
#13
@
18 months ago
Test Report 2
Env
- WordPress 5.9-alpha-51272-src
- Chrome 96.0.4664.45
- WSL2
- Theme: Twenty Twenty Two
- Gutenberg Editor
- Plugin: None activated
Steps to test
- Activate Twenty Twenty-Two theme.
- Go to Appearance -> Navigation Menus.
- Add a new Navigation Menu.
- Navigate to Appearance -> Navigation Menus.
- Click Quick Edit.
- Make sure you can't edit the Status setting.
Results
Before PR 1980: The Status setting is available and can be edited. ❌
After PR 1980: The Status setting is hidden and can't be edited. ✅
#15
@
18 months ago
- Owner set to hellofromTonya
- Resolution set to fixed
- Status changed from new to closed
In 52293:
hellofromtonya commented on PR #1980:
18 months ago
#16
Committed via https://core.trac.wordpress.org/changeset/52293.
#17
@
18 months ago
Most likely, we will disable UI (show_ui option) for wp_navigation posts in the future.
Yes I think we should do this. There's a ticket here: https://github.com/WordPress/gutenberg/issues/36589
GH issue: https://github.com/WordPress/gutenberg/issues/36309
GH PR related to this ticket: https://github.com/WordPress/gutenberg/pull/36363