Skip to content

Adds Location 2021 page template#344

Merged
matt-bernhardt merged 1 commit intomainfrom
uxws-1205-location-2021-template
Aug 17, 2021
Merged

Adds Location 2021 page template#344
matt-bernhardt merged 1 commit intomainfrom
uxws-1205-location-2021-template

Conversation

@matt-bernhardt
Copy link
Copy Markdown
Member

@matt-bernhardt matt-bernhardt commented Aug 12, 2021

Status

Use labels (review needed, in progress, or paused) to declare status

What does this PR do?

This introduced a new page template to the theme, "Location (2021)". This is a new option for formatting a library location page, with these differences:

  1. The right sidebar (populated by widgets) is not displayed.
  2. The tabbed display is abandoned, making all "tab2" fields invisible.
  3. A new field, "content_2021_top" is supported above the existing fields.
  4. Some stylistic changes are introduced, such as a horizontal border between page top and page content, and a thicker right margin.

Helpful background context (if appropriate)

This is discussed in greater depth in the linked Jira ticket.

How can a reviewer manually see the effects of these changes?

You can see the new template in action on the staging site, for the Hayden page.

What are the relevant tickets?

Todo:

  • Documentation
  • Stakeholder approval

Requires new or updated plugins, themes, or libraries?

NO

Requires change to deploy process?

No, HOWEVER:

This change should be deployed in conjunction with configuration changes to the Advanced Custom Fields plugin. These are detailed in the commit message, but I'm open to adding them somewhere more sustainable. I'd love to hear options for this.

Copy link
Copy Markdown

@accesslint accesslint Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

Comment thread content-location-2021.php Outdated
$val = $arMain[ array_rand( $arMain ) ];
?>
<?php if ( $val != '' ) : ?>
<img src="<?php echo $val; ?>" data-thumb="<?php echo $val; ?>" alt="<?php the_title(); ?>" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

Copy link
Copy Markdown

@accesslint accesslint Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

Comment thread content-location-2021.php
$val = $arMain[ array_rand( $arMain ) ];
?>
<?php if ( '' != $val ) : ?>
<img src="<?php echo $val; ?>" data-thumb="<?php echo $val; ?>" alt="<?php the_title(); ?>" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

@matt-bernhardt matt-bernhardt force-pushed the uxws-1205-location-2021-template branch from 74965c1 to 8237022 Compare August 12, 2021 18:21
Copy link
Copy Markdown

@accesslint accesslint Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

Comment thread content-location-2021.php
$val = $arMain[ array_rand( $arMain ) ];
?>
<?php if ( '' != $val ) : ?>
<img src="<?php echo $val; ?>" data-thumb="<?php echo $val; ?>" alt="<?php the_title(); ?>" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

Copy link
Copy Markdown

@accesslint accesslint Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

Comment thread content-location-2021.php
$val = $arMain[ array_rand( $arMain ) ];
?>
<?php if ( '' !== $val ) : ?>
<img src="<?php echo $val; ?>" data-thumb="<?php echo $val; ?>" alt="<?php the_title(); ?>" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never change, accesslint. There is, in fact, an alt attribute on this image. It is the third and final attribute in the line on which you are commenting.

@matt-bernhardt matt-bernhardt force-pushed the uxws-1205-location-2021-template branch from 37aabd4 to 921c484 Compare August 16, 2021 19:53
** Why are these changes being introduced:

* With the re-opening of the Hayden Library after its renovation, there
  is a desire to showcase content on its page that is not supported
  by our current location template. However, the changes coming for this
  page would not be appropriate for other current location pages.

** Relevant ticket(s):

* https://mitlibraries.atlassian.net/browse/UXWS-1205

** How does this address that need:

* This adds a second template option for location pages. This will allow
  pages to be converted from the old to new format individually, as
  their content is updated for the new layout.
* Specifically, this adds page-location-2021.php, which is identified as
  "Location (2021) Template" in the WordPress page editor. This page
  template then loads content-location-2021.php, following the pattern
  used elsewhere in the theme.
* Some styles specific to this new template are also added to the
  _locations SCSS partial.
* The file comments for the legacy location content has been updated.

** Document any side effects to this change:

* In order for a successful deployment, two configuration changes will
  be necessary within the Advanced Custom Fields plugin. Specifically:
  1. The "Location" field group will need to be edited to show on this
     new page template, not just the legacy template.
  2. The "Location Attributes" field group will need a new field added,
     named "content_top_2021". This will be a WYSIWYG field.
* CodeClimate is currently flagging ~80 issues in the new template,
  which are holdovers from the legacy template. Most are stylistic
  concerns, but the lack of content escaping may need discussion. There
  is a ticket in the UX backlog to coordinate this work later:
  UXWS-1206.
* The stylesheet changes in this PR include some copy-paste of styles
  defined elsewhere, with new selector rules. An example is the
  .tabcontent class, which is defined for small screen widths in _tabs.
  This new template will need those styles for all screen widths.
* The theme version is bumped to 1.12.0.
@matt-bernhardt matt-bernhardt force-pushed the uxws-1205-location-2021-template branch from 921c484 to a16e192 Compare August 17, 2021 14:09
@matt-bernhardt matt-bernhardt requested a review from jazairi August 17, 2021 14:15
@jazairi jazairi self-assigned this Aug 17, 2021
Copy link
Copy Markdown
Contributor

@jazairi jazairi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this all makes sense to me. Thanks for chatting about it in Slack. Documenting some conclusions here:

  1. I'm comfortable with setting aside the codeclimate issues about escaping rendered content, given that it's a fairly complex issue that's likely out of scope of this work, and it's documented as a ticket in the UXWS Jira.
  2. I'm also comfortable ignoring the remaining codeclimate issues, since they all seem to be style complaints that don't worry me.
  3. I don't think additional documentation is necessary re: the dependent config in Advanced Custom Fields, since we shouldn't need to reconfigure it after the first time.

Nice work on this! :shipit:

@matt-bernhardt matt-bernhardt merged commit 24296b1 into main Aug 17, 2021
@matt-bernhardt matt-bernhardt deleted the uxws-1205-location-2021-template branch August 17, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants