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

SDSS-591: Add callout component #170

Merged

Conversation

jenbreese
Copy link
Contributor

@jenbreese jenbreese commented Jun 30, 2023

READY FOR REVIEW

Summary

  • Adding a callout to the news

Review By (Date)

  • next week

Criticality

  • Normal

Review Tasks

Setup tasks and/or behavior to test

  1. Check out this branch
  2. Navigate to a news article.
  3. Add a section, picked offset and add a callout. Fill in the form.
  4. add a section and add a callout. Try at 100% and 50% in offset.
  5. Try checking the blue background and not. The default is white if you don't check the blue tick box.
  6. Verify...

Front End Validation

  • Is the markup using the appropriate semantic tags and passes HTML validation?
  • Cross-browser testing has been performed?
  • Automated accessibility scans performed?
  • Manual accessibility tests performed?
  • Design is approved by @ user?

Backend / Functional Validation

Code

  • Are the naming conventions following our 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? eg (unit, behat, or codeception)

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?

Affected Projects or Products

  • Does this PR impact any particular projects, products, or modules?

Associated Issues and/or People

- SDSS-591

Resources

@jenbreese jenbreese requested a review from joegl June 30, 2023 23:44
@joegl joegl changed the title SDSS-591 add callout component SDSS-591: Add callout component Jul 7, 2023
Copy link
Collaborator

@joegl joegl left a comment

Choose a reason for hiding this comment

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

This is looking good! I left some review notes on the code, and then had this feedback for the design and display itself:

  • The spacing between the author and the quote text needs to be larger.
  • Only the large quote text should be italicized. Everything else is non-italics.
  • The quote text should be a serif font ("Source Serif Pro"). Right now it's sans-serif.

Let me know if you have any questions!

size: 60
placeholder: ''
third_party_settings: { }
su_callout_blue_bg:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Couple things on this field:

We shouldn't bake the color into the id/machine name.

  • Something like su_callout_bgcolor_alt might make more sense.

If they want more options in the future (or we want to maintain flexibility to add more), this should probably be a drop-down instead of a boolean checkbox. We'd only have two options (right now).

  • Name the field something like: su_callout_bgcolor
  • Add two options:
    • Default|bg_color_default
    • Blue|bg_color_option1

We can always re-label a color down the line (for example "Blue" could be changed to "Green"). But we can't change the id/machine_name easily, so using something like "option1" instead of "blue" allows us to maintain flexibility.

Comment on lines +57 to +59
.layout-paragraphs-sdss-two-column.layout-paragraphs-sdss-two-column--offset-50-50 {
margin: 0;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.layout-paragraphs-sdss-two-column.layout-paragraphs-sdss-two-column--offset-50-50 {
margin: 0;
}
.layout-paragraphs-sdss-two-column {
&.layout-paragraphs-sdss-two-column--offset-50-50 {
margin: 0;
}
}

This selector is a bit long. Should we separate it for legibility?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It isn't a SCSS file so that syntax wouldn't work.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ahh good call 🤦

@@ -32,6 +32,7 @@
@import 'login-page/index.scss';
@import 'main-navigation/index.scss';
@import 'news/index.scss';
@import 'newsroom-callout/index.scss';
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the other PR, #168 , we're adding a /newsroom directory. Should this be a separate SCSS file in that /newsroom directory, instead of a new component?

Also, the component is called "Callout Quote" and not "Newsroom Callout". Should we create a /components/callout-quote directory with generic styles, and then extend it in the /newsroom SCSS created in the other PR?

&.layout-paragraphs-sdss-two-column--offset-50-50 {
.layout__region.layout__region--sidebar {
> div {
float: right; // may change this later.
Copy link
Collaborator

Choose a reason for hiding this comment

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

What are you thinking of changing this to later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking there'd be a better way than a float. However, since we took out the 2 and 3 col layouts, I will remove this block since it is no longer relevant.

Comment on lines 97 to 101
display: inline;

&::after {
content: "\201D";
display: inline;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to specify these individually for each block quote size, when there is a generic style above (lines 81-90) that should do this for all 3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment on lines 42 to 47
// Hiding the text from display.
.su-callout-blue-bg,
.su-callout-white-bg,
.su-select-font-sizing {
display: none;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should be hidden in the configuration or the template itself, but not with CSS. I can help with that just let me know if you have questions.


.callout {
@include grid-media-min('lg') {
max-width: 511px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a nitpicker here, but why such a specific pixel value?


&.blue_bg,
&.white_bg {
padding: 4.5rem 11.3rem 4.5rem 11.1rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm seeing this padding applied to the callout no matter the column (one, two, three) -- maybe this could applied more generically?

@charset "UTF-8";

//padding set up based on layout.
.layout--layout-paragraphs-one-colum {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.layout--layout-paragraphs-one-colum {
.layout--layout-paragraphs-one-column {

I think this is missing an "n".

Copy link
Collaborator

@joegl joegl 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 a number of changes I'd like to seen made here, but not enough to hold up review. Thanks Jen!

@joegl joegl merged commit e2d38de into feature/newsroom-layout-paragraphs Jul 19, 2023
4 checks passed
@joegl joegl deleted the SDSS-591--add-callout-component branch July 19, 2023 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants