Convert content below hours grid to a widget area#354
Merged
matt-bernhardt merged 1 commit intomainfrom May 5, 2022
Merged
Conversation
96f2e6a to
ae8359d
Compare
** Why are these changes being introduced: * As the Libraries have re-opened, there have been a number of changes to the currently-static-HTML content below the hours grid. In order to allow us to change this content more responsively as the organization evolves, this converts that static content into a widget area so that changes don't require code updates. ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/uxws-1367 ** How does this address that need: * This takes out the static content from page-hours-json.php and replaces it with a new sidebar area. As part of the deploy of this, I will create and populate a widget with the static content. ** Document any side effects to this change: * The actual markup around this content will change, but not in a way that will be visible to the user or a search engine.
ae8359d to
a212495
Compare
jazairi
approved these changes
May 4, 2022
Contributor
jazairi
left a comment
There was a problem hiding this comment.
I haven't confirmed this because I found myself going down an unintentional rabbit hole with my local WP environment, but the code looks good and the premise makes sense. Thanks for including such excellent detail in the PR. ![]()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes being introduced:
to the currently-static-HTML content below the hours grid. In order to
allow us to change this content more responsively as the organization
evolves, this converts that static content into a widget area so that
changes don't require code updates.
Relevant ticket(s):
How does this address that need:
page-hours-json.phpandreplaces it with a new sidebar area. As part of the deploy of this, I
will create and populate a widget with the static content.
Document any side effects to this change:
that will be visible to the user or a search engine.
How can a reviewer manually see the effects of these changes?
As I write this, the branch is currently not deployed anywhere - so if you have a local network you can look at it there. If not, then I'll be deploying this to staging once #353 is through code review.
Screenshots (if appropriate)
Here's the current production hours page...

Converting that "Locations without hours" block to a widget area will momentarily cause it to disappear (this is from staging, after deploying the branch and before creating the new widget)

After the widget has been defined (taking care to remove the bit about the Physics reading room that motivated this entire ticket), the page looks like this:

Todo:
Requires new or updated plugins, themes, or libraries?
NO
Requires change to deploy process?
NO