Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Add pricing theme to Note component #416

Merged
merged 8 commits into from
Mar 9, 2021
Merged

Add pricing theme to Note component #416

merged 8 commits into from
Mar 9, 2021

Conversation

HeyStenson
Copy link
Contributor

This PR creates a new theme that we can use for notes that are specifically about pricing topics. @jc-clark lmk what you think - is the shopping cart icon too on the nose? 😆 If so, we could definitely change it to something else from https://labs.mapbox.com/assembly/icons/ (maybe alert?).

Screen Shot 2021-03-05 at 4 44 39 PM

How to test

QA checklist

  • No errors logged to console.
  • Accessibility score in Chrome DevTools Audit/Lighthouse is 100% with Lighthouse version: #.#.#.
  • Component is accessible at mobile-size viewport.
  • Component is accessible at tablet-size viewport.
  • Component is accessible at laptop-size viewport.
  • Component is accessible at big-monitor-size viewport.

Open the test cases app locally on:

  • Chrome, no errors logged to console.
  • Firefox, no errors logged to console.
  • Safari, no errors logged to console.
  • Edge, no errors logged to console.
  • Mobile Safari, no errors logged to console.
  • Android Chrome, no errors logged to console.

Before merge

  • Add entry to CHANGELOG.md to describe changes.
  • If updating dependencies or creating a release, run npx browserslist@latest --update-db to update the browser data and commit any changes to package-lock.json.

Copy link
Contributor

@katydecorah katydecorah left a comment

Choose a reason for hiding this comment

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

🤑 🤑 🤑 Left a few notes!

@@ -93,6 +93,15 @@ const themes = {
color: '#cf1c61',
borderColor: '#fd8ac0'
}
},
pricing: {
image: <Image icon="cart" color="green" />,
Copy link
Contributor

Choose a reason for hiding this comment

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

@HeyStenson What do you think about creditcard?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Much better! I didn't see that one, probably bc I was too fixated on finding 💸 😆

Copy link

Choose a reason for hiding this comment

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

wow this is so great!

},
pricing: {
image: <Image icon="cart" color="green" />,
label: 'Download',
Copy link
Contributor

Choose a reason for hiding this comment

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

@HeyStenson This will be the default title for the Note so you'll want to switch this label to "Pricing" or something similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eep, copy-paste fail. Thanks for catching this!

<div>
{' '}
<Note theme="pricing">pricing note</Note>
<Tag theme="pricing" />
Copy link
Contributor

Choose a reason for hiding this comment

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

@HeyStenson do you think you'll be using a pricing Tag? Just checking since some themes have a tag, other don't. If you do have use for a pricing tag, you'll also want to update the Tag component's propTypes to include "pricing" as a theme option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh hmmm, I hadn't considered this! But I think it could be useful - we could use it to differentiate pricing pages in the list of guides. I'll add this in!

@HeyStenson
Copy link
Contributor Author

Thanks @katydecorah! I updated the icon for the note theme from 🛒 to 💳 , and added a tag.

Screen Shot 2021-03-05 at 4 44 39 PM | Screen Shot 2021-03-08 at 2 41 44 PM

Copy link

@jc-clark jc-clark 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 for this awesome follow up, @HeyStenson! Your last screenshot still has the shopping cart. Did it change?

and for helping out, @katydecorah!

Copy link
Contributor

@katydecorah katydecorah left a comment

Choose a reason for hiding this comment

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

💸 💸 💸

pricing: {
image: <Image icon="creditcard" color="green" />,
label: 'Pricing',
tooltipText: 'This contains information about product pricing.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@HeyStenson
Copy link
Contributor Author

@jc-clark loool, apparently I just pasted the old screenshot 😅 here's the new screenshot with the creditcard icon:

Screen Shot 2021-03-08 at 2 42 10 PM

@HeyStenson
Copy link
Contributor Author

@katydecorah are there any other changes coming up to wait for, or should we cut a new release for this change only?

@katydecorah
Copy link
Contributor

@HeyStenson Nothing else! You can cut a release for this change only.

@HeyStenson HeyStenson merged commit a21d1c9 into main Mar 9, 2021
@HeyStenson HeyStenson deleted the pricing-note branch March 9, 2021 21:13
katydecorah pushed a commit that referenced this pull request Mar 24, 2021
* main: (24 commits)
  3.3.1
  Prepare 3.3.1
  The `edit.css` prop is optional when displaying `Edit` in `CodeSnippet` (#421)
  3.3.0
  Prepare 3.3.0
  Bump elliptic from 6.5.3 to 6.5.4 (#417)
  When `maxHeight` is set, move `Edit` buttons in `CodeSnippet` above the code (#420)
  Update CONTRIBUTING.md (#418)
  3.2.0
  update version number in changelog
  Add pricing theme to Note component (#416)
  3.1.0
  Prepare 3.1.0
  Make `filename` required for `CodeSnippetTitle` (#413)
  Update package-lock.json (#412)
  Make `css` optional in Edit and CodeSnippet components (#293)
  Remove HelpPage, NavigationDropdown, SectionedNavigation, TopbarSticker, Topbar components (#407)
  Update prism (#411)
  3.0.1
  Fix CSS for code elements in headings (#409)
  ...
katydecorah pushed a commit that referenced this pull request Mar 24, 2021
* main: (24 commits)
  3.3.1
  Prepare 3.3.1
  The `edit.css` prop is optional when displaying `Edit` in `CodeSnippet` (#421)
  3.3.0
  Prepare 3.3.0
  Bump elliptic from 6.5.3 to 6.5.4 (#417)
  When `maxHeight` is set, move `Edit` buttons in `CodeSnippet` above the code (#420)
  Update CONTRIBUTING.md (#418)
  3.2.0
  update version number in changelog
  Add pricing theme to Note component (#416)
  3.1.0
  Prepare 3.1.0
  Make `filename` required for `CodeSnippetTitle` (#413)
  Update package-lock.json (#412)
  Make `css` optional in Edit and CodeSnippet components (#293)
  Remove HelpPage, NavigationDropdown, SectionedNavigation, TopbarSticker, Topbar components (#407)
  Update prism (#411)
  3.0.1
  Fix CSS for code elements in headings (#409)
  ...
katydecorah pushed a commit that referenced this pull request Mar 29, 2021
* main:
  3.3.1
  Prepare 3.3.1
  The `edit.css` prop is optional when displaying `Edit` in `CodeSnippet` (#421)
  3.3.0
  Prepare 3.3.0
  Bump elliptic from 6.5.3 to 6.5.4 (#417)
  When `maxHeight` is set, move `Edit` buttons in `CodeSnippet` above the code (#420)
  Update CONTRIBUTING.md (#418)
  3.2.0
  update version number in changelog
  Add pricing theme to Note component (#416)
katydecorah pushed a commit that referenced this pull request Apr 14, 2021
* main: (93 commits)
  Enforces where React component static properties should be positioned (#429)
  Node 12 (#428)
  3.3.1
  Prepare 3.3.1
  The `edit.css` prop is optional when displaying `Edit` in `CodeSnippet` (#421)
  3.3.0
  Prepare 3.3.0
  Bump elliptic from 6.5.3 to 6.5.4 (#417)
  When `maxHeight` is set, move `Edit` buttons in `CodeSnippet` above the code (#420)
  Update CONTRIBUTING.md (#418)
  3.2.0
  update version number in changelog
  Add pricing theme to Note component (#416)
  3.1.0
  Prepare 3.1.0
  Make `filename` required for `CodeSnippetTitle` (#413)
  Update package-lock.json (#412)
  Make `css` optional in Edit and CodeSnippet components (#293)
  Remove HelpPage, NavigationDropdown, SectionedNavigation, TopbarSticker, Topbar components (#407)
  Update prism (#411)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants