The most recent location template - introduced last fall in #344 - uses too
strict a comparison to determine whether a location alert will be
shown - the === operator used is different from that used by the older
location template (which uses ==). I didn't realize initially the
using the stricter comparison would never result in the alert being
shown, it seems.
This change reverts the new location template to using the more
permissive == operator instead of ===.
Document any side effects to this change:
I'm still not entirely sure about how the logic of this check works,
so there may be some aspect - but I doubt it. This reverts to the same
comparison that is working for the other location template.
As expected, CodeClimate is flagging the use of the == operator - which is why I originally changed this check in the first place. That's going to have to be accepted for now.
How can a reviewer manually see the effects of these changes?
This branch is current present on the staging server. If you look at the Hayden Library page, you'll note a location alert being shown about the elevators being out of service.
Screenshots (if appropriate)
Staging (showing location alert)
Production (without alert)
Todo:
[x] Documentation
[x] Stakeholder approval
Requires new or updated plugins, themes, or libraries?
Why are these changes being introduced:
Compare the new location template at https://github.com/MITLibraries/MITlibraries-parent/blob/main/content-location-2021.php#L74 with the older template at https://github.com/MITLibraries/MITlibraries-parent/blob/main/content-location.php#L97
Relevant ticket(s):
How does this address that need:
Document any side effects to this change:
How can a reviewer manually see the effects of these changes?
This branch is current present on the staging server. If you look at the Hayden Library page, you'll note a location alert being shown about the elevators being out of service.
Screenshots (if appropriate)
Staging (showing location alert)
Production (without alert)
Todo:
Requires new or updated plugins, themes, or libraries?
NO
Requires change to deploy process?
NO