Make WordPress Core

Opened 8 years ago

Closed 3 years ago

Last modified 3 years ago

#39258 closed enhancement (fixed)

Move bottom of options-permalink.php into Contextual Help

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by: hellofromtonya's profile hellofromTonya
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Permalinks Keywords: good-first-bug has-patch commit
Focuses: administration Cc:

Description

The bottom of options-permalink.php contains a number of tips and links about configuration settings for IIS, Nginx, htaccess, and related variants.

To my eyes, this type of helpful content seems more appropriately located in the contextual help tab in the upper-right corner.

I know those tabs are maybe not frequently trafficked, or maybe aren't the first most obvious place to look, but I don't think that should prevent us from using it for it's intended purpose.

Some of this code dates back several years, likely before (or just after) contextual help was gifted it's current API, so I have a feeling what's here is here because it's been here for so long.

Attachments (3)

Screen Shot 2016-12-12 at 8.32.01 PM.png (108.2 KB) - added by johnjamesjacoby 8 years ago.
39258.diff (2.0 KB) - added by audrasjb 3 years ago.
Permalinks: Move information located at the bottom of options-permalink.php into Contextual Help
39258-apache-nginx-after-patch.png (1.4 MB) - added by hellofromTonya 3 years ago.
Test Report with Apache and NGINX. Works as expected.

Download all attachments as: .zip

Change History (17)

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


3 years ago

#2 @peterwilsoncc
3 years ago

  • Keywords good-first-bug added; 2nd-opinion removed

This ticket was discussed in a triage session today.

I'm inclined to agree that the Nginx link ought to be in the help tab alongside the other support related links.

#3 @mukesh27
3 years ago

  • Milestone changed from Awaiting Review to 5.9

Do we have to use this link https://wordpress.org/support/article/nginx/ or any other link?

Set Milestone for the ticket.

This ticket was mentioned in PR #1534 on WordPress/wordpress-develop by tim-lappe.


3 years ago
#4

  • Keywords has-patch added; needs-patch removed

#5 @audrasjb
3 years ago

  • Keywords needs-refresh added

The proposed PR needs to be refreshed to address some coding standards issues (Expected spaces after opening parenthesis and before closing parenthesis).

@audrasjb
3 years ago

Permalinks: Move information located at the bottom of options-permalink.php into Contextual Help

#6 @audrasjb
3 years ago

  • Keywords needs-refresh removed

#7 @audrasjb
3 years ago

  • Keywords commit added

I believe this ticket is good to go.

@hellofromTonya
3 years ago

Test Report with Apache and NGINX. Works as expected.

#8 @hellofromTonya
3 years ago

Test Report

Environment:

  • Browser: Chrome version 93.0.4577.82 and Firefox version 92.0.1
  • Localhost: Local
  • OS: macOS Big Sur version 11.6
  • WordPress: trunk and 5.8.1

Expected Results

  • The link should not show below the Save button on the Settings > Permalinks page
  • In the Help tab and on the right For more information: sidebar:
    • On an Apache web server, the Documentation on Nginx configuration. link should not appear in the list of links.
    • On an Nginx web server, the Documentation on Nginx configuration. link should appear in the list of links.

Test Instructions

  1. Apply 39258.diff patch
  2. In Local, set the Web Server to Apache and then start the site.
  3. Go to and log into the site's admin area
  4. Go to Settings > Permalinks => Notice the link does not show below the Save button
  5. Click on the "Help" tab in the top right hand side of the screen. This lowers the help area. => Notice the link does not appear in the right sidebar.
  6. In Local, change the Web Server to nginx.
  7. Refresh the Permalinks page => Notice the link does not show below the Save button (it used to show here).
  8. Click on the "Help" tab to reveal the help area. => Notice the link does appear in the right sidebar.

Test Results

  • When Apache, the link does not show below the Save button ✅
  • When Apache, the link does not show in the Help tab's right sidebar ✅
  • When Nginx, the link no longer shows below the Save button ✅
  • When Nginx, the link now shows in the Help tab's right sidebar ✅

All work as expected ✅

#9 @hellofromTonya
3 years ago

  • Owner set to hellofromTonya
  • Status changed from new to reviewing

39258.diff patch works as expected. There are 2 code review items that can be fixed during commit:

  • I'd recommend unsetting the new variable to remove it from the global space (as it's only needed for this specific task):
    get_current_screen()->set_help_sidebar( $help_sidebar_content );
    unset( $help_sidebar_content );
    
  • The change <?php else : is flagged by WPCS as the <?php should be on its own line. The opening tag is redundant with the code above it (also PHP code). However, that pattern is already set. Refactoring it would be out-of-scope for this ticket.

This patch is ready for commit. I'll get it committed shortly.

#10 @hellofromTonya
3 years ago

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

In 51892:

Permalinks: Move the Nginx documentation link to help sidebar in wp-admin/options-permalink.php.

The "Documentation on Nginx configuration." link is out of place being below the "Save Changes" button on the Settings > Permalinks UI.

This commit relocates the link to join the other support related content links in the help tab's "For more information:" right sidebar area.

Follow-up to [34691], [45674].

Props audrasjb, hellofromTonya, johnjamesjacoby, mukesh27, peterwilsoncc, timlappe.
Fixes #39258.

#11 @hellofromTonya
3 years ago

Thank you @audrasjb, @johnjamesjacoby, @mukesh27, @peterwilsoncc, @timlappe for contributing to this enhancement!

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


3 years ago

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


3 years ago

Note: See TracTickets for help on using tickets.