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

[WNMGDS-2861] Adds Email, Link, RSS & What's New Icon components #3202

Merged
merged 4 commits into from
Aug 15, 2024

Conversation

tamara-corbalt
Copy link
Collaborator

@tamara-corbalt tamara-corbalt commented Aug 13, 2024

Summary

Adds four new icon components:

  • EmailIcon
  • LinkIcon
  • RssIcon
  • WhatsNewIcon

See Jira ticket for details: WNMGDS-2861. Please note that a Download icon has already been added to the codebase.

How to test

  1. Run yarn storybook.
  2. Navigate to the Icons section and verify the presence and appearance of the new icons.

Checklist

  • Prefixed the PR title with the Jira ticket number as [WNMGDS-####] Title or [NO-TICKET] if this is unticketed work.
  • Selected appropriate Type (only one) label for this PR, if it is a breaking change, label should only be Type: Breaking
  • Selected appropriate Impacts, multiple can be selected.
  • Selected appropriate release milestone
Screenshot 2024-08-14 at 3 19 39 PM Screenshot 2024-08-14 at 3 19 57 PM Screenshot 2024-08-14 at 3 20 07 PM Screenshot 2024-08-14 at 3 20 23 PM Screenshot 2024-08-14 at 3 20 49 PM

@tamara-corbalt tamara-corbalt added Impacts: Core Impacts the core DS primarily, changes may occur in other themes as well. Type: Added Indicates a new feature. labels Aug 13, 2024
@tamara-corbalt tamara-corbalt added this to the 12.0.0-beta.0 milestone Aug 13, 2024
@tamara-corbalt tamara-corbalt self-assigned this Aug 13, 2024
Copy link
Collaborator

@malloryiden malloryiden left a comment

Choose a reason for hiding this comment

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

🎉

Copy link
Collaborator

@jack-ryan-nava-pbc jack-ryan-nava-pbc left a comment

Choose a reason for hiding this comment

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

LGTM! Question about the viewBox control/params: we don't have any controls set up in Storybook, should we?

@tamara-corbalt
Copy link
Collaborator Author

@jack-ryan-nava-pbc I like the idea of supporting viewBox controls because it gives Storybook users the flexibility to customize the icons. However, I'm concerned about the added complexity to our Storybook configuration and the potential for misuse. Could changing the proportions of the icons potentially distort the layout of the icon table?


const defaultProps = {
className: '',
viewBox: '0 0 32 32',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nothing wrong here, just a callout that it's interesting the viewBox is the same for all new icons. I wonder if there's an opportunity to standardize our icons in the future?

"star": "Star",
"starEmpty": "Empty Star",
"starFilled": "Filled Star",
"starHalf": "Half Star",
"usaLogo": "USA.gov - Government Made Easy",
"warning": "Warning"
"warning": "Warning",
"whatsNew": "What's New"
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: replace this quote with one that sparks joy for typography enthusiasts

Suggested change
"whatsNew": "What's New"
"whatsNew": "Whats New"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kim-cmsds I love the idea of sparking joy for typography enthusiasts. Will make the change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kim-cmsds, I made the change to use a curly apostrophe (’), but I'm noticing a tiny box appearing around it in vs code. I'm not sure what this signifies or if it indicates a potential issue with the character encoding?
Screenshot 2024-08-14 at 12 51 00 PM

Copy link
Collaborator

Choose a reason for hiding this comment

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

That same curly apostrophe is used here:

"introText": "We take your privacy seriously. You can change the settings for each category to choose how we collect and use information while you’re on {{domain}}.",

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kim-cmsds: updated to a curly apostrophe in this json file, as well as icons.stories.tsx

@tamara-corbalt tamara-corbalt merged commit 498c86f into main Aug 15, 2024
1 check passed
@tamara-corbalt tamara-corbalt deleted the tamara/wnmgds-2861-add-utility-icons-2 branch August 15, 2024 17:01
jack-ryan-nava-pbc pushed a commit that referenced this pull request Aug 15, 2024
* Adds Email and RSS icons.

* Adds Link and What's New Icons

* Exchange (') for curly (’)
jack-ryan-nava-pbc added a commit that referenced this pull request Sep 10, 2024
* Initial file creation and addition of copy

* Punctuation updates.

* Updating snapshots

* Revert "Updating snapshots"

This reverts commit fd0f3bc.

* [WNMGDS-2861] Adds PrintIcon component (#3196)

* Add PrintIcon component.

* Removed fillColor attribute from PrintIcon componet and removed lint from incons.stories.tsx

* [WNMGDS-2878] Render Doc Site stories for Modal Dialog and Drawer (#3203)

Copy changes and add ability to handle control arguments

* Added print icon

* [WNMGDS-2861] Adds Email, Link, RSS & What's New Icon components (#3202)

* Adds Email and RSS icons.

* Adds Link and What's New Icons

* Exchange (') for curly (’)

* Adding all icons and text

* Making left icon boolean text explicitly relate to Figma

* Ghost buttons and two columns

* Addressed much feedback

* Revise examples box

* [NO-TICKET] Automatically format json files (#3206)

* Run prettier on json files

* Update lint-staged config to format json files

* [WNMGDS-2875] Fix Release script take 2 (#3205)

* Export vars and function needed in release script

* Reorder imports and add new reviewers

* Add new utility functions used by bumpVersions

* Handle staging files properly

* Export correct function from versions

* export readJson so maybe we capture new line with read file'
'

* big refactor add comments break up inline for loop and associated functions

* Wrap removal of top level package json in try catch and uncomment woopsie

* Add maybe more helpful comment

* Further refactoring

* Looks like a big refactor but basically moved all code to a new file

* Adding functionality so we don't lose newline at end of json files

* [NO-TICKET] Automatically format json files (#3206)

* Run prettier on json files

* Update lint-staged config to format json files

* Undo new line addition when writing json

* Fix typo

* Move version number into our main function to make usage clearer

---------

Co-authored-by: Patrick Wolfert <[email protected]>

* [RELEASE] 8/12 Version bump main (#3200)

* Publish

 - @cmsgov/[email protected]
 - @cmsgov/[email protected]
 - @cmsgov/[email protected]
 - @cmsgov/[email protected]

* [NO-TICKET] Manually updates "@cmsgov/design-system" version in package dependencies (#3201)

manually updates dependency of "@cmsgov/design-system" version

* Reverts design-system-tokens version back to 0.0.1

---------

Co-authored-by: Kim Niedermaier <[email protected]>
Co-authored-by: Patrick Wolfert <[email protected]>

* [WNMGDS-2884] Add `cmsds-migrate` script for v11 CSS changes (#3208)

* Basic migration script for v11 variable/class changes

* These two variables weren't removed!

We need to update our release notes, because that was a mistake

* Fix syntax error (stray single quote)

* Fix regex group not getting printed in the replacement text

* Mention the migration script in the blog post and explain how to use it

* [WNMGDS-2890] Fix `onAnalyticsEvent` attribute rendering to DOM through `HelpDrawer` (#3210)

Fix `onAnalyticsEvent` prop bleeding into `dialog` DOM elements through `HelpDrawer`

Without this fix, the unit test I added will print errors to the console like this:

```
console.error
    Warning: Unknown event handler property `onAnalyticsEvent`. It will be ignored.
        at dialog
        at NativeDialog (/Users/patrickwolfert/Projects/design-system/packages/design-system/src/components/NativeDialog/NativeDialog.tsx:38:3)
        at Drawer (/Users/patrickwolfert/Projects/design-system/packages/design-system/src/components/Drawer/Drawer.tsx:73:5)
        at HelpDrawer (/Users/patrickwolfert/Projects/design-system/packages/design-system/src/components/HelpDrawer/HelpDrawer.tsx:13:11)
```

* [NO-TICKET] Define a better return type for `defaultMenuLinks` (#3211)

Be more informative about what `defaultMenuLinks` returns in the types

Previously the return type was `{}`, which is useless to teams trying to use that functions themselves

* [NO-TICKET] Revises release v11 blog post (#3213)

update v11 blog post to remove reference to removing the privacy settings dialog

* [NO-TICKET] Exclude core design system from dependency update (#3217)

* filter out the core design system

* Add comment and make conditional more readable

* make conditional more readable

* [WNMGDS-2713] Add default value overrides to Storybook (#3216)

* Initial set of default values added to props tables

* Updated storybook snaps

* [WNMGDS-2838] Update all themes to make inline tool tips black (#3199)

* Update all themes to make inline tool tips black

* Udpate playwright vrt snapshots

* Updating css snapshots

* Updated css themes and custom tooltip scss styling to maybe no avail

* setting tooltip color to match base color of surrounding text

* Restore weirdly changed snapshots curious if CI browser tests pass

* [WNMGDS-2875] Fix Release script take 2 (#3205)

* Export vars and function needed in release script

* Reorder imports and add new reviewers

* Add new utility functions used by bumpVersions

* Handle staging files properly

* Export correct function from versions

* export readJson so maybe we capture new line with read file'
'

* big refactor add comments break up inline for loop and associated functions

* Wrap removal of top level package json in try catch and uncomment woopsie

* Add maybe more helpful comment

* Further refactoring

* Looks like a big refactor but basically moved all code to a new file

* Adding functionality so we don't lose newline at end of json files

* [NO-TICKET] Automatically format json files (#3206)

* Run prettier on json files

* Update lint-staged config to format json files

* Undo new line addition when writing json

* Fix typo

* Move version number into our main function to make usage clearer

---------

Co-authored-by: Patrick Wolfert <[email protected]>

* Undoing accidental hover styling change

---------

Co-authored-by: Patrick Wolfert <[email protected]>

* Revert "Updating snapshots"

This reverts commit fd0f3bc.

* Addition of tabble and new content

* Added content and table

* Fixed table and aria labels

---------

Co-authored-by: Tamara deMent (Corbalt) <[email protected]>
Co-authored-by: Patrick Wolfert <[email protected]>
Co-authored-by: Kim Niedermaier <[email protected]>
@kim-cmsds kim-cmsds modified the milestones: 12.0.0-beta.0, 11.1.0 Oct 9, 2024
kim-cmsds pushed a commit that referenced this pull request Oct 17, 2024
* Adds Email and RSS icons.

* Adds Link and What's New Icons

* Exchange (') for curly (’)
kim-cmsds added a commit that referenced this pull request Oct 17, 2024
* Initial file creation and addition of copy

* Punctuation updates.

* Updating snapshots

* Revert "Updating snapshots"

This reverts commit fd0f3bc.

* [WNMGDS-2861] Adds PrintIcon component (#3196)

* Add PrintIcon component.

* Removed fillColor attribute from PrintIcon componet and removed lint from incons.stories.tsx

* [WNMGDS-2878] Render Doc Site stories for Modal Dialog and Drawer (#3203)

Copy changes and add ability to handle control arguments

* Added print icon

* [WNMGDS-2861] Adds Email, Link, RSS & What's New Icon components (#3202)

* Adds Email and RSS icons.

* Adds Link and What's New Icons

* Exchange (') for curly (’)

* Adding all icons and text

* Making left icon boolean text explicitly relate to Figma

* Ghost buttons and two columns

* Addressed much feedback

* Revise examples box

* [NO-TICKET] Automatically format json files (#3206)

* Run prettier on json files

* Update lint-staged config to format json files

* [WNMGDS-2875] Fix Release script take 2 (#3205)

* Export vars and function needed in release script

* Reorder imports and add new reviewers

* Add new utility functions used by bumpVersions

* Handle staging files properly

* Export correct function from versions

* export readJson so maybe we capture new line with read file'
'

* big refactor add comments break up inline for loop and associated functions

* Wrap removal of top level package json in try catch and uncomment woopsie

* Add maybe more helpful comment

* Further refactoring

* Looks like a big refactor but basically moved all code to a new file

* Adding functionality so we don't lose newline at end of json files

* [NO-TICKET] Automatically format json files (#3206)

* Run prettier on json files

* Update lint-staged config to format json files

* Undo new line addition when writing json

* Fix typo

* Move version number into our main function to make usage clearer

---------

Co-authored-by: Patrick Wolfert <[email protected]>

* [RELEASE] 8/12 Version bump main (#3200)

* Publish

 - @cmsgov/[email protected]
 - @cmsgov/[email protected]
 - @cmsgov/[email protected]
 - @cmsgov/[email protected]

* [NO-TICKET] Manually updates "@cmsgov/design-system" version in package dependencies (#3201)

manually updates dependency of "@cmsgov/design-system" version

* Reverts design-system-tokens version back to 0.0.1

---------

Co-authored-by: Kim Niedermaier <[email protected]>
Co-authored-by: Patrick Wolfert <[email protected]>

* [WNMGDS-2884] Add `cmsds-migrate` script for v11 CSS changes (#3208)

* Basic migration script for v11 variable/class changes

* These two variables weren't removed!

We need to update our release notes, because that was a mistake

* Fix syntax error (stray single quote)

* Fix regex group not getting printed in the replacement text

* Mention the migration script in the blog post and explain how to use it

* [WNMGDS-2890] Fix `onAnalyticsEvent` attribute rendering to DOM through `HelpDrawer` (#3210)

Fix `onAnalyticsEvent` prop bleeding into `dialog` DOM elements through `HelpDrawer`

Without this fix, the unit test I added will print errors to the console like this:

```
console.error
    Warning: Unknown event handler property `onAnalyticsEvent`. It will be ignored.
        at dialog
        at NativeDialog (/Users/patrickwolfert/Projects/design-system/packages/design-system/src/components/NativeDialog/NativeDialog.tsx:38:3)
        at Drawer (/Users/patrickwolfert/Projects/design-system/packages/design-system/src/components/Drawer/Drawer.tsx:73:5)
        at HelpDrawer (/Users/patrickwolfert/Projects/design-system/packages/design-system/src/components/HelpDrawer/HelpDrawer.tsx:13:11)
```

* [NO-TICKET] Define a better return type for `defaultMenuLinks` (#3211)

Be more informative about what `defaultMenuLinks` returns in the types

Previously the return type was `{}`, which is useless to teams trying to use that functions themselves

* [NO-TICKET] Revises release v11 blog post (#3213)

update v11 blog post to remove reference to removing the privacy settings dialog

* [NO-TICKET] Exclude core design system from dependency update (#3217)

* filter out the core design system

* Add comment and make conditional more readable

* make conditional more readable

* [WNMGDS-2713] Add default value overrides to Storybook (#3216)

* Initial set of default values added to props tables

* Updated storybook snaps

* [WNMGDS-2838] Update all themes to make inline tool tips black (#3199)

* Update all themes to make inline tool tips black

* Udpate playwright vrt snapshots

* Updating css snapshots

* Updated css themes and custom tooltip scss styling to maybe no avail

* setting tooltip color to match base color of surrounding text

* Restore weirdly changed snapshots curious if CI browser tests pass

* [WNMGDS-2875] Fix Release script take 2 (#3205)

* Export vars and function needed in release script

* Reorder imports and add new reviewers

* Add new utility functions used by bumpVersions

* Handle staging files properly

* Export correct function from versions

* export readJson so maybe we capture new line with read file'
'

* big refactor add comments break up inline for loop and associated functions

* Wrap removal of top level package json in try catch and uncomment woopsie

* Add maybe more helpful comment

* Further refactoring

* Looks like a big refactor but basically moved all code to a new file

* Adding functionality so we don't lose newline at end of json files

* [NO-TICKET] Automatically format json files (#3206)

* Run prettier on json files

* Update lint-staged config to format json files

* Undo new line addition when writing json

* Fix typo

* Move version number into our main function to make usage clearer

---------

Co-authored-by: Patrick Wolfert <[email protected]>

* Undoing accidental hover styling change

---------

Co-authored-by: Patrick Wolfert <[email protected]>

* Revert "Updating snapshots"

This reverts commit fd0f3bc.

* Addition of tabble and new content

* Added content and table

* Fixed table and aria labels

---------

Co-authored-by: Tamara deMent (Corbalt) <[email protected]>
Co-authored-by: Patrick Wolfert <[email protected]>
Co-authored-by: Kim Niedermaier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impacts: Core Impacts the core DS primarily, changes may occur in other themes as well. Type: Added Indicates a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants