Skip to content

Settings UI: when globally disabling an archive type, uncheck show in search results toggle#19325

Merged
pls78 merged 11 commits intotrunkfrom
DUPP-814-settings-ui-when-globally-disabling-an-archive-type-uncheck-show-in-search-results-toggle
Dec 2, 2022
Merged

Settings UI: when globally disabling an archive type, uncheck show in search results toggle#19325
pls78 merged 11 commits intotrunkfrom
DUPP-814-settings-ui-when-globally-disabling-an-archive-type-uncheck-show-in-search-results-toggle

Conversation

@igorschoester
Copy link
Copy Markdown
Contributor

@igorschoester igorschoester commented Dec 1, 2022

Context

  • When globally disabling an archive type, uncheck show in search results toggle. This looks like the following in author archives:
    toggle-show-as-unchecked
  • We do this to visually show to the user the other archives are not shown in the search results either.

Summary

This PR can be summarized in the following changelog entry:

  • Improves the Settings UI archives and media pages under advanced by showing the "show in search results" as off when the whole feature is disabled.
  • Renames the "Formats" page title to "Format archives", for consistency.

Relevant technical choices:

  • Solved with a ternary as override checked prop. Checked means it is only visual (not the value). Ternary to only impact it when the overal value is disabled.
  • Renamed the media route to media-pages for consistency.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Affected pages: Author archives, date archives, format archives and media pages

  • Go to the Settings UI > Advanced > One of the above pages
  • Turn ON the first "Enable ..." toggle.
  • Turn ON the "Show ... in search results" toggle.
    • If on author archives: enable the "Show author archives without posts in search results" toggle.
  • Turn OFF the first "Enable ..." toggle.
  • Verify the "Show ... in search results" toggle is shown as OFF.
    • If on author archives: verify the "Show author archives without posts in search results" toggle is shown as OFF.

Verify the toggle keeps its original value

  • Turn ON the first "Enable ..." toggle.
  • Turn OFF the "Show ... in search results" toggle.
  • Turn OFF the first "Enable ..." toggle.
  • Verify the "Show ... in search results" toggle is shown as OFF.
    • If on author archives: verify the "Show author archives without posts in search results" toggle is shown as OFF.
  • Turn ON the first "Enable ..." toggle.
  • Verify the "Show ... in search results" toggle is still OFF. This is due to the actual value.

Replacement variable editor API isDisabled to disabled

Quick sanity check could be performed:

  • When disabling settings like the "Enable ..." toggle in Author archives, the replacement variable editors should still be disabled and not respond to clicks etc.

Format archives rename

  • Verify the format archives page title is now Format archives.

Media pages

Quick sanity check could be peformed:

  • Verify the Media pages can still be visited (renamed the route/URL from media to media-pages).

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Block/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

  • Impacts the Settings UI:
    • Specified pages in the test instructions.
    • Disabling of the replacement variable editors in the Settings UI. I.

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unit tests to verify the code works as intended
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label and noted the work hours.

Fixes https://yoast.atlassian.net/browse/DUPP-814

@igorschoester igorschoester added innovation Innovative issue. Relating to performance, memory or data-flow. changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog labels Dec 1, 2022
@igorschoester igorschoester force-pushed the DUPP-814-settings-ui-when-globally-disabling-an-archive-type-uncheck-show-in-search-results-toggle branch from 69ff6e9 to fb1e0fe Compare December 1, 2022 17:40
@igorschoester igorschoester marked this pull request as ready for review December 1, 2022 17:47
@pls78 pls78 added this to the 19.13 milestone Dec 2, 2022
@pls78
Copy link
Copy Markdown
Member

pls78 commented Dec 2, 2022

CR && ACC: ✅

@pls78 pls78 merged commit 68ff41a into trunk Dec 2, 2022
@pls78 pls78 deleted the DUPP-814-settings-ui-when-globally-disabling-an-archive-type-uncheck-show-in-search-results-toggle branch December 2, 2022 11:34
@enricobattocchi enricobattocchi modified the milestones: 19.13, 19.14 Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog innovation Innovative issue. Relating to performance, memory or data-flow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants