Skip to content

Conversation

@bernhard-adobe
Copy link
Contributor

@bernhard-adobe bernhard-adobe commented Nov 15, 2019

Covers:
SDS-2513 Adding t-shirt sized typography. Issue: #210

SDS-3259 Update Spectrum CSS Typography documentation: Spectrum CSS NextJS & legacy documentation

SDS-4405 Verify Spectrum CSS Typography Updates

SDS-4403 Split Typography documentation for Spectrum CSS

SDS-4460 Update Typekit / Adobe Fonts (Thanks @misterbrownlee )

SDS-4453 adobe-clean-ux support can be removed #416

Description

  1. Updating Spectrum DNA to get t-shirt sized tokens.
  2. Modifying processors.js to allow t-shirt sizes. Some minor restructuring of shared methods.
  3. Adding t-shirt sized: sizes, margins and color
  4. Enabling the debug statement the processors.js for colors and sizes.
  5. Splitting Typography pages
  6. Moving old Typography into Depreciated

For validation the following tokens can be searched:

Paperdoc summary of all changes: https://paper.dropbox.com/doc/Typography-Update--AopzJsKrFFzH_O8gexjcxdEdAg-bluAkl9HGke8WKkJvow2N
(updated t-shirt sized): https://git.corp.adobe.com/gist/nbaldwin/3364cf137d8bd50097c3bedbde9218e5

(original t-shirt sized): https://git.corp.adobe.com/Spectrum/spectrum-dna/pull/310

How and where has this been tested?

  • How this was tested:
  • Browser(s) and OS(s) this was tested with:

Ran Backstop.js tests a couple of times: Latest test is https://spectrum-visual-regression.ci.corp.adobe.com/job/spectrum-css-vr-test-asset/157/artifact/spectrum-css/backstop_data/html_report/index.html

Tested on MacOS 10.14.5 (18F203)
on Chrome Version 80.0.3968.0 (Official Build) canary (64-bit)

  1. Run:
yarn install 
gulp dev
  1. Visit locally:

New pages:

Body
Code
Detail
Heading

Old pages:
Typography page
Typography International page

Screenshots

Screen Shot 2019-12-12 at 20 02 25

Screen Shot 2019-12-12 at 20 02 19

To-do list

  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • This pull request is ready to merge.



/* T-Shirt sizes for .spectrum-Article */
.spectrum-Article {
Copy link
Contributor

Choose a reason for hiding this comment

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

Serif is an option independent of an Article. For the update, I'm not sure it makes any sense to retain this old wrapper concept 🤔. @GarthDB pinging for input.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GarthDB @NateBaldwinDesign we have 2 options here:

  1. Keep it wrapped in this .spectrum-Article wrapper class and duplicate all the rules outside in the root level. This will increase file size.
  2. Remove this wrapper class and move all of the classes in the root level. This will be most efficient in class name reduction.

Let me know what you prefer.

Copy link
Member

Choose a reason for hiding this comment

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

I'd default to @NateBaldwinDesign on this. The wrapper is a convenience if everything in the article would use the serif if that's not the case, article should be a variant and not a wrapper.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @GarthDB . I will remove the wrapper class and update the documentation.

@mixin typographyTShirtSizes .spectrum-BodyXS, body-serif-XS {}
@mixin typographyTShirtSizes .spectrum-BodyXXS, body-serif-XS {}

@mixin typographyTShirtSizes .spectrum-HeadingXXXL--light, heading-light-XXXL {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure why we would include sans-serif classnames under "Article"? I expected to see only the serif options in this wrapper class considering the previously mentioned paradigm of the previous typography

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoops, my bad. should be all serif.

@mixin typographyTShirtSizes .spectrum-HeadingXL--heavy, heading-heavy-XL {}
@mixin typographyTShirtSizes .spectrum-HeadingL--heavy, heading-heavy-L {}

/* These don't exist */
Copy link
Contributor

Choose a reason for hiding this comment

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

is there an issue already filed to un-comment these when DNA is released with these options?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

logged here as a subtask of the typography updates:

SDS-4454 Typography heading sizes: missing DNA tokens

@NateBaldwinDesign
Copy link
Contributor

NateBaldwinDesign commented Nov 25, 2019

@bernhard-adobe please make sure that all font weights are included in the Typekit for Spectrum-CSS. It appears that weights heavier than bold are not included. This screenshot shows Heading XXL default (top) and Heading XXL Strong (bottom). By default, Heading is bold (font weight 700), but for <strong>, the font weight is black (font weight 900). DNA is providing the proper weight value, but it does not appear to be rendering.
image

Looks like this issue exists for the current typography as well.

The font weights we need to support are:
Light, regular, bold, extrabold (han only), black. All of these weights need to support italic.

In DNA, we have them specified with the following numbers, which correspond to CSS font weight numbers.

Numeric Weight
300 Light
400 Regular
700 Bold
800 Extra-bold
900 Black

@NateBaldwinDesign
Copy link
Contributor

Here is an additional reference comparing font weights as we have them defined in DNA and what is being rendered in Spectrum-CSS. I've added a hideous thick red border to the items that have incorrect font weights in CSS. Again, I believe this is due to the Typekit not pulling in all necessary styles/weights of Adobe Clean.
image

@NateBaldwinDesign
Copy link
Contributor

NateBaldwinDesign commented Nov 25, 2019

It also appears as though the internationalized fonts are not included either. When reviewing the Han examples, the letterforms "XXL" did not appear correct. Upon inspection I believe that this is not Adobe Clean Han. It would be good if we have all of the font families specified for CJK languages included in Spectrum-CSS's docs site so that we can accurately review the implementation.

Below is a screenshot of Spectrum-CSS Han example as-is:
image

And here is how it would appear when referencing Adobe Clean Han:
image

@NateBaldwinDesign
Copy link
Contributor

It appears none of the font stacks are coming directly from DNA. This becomes evident in the fonts listed to use for Arabic and Hebrew, which differ from what's defined in DNA. I would like to discuss this file:

--spectrum-font-family-ar: 'adobe-arabic', 'myriad-arabic', var(--spectrum-font-fallbacks-sans);
and how we can ensure that CSS pulls these fallback font stacks from DNA here: https://git.corp.adobe.com/Spectrum/spectrum-dna/blob/master/data/aliases/StaticAliases.mjs#L59

Comment on lines 305 to 306
<p class="spectrum-DetailM">DetailL <em class="spectrum-DetailM--light">DetailM Emphasis</em> <strong class="spectrum-DetailL--strong">DetailM Strong</strong>.</p>
<p class="spectrum-DetailS">DetailL <em class="spectrum-DetailS--light">DetailS Emphasis</em> <strong class="spectrum-DetailL--strong">DetailS Strong</strong>.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Docs incorrectly label examples as "DetailL" for Medium and Small

Copy link
Contributor Author

@bernhard-adobe bernhard-adobe Dec 3, 2019

Choose a reason for hiding this comment

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

It appears none of the font stacks are coming directly from DNA. This becomes evident in the fonts listed to use for Arabic and Hebrew, which differ from what's defined in DNA. I would like to discuss this file:

--spectrum-font-family-ar: 'adobe-arabic', 'myriad-arabic', var(--spectrum-font-fallbacks-sans);

and how we can ensure that CSS pulls these fallback font stacks from DNA here: https://git.corp.adobe.com/Spectrum/spectrum-dna/blob/master/data/aliases/StaticAliases.mjs#L59

Just to clarify: arabic & hebrew use myriad and the rest is going to use adobe clean in it's international versions?
I am not sure why those were hard-coded here, maybe @GarthDB knows more about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is there an option for --spectrum-font-family-base: 'adobe-clean-ux', 'adobe-clean', 'Source Sans Pro', var(--spectrum-font-fallbacks-sans); ?

@NateBaldwinDesign
Copy link
Contributor

NateBaldwinDesign commented Nov 25, 2019

Please add examples of "Detail Light" and "Detail Serif" to this section
image

@bernhard-adobe
Copy link
Contributor Author

Here is an additional reference comparing font weights as we have them defined in DNA and what is being rendered in Spectrum-CSS. I've added a hideous thick red border to the items that have incorrect font weights in CSS. Again, I believe this is due to the Typekit not pulling in all necessary styles/weights of Adobe Clean.
image

We will have to ask @misterbrownlee for either making the update or providing us the credentials.
Ticket here: https://jira.corp.adobe.com/browse/SDS-4460

@bernhard-adobe
Copy link
Contributor Author

bernhard-adobe commented Dec 3, 2019

It also appears as though the internationalized fonts are not included either. When reviewing the Han examples, the letterforms "XXL" did not appear correct. Upon inspection I believe that this is not Adobe Clean Han. It would be good if we have all of the font families specified for CJK languages included in Spectrum-CSS's docs site so that we can accurately review the implementation.

Below is a screenshot of Spectrum-CSS Han example as-is:
image

And here is how it would appear when referencing Adobe Clean Han:
image

This looks like another update to the Typekit instance.

Copy link
Contributor Author

@bernhard-adobe bernhard-adobe left a comment

Choose a reason for hiding this comment

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

Please add examples of "Detail Light" and "Detail Serif" to this section
image

I think the class spectrum-Article as a parent will set the detail into serif.
Maybe @GarthDB knows if we should continue with this wrapper class to get serif.

I added the light option. Notice the serif option below the san-serif.
Screen Shot 2019-12-03 at 14 20 23

@GarthDB
Copy link
Member

GarthDB commented Dec 9, 2019

Great and extensive work @bernhard-adobe and @NateBaldwinDesign.
the-best

@NateBaldwinDesign
Copy link
Contributor

@bernhard-adobe just to follow-up on the Slack conversation: for serif, we should use the classname spectrum-Typography--serif as a replacement for spectrum-Article.

@bernhard-adobe
Copy link
Contributor Author

blocked currently by the Typekit update: https://jira.corp.adobe.com/browse/SDS-4460

@lazd
Copy link
Member

lazd commented Dec 12, 2019

@bernhard-adobe now that the Typekit updated has been made, is there anything else remaining on this PR? If not, we can go ahead and merge and release it tomorrow!

@bernhard-adobe bernhard-adobe changed the title WIP feat: adding t-shirt sized typography (SDS-2513) #210 feat: adding t-shirt sized typography (SDS-2513) #210 Dec 13, 2019
@bernhard-adobe
Copy link
Contributor Author

@lazd This is ready for review.
We should discuss if we should hide of of that depreciated typography as I feel that it might clutter up a bit the sidebar navigation.

@lazd
Copy link
Member

lazd commented Dec 13, 2019

@bernhard-adobe the sidebar clutter is real, but it shouldn't hold up this PR.

@GarthDB, if this is good to go in your opinion, I say merge it!

@lazd
Copy link
Member

lazd commented Feb 6, 2020

I am working on correcting the component statuses and links on this PR and will merge shortly.

@bernhard-adobe
Copy link
Contributor Author

@lazd branched of this branch and created PR #523 to address some more documentation issues and bugs.

* docs: support hiding examples, disabling fastLoad

* docs: support changing Variants heading, enable Spectrum cards

* docs: correct Typography example status, markup errors, and <h1> usage

* add Typography landing page
* also, hide old Typography (but link to it from the main page)

* docs: remove Tool from menu, fix ButtonGroup Spectrum link

* also, add link to Tool in ActionButton description

* docs: correct Heading component description

* docs: use the descriptions from the Spectrum site

* docs: correct spelling mistake
@lazd lazd merged commit 3921bcb into master Feb 7, 2020
@GarthDB GarthDB deleted the SDS-2513 branch February 14, 2020 17:56
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.

6 participants