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

Add warning and error themes to Note - #102

Merged
katydecorah merged 10 commits into
masterfrom
note-themes
Feb 6, 2019
Merged

katydecorah merged 10 commits into
masterfrom
note-themes

Conversation

@katydecorah

Copy link
Copy Markdown
Contributor

@colleenmcginnis do you know offhand if we have any sites using the Note component and passing a custom theme to it? This PR proposes to remove passing style-based themes and replace it with keyword themes (default/no theme specified, warning, error). If it's important to be able to customize the note, I can adjust!

fixes #94

@colleenmcginnis

Copy link
Copy Markdown
Contributor

I can't think of any sites where a custom Note is added directly to an md file. The only instance I know of is the WarningNote component https://github.com/mapbox/android-docs/blob/publisher-production/src/components/warning-note.js#L23-L33 (which I know you're already aware of 😉).

@katydecorah katydecorah changed the title [wip] Add warning and error themes to Note Add warning and error themes to Note Feb 4, 2019

@colleenmcginnis colleenmcginnis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if we should add a default background color for each of these to encourage contributors to use colors that go well with the icons. I'm also wondering if we should have some guidelines on when to use each kind of note either here or in the style guide. What do you think @katydecorah?

image

@katydecorah

Copy link
Copy Markdown
Contributor Author

@colleenmcginnis that's a really good point. It is possible to make some not so appetizing combinations right now. I'll work on that!

@katydecorah

Copy link
Copy Markdown
Contributor Author

@colleenmcginnis I decided to reduce the number of example notes. I couldn't think of a good example for a basic not where we'd need to change the image to something different. Please let me know if you have any use cases!

image

image

I've also updated the props for all images to replace width and height with size since we always want those images to be round.

Ready for review!

@colleenmcginnis colleenmcginnis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@katydecorah I think limiting the options (images, size of icon, colors) makes a lot of sense.

I couldn't think of a good example for a basic not where we'd need to change the image to something different. Please let me know if you have any use cases!

If we did want to establish patterns similar to the /android-docs Floater we could use the various icons to indicate the content type. I think this is a task for a follow up PR though, if we decided we do want to do that!

@katydecorah

Copy link
Copy Markdown
Contributor Author

Thanks for reminding me about Floater, I just a ticket stub for that one! #109

Katy DeCorah added 2 commits February 5, 2019 20:09
* master:
  Add CSS to set max-height and style scrollbars for prose code examples (#103)
  [Card/CardContainer] Add new styles for fullwidth cards (#104)
  Add prism.css to create shared syntax styles used commonly across sites (#108)
  Prepare 0.4.0
  [OverviewHeader] Add `contactLink` to create Contact us button (#105)
@katydecorah
katydecorah merged commit 771083c into master Feb 6, 2019
@katydecorah
katydecorah deleted the note-themes branch February 6, 2019 01:15
katydecorah pushed a commit that referenced this pull request Apr 17, 2019
* master: (22 commits)
  fixes bug in firefox where arrow was not vertically centered (#122)
  add swiftype attribute to ignore content blocks (#119)
  0.9.0
  Prepare 0.9.0
  Add BetaFlag component and options to add it to other components (#123)
  Prepare 0.8.1
  [patch] Use babel.config.js and updates build-package.js to output directories (#118)
  Prepare 0.8.0
  create versionSort function (#117)
  Prepare 0.7.0
  Add optional prop for tags for first level items in NavigationAccordion (#115)
  Prepare 0.6.0
  [docs-prose.css] make `.prose pre` rules more specific (#113)
  Add `mb24` to `OverviewHeader` (#112)
  [SectionedNavigation] filter the description if it's available (#111)
  Prepare 0.5.0
  Add warning and error themes to `Note` (#102)
  Add CSS to set max-height and style scrollbars for prose code examples (#103)
  [Card/CardContainer] Add new styles for fullwidth cards (#104)
  Add prism.css to create shared syntax styles used commonly across sites (#108)
  ...
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.

Add themes to Note

2 participants