Skip to content

Conversation

matt-bernhardt
Copy link
Member

@matt-bernhardt matt-bernhardt commented Apr 7, 2023

This adjusts two aspects of the News site based on the internal review i conducted after the content import:

  • Removes an unneeded class that would extend the Walker_Nav_Menu class - but was orphaned by its original author, and is a duplicate of a class that the Parent theme already makes available if needed.
  • Implements a function that expands category indexes to include all post types, that was present in the legacy theme but not brought to this application yet.

Developer

Secrets

  • No secrets are affected

Documentation

  • Project documentation has been updated (The UX wiki has documentation about how to manage the menu on this site)

Accessibility

  • ANDI or Wave has been run in accordance to
    our guide and
    all issues introduced by these changes have been resolved or opened as new
    issues (link to those issues in the Pull Request details above)

Stakeholder approval

  • Stakeholder approval is not needed (UX will be reviewing the entire site in the near future)

Dependencies

NO dependencies are updated

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • The changes have been verified
  • The documentation has been updated or is unnecessary
  • New dependencies are appropriate or there were no changes

** Why are these changes being introduced:

* The news theme has a class that was meant to extend Walker_Nav_Menu,
  but is never actually implemented anywhere in the theme. The class
  itself is no longer available from the author's github, and an attempt
  to load it as-is indicates that it may not be compatible with current
  PHP versions because of argument mismatches with Walker_Nav_Menu.
* The parent theme already implements its own extension to the
  Walker_Nav_Menu class (navwalker.php), which _does_ work with modern
  PHP. The News theme thus does not need its own class.

** Relevant ticket(s):

* https://mitlibraries.atlassian.net/browse/lm-310

** How does this address that need:

* This removes the unneeded and unsupported class from the News theme.

** Document any side effects to this change:

* If I've missed a reference to this somewhere, something will break.
** Why are these changes being introduced:

* Category displays like /news/category/archives-mit-history/ should
  include content from all post types on the site (all of which can be
  placed into categories), rather than just show Post content.

** Relevant ticket(s):

* https://mitlibraries.atlassian.net/browse/lm-309

** How does this address that need:

* This adds a function from the legacy News site which expands the
  category display to include all post types (as long as the category
  in question isn't a bibliotech issue - those should still be scoped
  only to Bibliotech issues).

** Document any side effects to this change:

* Part of this commit is to update the function name and comment in
  functions.php, which was not accurate in the legacy theme - leading
  me to initially leave this function out of the theme.
@matt-bernhardt matt-bernhardt changed the title Lm166 News theme punch list fixes Apr 7, 2023
@matt-bernhardt matt-bernhardt requested a review from JPrevost April 7, 2023 16:00
@JPrevost JPrevost self-assigned this Apr 10, 2023
@matt-bernhardt matt-bernhardt merged commit bcafbbe into master Apr 10, 2023
@matt-bernhardt matt-bernhardt deleted the lm166 branch April 10, 2023 20:27
matt-bernhardt pushed a commit that referenced this pull request May 10, 2023
* create a new function to check jq
if jq doesn't exist, look for brew or apt-get. if neither of those exist, exit hard.

* update the command

* [BUGS-6035] Adding upstream .lando file for installation of 'jq', 'npm', etc. (#83)

73:Adding upstream .lando file for installation of 'jq', 'npm', etc.

* add link to jq downloads page

* require shellcheck
this might mean we need to tweak some of the gh actions to ensure shellcheck is installed there, we'll see if this fails...

* update the composer scripts & add the lint script

* suggest installing jq manually

* ignore shellcheck unused vars for colors

* shellcheck linting suggestiosn

* actually lint

* comment out color/style variables we aren't using

* replace == with -eq

* switch back to == because it's required

* switch -eq back to ==

* use fewer conditionals

bail early and often if we've met our conditions

Co-authored-by: Phil Tyler <philip@tylerdigital.com>

---------

Co-authored-by: Charles Leverington <charles.leverington@gmail.com>
Co-authored-by: Phil Tyler <philip@tylerdigital.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants