forked from jspellman814/wordpress-composer-managed
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tag template to News theme #139
Merged
Merged
Conversation
This file contains 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
** Why are these changes being introduced: * DSpace@MIT currently sends traffic to a page showing all news articles with a specific "dspacemit" tag - the only such example of a tag index on the site. Unfortunately, this tag index is not displaying correctly due to a bug in the parent theme's tag template. * On the legacy site, this display functions, but is a poor fit for the need because the display isn't branded correctly (it is partially branded with the parent theme) ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/pw-55 ** How does this address that need: * This adds a tag template to the News theme. It repeats the structure of the legacy display, being a paginated list of complete articles, instead of the category index that shows an AJAX-paginated list of cards. * There is a small change to content-single.php in the News theme, which we realized was previously unused. Now it is used by the tag template, but we need to change one class to control how the article metadata is displayed (the former class name results in an absolutely-positioned element on screen, which was useful in a card display but is a bug here). * The news styles are updated to ensure that large images don't overflow their container, and to add some padding around each news article in the list. * The parent styles are updated to ensure that pagination links are placed alongside each other. * The news theme version is bumped to 0.3.0. This is a nice-to-have, not required by the style changes as the changed stylesheets are not compiled by SCSS. ** Document any side effects to this change: * The page structure we're using for the tag index is a new visual approach, but the work to provide an AJAX-powerd paginated list of cards would have been higher, and isn't justified by how little use this template will likely see.
** Why are these changes being introduced: * As we are now using content-single.php (and discovering that it was unused before), we are discovering that there is a pretty significant amount of debt in the template - unused conditionals, references to fields that no longer exist, etc. That made working with this template a bit trickier than needed because it wasn't clear what was needed. ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/pw-55 ** How does this address that need: * This refactors the template, removing unused variables, unused conditionals, etc. Full details are below. * The mark_as_new field no longer exists, so that check is removed. * The article category is not shown, and the old logic never actually displayed it - so we remove it entirely. * There are no "features" or "updates" post types on the network, and the "exhibits" post type is not used on the News site - so those checks are also removed. * The bespoke handling of event date and time information is removed in favor an existing partial that is used elsewhere in the theme. While we don't anticipate any event information to be displayed using this template (The DSpace@MIT tag has always been news articles written by our staf, and not event records imported from the central MIT calendar), this will protect us in the future if that changes. * Whitespace is cleaned up, and references to $subtitle and $type variables that are never used are removed. ** Document any side effects to this change: * None, unless I've missed a path somewhere in the theme where this partial is loaded somewhere other than tag.php. If that is the case, then there will likely be an impact in how content is rendered that I have not seen or considered.
matt-bernhardt
force-pushed
the
pw-55
branch
from
September 1, 2023 20:37
bf3546b
to
2c71816
Compare
The tag template seems to be working as expected on the news theme. I'm not sure how to verify the changes in |
jazairi
approved these changes
Sep 12, 2023
Oh, I don't know if I ever documented how to verify which templates are used in building a given HTML page. |
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.
This makes the tag template of the News theme into something usable. As a stretch goal, it also refactors the
content-single.php
partial into a more usable and sustainable condition in a separate commit.These changes will result in a more usable display of content for visitors who click a link on the front page of DSpace@MIT.
Links to the review app and more context are in the linked ticket.
Ticket: https://mitlibraries.atlassian.net/browse/PW-55
Note: during evaluation of this change via ANDI, I realized that there are some color contrast problems in the News theme. They are not introduced with this change, but they exist in the tag template because of how the author line (and event information) are rendered. I've created https://mitlibraries.atlassian.net/browse/PW-56 in the backlog to tackle this issue among our other work.
Developer
Stylesheets
string incremented.
Secrets
Documentation
Accessibility
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)
New ticket: https://mitlibraries.atlassian.net/browse/PW-56
Stakeholder approval
Dependencies
NO dependencies are updated
Code Reviewer
(not just this pull request message)