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

Add Minimal header component #846

Merged
merged 36 commits into from
Oct 20, 2023
Merged

Add Minimal header component #846

merged 36 commits into from
Oct 20, 2023

Conversation

ataker
Copy link
Contributor

@ataker ataker commented Sep 14, 2023

Chromatic

https://minimal-header-dst2030--60f9b557105290003b387cd5.chromatic.com

Description

Closes Minimal header - 2030

Testing done

Tested in Storybook in Chrome, Safari, Edge, and FIrefox

Screenshots

Screenshot 2023-09-14 at 9 45 16 AM
Screenshot 2023-09-14 at 9 45 23 AM

Acceptance criteria

  • [ ]

Definition of done

  • Documentation has been updated, if applicable
  • A link has been provided to the originating GitHub issue (or connected to it via ZenHub)

@ataker ataker added the minor For a minor Semantic Version change label Sep 14, 2023
@ataker ataker marked this pull request as ready for review September 14, 2023 18:19
@ataker ataker requested a review from a team as a code owner September 14, 2023 18:19
$red-60v: #b51d09;
$red-70v: #8b1303;

$small-desktop-screen: 1008px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the right place to be adding tokens? Do we have these values somewhere else in a central place we could pull from instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Could be a good opportunity to add something like a breakpoints.json file for token generation or something.

Copy link
Contributor

Choose a reason for hiding this comment

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

This might be irrelevant if we are able to just use the existing crisis modal variation from va-modal: https://design.va.gov/storybook/?path=/docs/components-va-modal--crisis-line-modal

@jamigibbs
Copy link
Contributor

It might just be me but is the VA icon kind of blurry?

Screenshot 2023-09-14 at 4 27 30 PM

Copy link
Contributor

@micahchiang micahchiang left a comment

Choose a reason for hiding this comment

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

I don't have access to the sketch file that contains the mocks for this. Do we have mockups that handle long header values that get passed in? Currently on mobile, long strings make the header take up a lot of space:

Screenshot from 2023-09-14 15-17-29

Again, I don't have access to the sketch file for this, so not sure if this is expected or not.

$red-60v: #b51d09;
$red-70v: #8b1303;

$small-desktop-screen: 1008px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be a good opportunity to add something like a breakpoints.json file for token generation or something.

@@ -0,0 +1,112 @@
import { Component, Host, State, h } from '@stencil/core';
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be its own component? Doesn't feel like it belongs purely as a child component of the minimal header 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah saw that. We have this ticket to address some crisis line inconsistencies in storybook. It seems like .va-crisis-line and .va-crisis-line-button renders a different version than what we're using in here.

@ataker
Copy link
Contributor Author

ataker commented Sep 15, 2023

Updated logo to an SVG I found from va.gov

Line height reduced for the header

@Andrew565
Copy link
Contributor

This PR is ready for re-review, and now also includes fixes for #2016.

@@ -0,0 +1,130 @@
import { Component, Host, State, h } from '@stencil/core';
import arrowRightSvg from '../../assets/arrow-right-white.svg';
import { CONTACTS } from '../../../../react-components/src/components/Telephone/contacts';
Copy link
Contributor

Choose a reason for hiding this comment

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

That react Telephone import (along with the contacts file) should be deprecated/removed now.

This is how we have been doing it on vets-website. Does that work here too?

import { CONTACTS } from '@department-of-veterans-affairs/component-library/contacts';

Copy link
Contributor

Choose a reason for hiding this comment

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

Alternately, the direct path should be something like (it's in the packages/web-components/src/ folder)

import { CONTACTS } from '../../contacts.ts';

styleUrl: 'va-crisis-line-modal.scss',
shadow: true,
})
export class VACrisisLineModal {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have some tests written for this component?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good idea, on it!

/>
<p>
Call TTY if you have hearing loss{' '}
<strong class="vads-u-margin-left--0p5">
Copy link
Contributor

@jamigibbs jamigibbs Sep 25, 2023

Choose a reason for hiding this comment

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

We probably don't want to rely on any Formation classes. Can those styles be moved into the component itself?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also a good idea!

$red-60v: #b51d09;
$red-70v: #8b1303;

$small-desktop-screen: 1008px;
Copy link
Contributor

@jamigibbs jamigibbs Sep 25, 2023

Choose a reason for hiding this comment

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

Is this the right place for tokens?

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought about it and couldn't find a better solution for tokens than what Alex did here. These values just don't exist anywhere else that we can use right now, until the remainder of the USWDS tokens are brought into the variables file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right now we have a tokens file in the web-components directory, in the CSS Library, and in Formation. Now we are adding random tokens here in a specific component.

It just feels like there are tokens everywhere and adding more here might make dealing with them later more challenging than it already will be.

Can we consider adding the colors we need to the CSS-Library, regenerate the file, and then updating the tokens file in the web-components directory with the new compiled file?

Copy link
Contributor

Choose a reason for hiding this comment

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

@Andrew565 If you're not going to address this feedback now, then please create a follow up ticket and link to that issue here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jamigibbs
Copy link
Contributor

Do we happen to have a sketch or design file for the crisis line modal? I'm not sure what we should be checking it against:

Screenshot 2023-09-25 at 3 01 13 PM

@ataker
Copy link
Contributor Author

ataker commented Oct 10, 2023

Addressed @jamigibbs's feedback

Copy link
Contributor

@jamigibbs jamigibbs left a comment

Choose a reason for hiding this comment

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

Thank you @ataker! Let's just make sure that we have a designer approval on this too before it gets merged cc @babsdenney @danbrady @LWWright7

@jamigibbs jamigibbs removed the request for review from LillyBoot October 12, 2023 17:09
@babsdenney
Copy link

babsdenney commented Oct 16, 2023

Image Storybook Sketch
image Button background color (text side) - #b51d09

Font style - Arial
Height of the button - 34px
Button background color (text side) - #981B1E
Font style - There doesn't seem to be a font style being applied
On VA.gov there the text style in Source sans pro
Height of the button - 32px
image The medium view has an issue with the .gov banner link
image .gov banner height - 30px .gov banner height - 22px
image The crisis line modal icon is present imageThe crisis line icon is removed on small screens
This is not an issue after getting guidance from Matt. The link and text can remain separated. Expand link for the .gov banner is present The expand link for the .gov banner merges with the text to become a link (see above)
NOTE: This diverges from the USWDS .gov banner that has the expand link present in small screens
image Storybook showes a 16px space between the logo, vertical line, and title The sketch document varies is space from 7px - 10px but would think instead that 8px should be used for horizontal spacing between the logo, vertical line, and title
image Storybook is showing more vertical padding on the blue header 20px padding on top and bottom Sketch is showing padding of 10px on top and 11px bottom but maybe we can adjust that to 10px on top and bottom instead
image The divider is 22px in Storybook The divider is 38px in Sketch
image The background color for the blue header is #182c54 The background color for the blue header in Sketch is #112E51

@humancompanion-usds
Copy link
Contributor

humancompanion-usds commented Oct 17, 2023

Storybook showes a 16px space between the logo, vertical line, and title
The sketch document varies is space from 7px - 10px but would think instead that 8px should be used for horizontal spacing between the logo, vertical line, and title

I just checked the Sketch file and it looks like what I intended to me: 8px at mobile, 16px at desktop between the vertical line and the elements near it. That's horizontal and vertical. At desktop I measured using the VA logo - that's 32px padding top and bottom, 16px to the line.

I will bring the minimal header from the reference Sketch file into the Component library.

@humancompanion-usds
Copy link
Contributor

The divider height was meant to stretch depending on the height of the title. For example:

Screenshot 2023-10-17 at 11 28 28 AM

@micahchiang
Copy link
Contributor

@humancompanion-usds - not sure if I missed it, but can you drop a link to the sketch file for this in here so @Andrew565 can reference it?

@humancompanion-usds
Copy link
Contributor

The Sketch file is in the issue that this PR is related to.

Copy link
Contributor

@micahchiang micahchiang left a comment

Choose a reason for hiding this comment

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

Checked everything in storybook, and it looks good to me 👍

There's an issue with the official gov banner at the medium break point in story book, but we have an existing ticket to address that here - department-of-veterans-affairs/vets-design-system-documentation#2097

@babsdenney
Copy link

@Andrew565 I took a look at the new header. Everything looks great except the crisis line button. The color is a bit off and there's also some hover over states that could be adjusted. The Crisis line button is something that hasn't changed, could you match all the specifications from the production crisis line button. The simple header crisis line button can be identical to the VA.gov current header.

https://www.va.gov/

@babsdenney
Copy link

@Andrew565 This looks so great! Thank you for making the changes! The only little nit-picky thing I see is the hover-over effect on the icon. It is a tad brighter than the one in the main VA header. Looking at the color they chose, it is not a color in the Design System. So that might be something to figure out in the future.

They are using - #b51d09

Could we change that color to what is in VA.gov header in prod?

@humancompanion-usds
Copy link
Contributor

Looking at the color they chose, it is not a color in the Design System.

I see we already made this change but, this is a bug. It is never, ever correct to use a color not in the Design System. Period. "They" here is VA, which is us. It's on us to fix it and not propagate it. I understand we're trying to recreate the current version but in future if the current version is broken or wrong we should address those things. Let's file an issue on this to correct it in future.

@babsdenney
Copy link

babsdenney commented Oct 20, 2023

@humancompanion-usds Thanks for calling this out! I definitely agree that should have been a flag to figure out how we could align with colors in the Design System. I made a design ticket for that work.

department-of-veterans-affairs/vets-design-system-documentation#2221

Copy link

@babsdenney babsdenney left a comment

Choose a reason for hiding this comment

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

Design approved!

@Andrew565 Andrew565 merged commit 3e5baa9 into main Oct 20, 2023
6 checks passed
@Andrew565 Andrew565 deleted the minimal-header-dst2030 branch October 20, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor For a minor Semantic Version change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Minimal Header with existing design conventions] - Development
6 participants