Skip to content
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

Close #2424 Adding badge display for all default taxonomy vocabularies. #2425

Merged
merged 2 commits into from
May 31, 2023

Conversation

trackleft
Copy link
Member

@trackleft trackleft commented May 19, 2023

Description

Implemented the az_badge display for all default taxonomy vocabularies so that we can use them in additional displays.

Related issues

Related to #2406
Related to #2423
Related to #2398

How to test

Add taxonomy as rendered entity to any display mode, and choose Badge.

Types of changes

Enhancement.

Arizona Quickstart (install profile, custom modules, custom theme)

  • Patch release changes
    • Bug fix
    • Accessibility, performance, or security improvement
    • Critical institutional link or brand change
    • Adding experimental module
    • Update experimental module
  • Minor release changes
    • New feature
    • Breaking or visual change to existing behavior
    • Upgrade experimental module to stable
    • Enable existing module by default or database update
    • Non-critical brand change
    • New internal API or API improvement with backwards compatibility
    • Risky or disruptive cleanup to comply with coding standards
    • High-risk or disruptive change (requires upgrade path, risks regression, etc.)
  • Other or unknown
    • Other or unknown

Drupal core

  • Patch release changes
    • Security update
    • Patch level release (non-security bug-fix release)
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major or minor level update
  • Other or unknown
    • Other or unknown

Drupal contrib projects

  • Patch release changes
    • Security update
    • Patch or minor level update
    • Add new module
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major level update
  • Other or unknown
    • Other or unknown

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@trackleft
Copy link
Member Author

Enabled vocabs by default
image

Event categories
image

Page Categories
image

News tags
image

Person categories
image

Person categories (secondary)
image

@trackleft trackleft marked this pull request as ready for review May 19, 2023 21:41
@trackleft trackleft requested a review from a team as a code owner May 19, 2023 21:41
@trackleft trackleft added enhancement New feature or request patch release Issues to be included in the next patch release labels May 19, 2023
@camikazegreen
Copy link
Contributor

camikazegreen commented May 19, 2023

This seems like a great change, but I can't figure out how to test this.

If anyone else is able to "Add taxonomy as rendered entity to any display mode, and choose Badge", I will be happy to review it.

Copy link
Member

@joeparsons joeparsons left a comment

Choose a reason for hiding this comment

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

Good improvement. Don't see any issues with adding these.

@bberndt-uaz
Copy link
Contributor

@trackleft I'm not sure what's in the scope of this PR, but I wanted to note a couple things:

  1. It looks like the terms are displayed as one per row: maybe we want them to display next to each other like the tags on Person pages?
image

  1. In the HTML markup, there appear to be some extra <a> elements which don't have any children. From the example above (on the Page Grid page):
<div class="field field--name-field-az-page-category field--type-entity-reference field--label-hidden field__items"><a href="/pages/split-screen-no-sidebar" class="field-group-link card-body p-0" hreflang="en">
  </a>
  <div class="field__item"><a href="/pages/split-screen-no-sidebar" class="field-group-link card-body p-0" hreflang="en"></a>
    <div id="taxonomy-term-67" class="taxonomy-term vocabulary-az-page-categories"><a href="/pages/split-screen-no-sidebar" class="field-group-link card-body p-0" hreflang="en">

      </a>
      <div class="content"><a href="/pages/split-screen-no-sidebar" class="field-group-link card-body p-0" hreflang="en">
        </a><a href="/page-categories/split-screen" class="field-group-link badge badge-light badge-link" hreflang="en">
          <div>
            <div class="field field--name-name field--type-string field--label-hidden field__item">Split Screen</div>
          </div>
        </a>
      </div>
    </div>
  </div>
  <div class="field__item">
    <div id="taxonomy-term-65" class="taxonomy-term vocabulary-az-page-categories">

      <div class="content">
        <a href="/page-categories/no-sidebar" class="field-group-link badge badge-light badge-link" hreflang="en">
          <div>
            <div class="field field--name-name field--type-string field--label-hidden field__item">No Sidebar</div>
          </div>
        </a>
      </div>
    </div>
  </div>
</div>

For the Person taxonomy terms, it looks like we added a field template and custom CSS.

Copy link
Member

@joeparsons joeparsons left a comment

Choose a reason for hiding this comment

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

I'm thinking it'd be good to merge this sooner rather than later and figure out additional implementation details like the things @bberndt-uaz mentioned as a follow-up.

@joeparsons joeparsons merged commit 7111abd into main May 31, 2023
@joeparsons joeparsons deleted the issue/2424 branch May 31, 2023 21:58
@trackleft trackleft mentioned this pull request Jun 16, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request patch release Issues to be included in the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement az_badge view mode for all taxonomy vocabularies that are enabled by default.
4 participants