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

Improve markup for contributors #194

Merged
merged 1 commit into from
May 30, 2024
Merged

Improve markup for contributors #194

merged 1 commit into from
May 30, 2024

Conversation

jazairi
Copy link
Contributor

@jazairi jazairi commented May 29, 2024

Why these changes are being introduced:

Authors are currently rendered within a p tag. This is not very semantically meaningful.

Relevant ticket(s):

How this addresses that need:

This refactors the contributors section to a partial and renders contributors as an unordered list. It is the same changeset that was introduced in #191, but without displaying the contributor type, which UXWS has deemed unnecessary at this time.

Side effects of this change:

None.

Developer

Accessibility
  • ANDI or WAVE has been run in accordance to our guide.
  • This PR contains no changes to the view layer.
  • New issues flagged by ANDI or WAVE have been resolved.
  • New issues flagged by ANDI or WAVE have been ticketed (link in the Pull Request details above).
  • No new accessibility issues have been flagged.
New ENV
  • All new ENV is documented in README.
  • All new ENV has been added to Heroku Pipeline, Staging and Prod.
  • ENV has not changed.
Approval beyond code review
  • UXWS/stakeholder approval has been confirmed.
  • UXWS/stakeholder review will be completed retroactively.
  • UXWS/stakeholder review is not needed.
Additional context needed to review

N/A

Code Reviewer

Code
  • I have confirmed that the code works as intended.
  • Any CodeClimate issues have been fixed or confirmed as
    added technical debt.
Documentation
  • The commit message is clear and follows our guidelines
    (not just this pull request message).
  • The documentation has been updated or is unnecessary.
  • New dependencies are appropriate or there were no changes.
Testing
  • There are appropriate tests covering any new functionality.
  • No additional test coverage is required.

@mitlib mitlib temporarily deployed to timdex-ui-pi-contribs-m-cy7z5s May 29, 2024 18:45 Inactive
@jazairi jazairi temporarily deployed to timdex-ui-pi-contribs-m-cy7z5s May 29, 2024 18:46 Inactive
Copy link

Pull Request Test Coverage Report for Build 9291478300

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 98.653%

Totals Coverage Status
Change from base Build 9287675687: 0.2%
Covered Lines: 586
Relevant Lines: 594

💛 - Coveralls

@jazairi jazairi temporarily deployed to timdex-ui-pi-contribs-m-cy7z5s May 29, 2024 18:46 Inactive
@JPrevost JPrevost self-assigned this May 30, 2024
Copy link
Member

@JPrevost JPrevost left a comment

Choose a reason for hiding this comment

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

Can you look into whether the map I noted is doing anything meaningful? I ran through a few searches with it as-is and with it removed and don't see any difference but I'm also pretty early into my coffee...

@@ -0,0 +1,5 @@
<%= return if contributors.blank? %>

<% contributors.uniq.map do |contributor| %>
Copy link
Member

Choose a reason for hiding this comment

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

Is .map doing something here I'm not understanding?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good call. It's probably a remnant of a previous iteration.

<p class="authors truncate-list">
<%= render partial: 'shared/authors', locals: { contributors: result_geo['contributors'] } %>
</p>
<span class="sr">Contributors: </span>
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be a bit of a refactor to do this, so I don't think we should in this change... but if we changed result_geo to just be result wherever it came from we'd be able to remove some duplication and move the entire contributors logic into the shared partial instead of having geo/normal variants that are identical.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed on both counts.

@jazairi jazairi requested a review from JPrevost May 30, 2024 13:32
@jazairi jazairi temporarily deployed to timdex-ui-pi-contribs-m-cy7z5s May 30, 2024 13:32 Inactive
Why these changes are being introduced:

Authors are currently rendered within a `p` tag. This is not very
semantically meaningful.

Relevant ticket(s):

* [GDT-284](https://mitlibraries.atlassian.net/browse/GDT-284)

How this addresses that need:

This refactors the contributors section to a partial and renders
contributors as an unordered list. It is the same changeset that
was introduced in #191, but without displaying the contributor type,
which UXWS has deemed unnecessary at this time.

Side effects of this change:

None.
@jazairi jazairi temporarily deployed to timdex-ui-pi-contribs-m-cy7z5s May 30, 2024 14:16 Inactive
@jazairi jazairi merged commit ee773ce into main May 30, 2024
5 checks passed
@jazairi jazairi deleted the contribs-markup branch May 30, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants