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

SHS-6067: Button class in view has incorrect link color for external links #1751

Conversation

mariannuar
Copy link
Collaborator

@mariannuar mariannuar commented Feb 19, 2025

Summary

Fix button class in views using incorrect link color for e…xt links

Need Review By (Date)

02/25

Urgency

high

Steps to Test

  1. Go to https://hs-traditional-qc8w9bvlgeckfzmpgvhrjdmfvgwzwdlu.tugboatqa.com/
  2. Check if the theme is using color pairing "Warbler"
  3. To test buttons that have an external class are not affect by the styles of this external class, go to https://hs-traditional-qc8w9bvlgeckfzmpgvhrjdmfvgwzwdlu.tugboatqa.com/components/text-area-typography
  4. Confirm that when all the variations of buttons have an ext class, they look good in all states (normal, hover, focus, active)
  5. Couldn't find an existing view or page that replicates this view in economicsttps://economics.stanford.edu/site/paper-submission, so let's go to this page that uses a view similar to the one in economics: https://hs-traditional-qc8w9bvlgeckfzmpgvhrjdmfvgwzwdlu.tugboatqa.com/default-views/events
  6. If there's isn't a button in each event card of Upcoming Events, let's go to the configuration of that view and:
    • Add a new link field that has the same configuration that the one ("Content: Paper submission link") in economics[ttps://economics.stanford.edu/site/paper-submission] has . BUT, instead of having "hs-secondary-button" let's add "hs-button".
  7. Once there's a button in each event card, confirm it looks like this:

Normal status
Screenshot 2025-02-19 at 12 55 26 PM

Hover status
Screenshot 2025-02-19 at 12 55 58 PM

Review Tasks

Backend / Functional Validation

Code

  • Are the naming conventions following our standards?
  • Are PHP functions and variables in snake_case and not camelCase?
  • Does Drupal code follow Drupal Coding Standards?
  • Does the code have sufficient inline comments?
  • Is there anything in this code that would be hidden or hard to discover through the UI?
  • Are there any code smells?
  • Are tests provided?

Code security

General

  • Is there anything included in this PR that is not related to the problem it is trying to solve?
  • Is the approach to the problem appropriate?

@ahughes3 ahughes3 temporarily deployed to Tugboat February 19, 2025 18:46 Destroyed
@mariannuar mariannuar marked this pull request as ready for review February 19, 2025 19:03
@mariannuar mariannuar self-assigned this Feb 19, 2025
@mariannuar mariannuar requested a review from cienvaras February 19, 2025 19:03
Base automatically changed from 11.7.1-release to develop February 20, 2025 17:59
@cienvaras cienvaras changed the base branch from develop to 11.8.1-release February 21, 2025 21:09
Copy link
Collaborator

@cienvaras cienvaras left a comment

Choose a reason for hiding this comment

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

@mariannuar This issue is warbler specific, it doesn't affect other color pairings. For that reason, let's address it in the same way than other warbler issues: overriding the color for warbler only.

In other color pairings, the color defined in .hs-button overrides the color from .ext, so lets add a definition for warbler in the hb-button mixin. Something like this:

// Warbler color pairing override.
@include hb-traditional {
  .ht-pairing-warbler & {
    color: var(--palette--white);
  }
}

Also check the following:

  • Confirm that the hover and focus states have the right color
  • Confirm that the styles are correct for other button variations

…-6067-fix-button-class-in-view-incorrect-link-color-for-ext-links
@ahughes3 ahughes3 temporarily deployed to Tugboat February 21, 2025 21:41 Destroyed
@mariannuar mariannuar requested a review from cienvaras February 25, 2025 16:04
@mariannuar
Copy link
Collaborator Author

@cienvaras Ready for review again!

Copy link
Collaborator

@cienvaras cienvaras left a comment

Choose a reason for hiding this comment

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

@mariannuar LGTM!

@ahughes3 This is ready for you, however there's a problem with the tugboat base preview that's causing all preview to fail. I'm checking with Joe, I'll let you know as soon as it's fixed.

@cienvaras cienvaras requested a review from ahughes3 February 25, 2025 17:34
@cienvaras cienvaras assigned ahughes3 and unassigned mariannuar Feb 25, 2025
@ahughes3 ahughes3 temporarily deployed to Tugboat February 25, 2025 21:41 Destroyed
…-6067-fix-button-class-in-view-incorrect-link-color-for-ext-links
@ahughes3 ahughes3 temporarily deployed to Tugboat February 25, 2025 22:19 Destroyed
Copy link
Collaborator

@ahughes3 ahughes3 left a comment

Choose a reason for hiding this comment

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

Approved!

@ahughes3 ahughes3 assigned joegl and unassigned ahughes3 Feb 27, 2025
@ahughes3 ahughes3 requested a review from joegl February 27, 2025 20:21
@joegl joegl merged commit dad3b17 into 11.8.1-release Feb 27, 2025
25 of 28 checks passed
@joegl joegl deleted the shs-6067-fix-button-class-in-view-incorrect-link-color-for-ext-links branch February 27, 2025 20:50
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.

4 participants