Conversation
|
|
||
| return ( | ||
| <Tag className={classStack} {...attrs}> | ||
| <div className="Alert-body"> |
There was a problem hiding this comment.
BEM stylings dictate this should be Alert__body instead of Alert-body. It also looks like you aren't adding any styles to this div. Is it necessary to include?
| @@ -0,0 +1,10 @@ | |||
| # Alert | |||
|
|
|||
There was a problem hiding this comment.
Some documentation here would be great! Even if it's minimal! I think some explanation on the contexts of each variant would be very useful here.
There was a problem hiding this comment.
I have updated documentation and extended "global colors" within our variables. In addition, I have extended the alert type based on level it's being used, as it seems to be a common trend across projects (page/form and field-level type)
That was also partially the reason why I had that body inner container for alerts that may be page-level where the colored background extends to edges of your viewport but the messaging retains body copy width and is centered.
Additionally, I assumed we may have an example with close button as well.
There was a problem hiding this comment.
I think this conversation is important. I think what we want to add to FC are elements that are atomic enough we don't need to generalize them. You had good thoughts on including that internal container, and a close button. But because those are things we have to 'cut' to make this new tag general enough for FC, is that a component we want to include in our starting library? Thoughts @drolsen @elseloop @bstaruk ?
There was a problem hiding this comment.
With @bstaruk we’ve been debating hat maybe some of these tags don’t necesaeily need to merged into master, maybe just keep them in dev, or have a branch with our internal components we tend to reuse a lot on projects.
When it comes to alerts, I’ve been seeing them as one of the common tags in our pattern libraries, as almost every site out there has some form of notifications.
Let’s definiteky keep talking on what we should consider adding to our base and what we should archive some place for easy reuse upon needs.
There was a problem hiding this comment.
I'm seeing this as a "when needed" vs. baseline tag as well. However, I don't want us to lose these (and more) great pieces of work by not capturing them somewhere useful for us. I think it might be time for us to create a third branch called "library" that sits along develop and master.
I propose each dev will need to determine if what they are pushing is going to be for this new library branch or baseline develop from now on and PR accordingly.
We will continue our normal review process to ensure we all have a chance to agree upon any changes requested. As we start new projects, we simply keep library in our back pockets and pick what we need, when we need, and modify from there.
Thoughts?
| export default [{ | ||
| name: 'Default Alert', | ||
| component: ( | ||
| <Alert>Lorem ipsum</Alert> |
There was a problem hiding this comment.
It looks like you may have intended this example to be labeled 'Default Example' in the HTML, and the below example to read 'Success alert'
| @@ -0,0 +1,47 @@ | |||
| .Alert { | |||
| background-color: #f1f1f1; | |||
There was a problem hiding this comment.
It would be helpful to create color variables for these background-colors in the 'variables/colors.css' file. That way they are more easily targeted when a project gets up and running. They would fit well under the /* general colors */ comment.
…tyles. - created general color variables that can be reused for commonly used tags or components.
…t link variant as well for easy reuse. Still need to finish few more touches on alerts to make it more "complete"
… to make them accessible
…ify the styles around it
…ify the styles around it
…endering and applied background images to body, instead of parent container so the icon would retain positiining in relation to body, mainly seen on page-level messaging versus fomr-level.
|
I've made bunch updates and improvements while making sure it also passes accessibility. All there is left to resolve the SVG issue, so all the icons would render as expected. Then we can decide where we could add this component, within FC core or elsewhere for future use on new projects. |
- made green color lighter and removed background image from field-level alerts
…olecule instead of Atom.
|
Just wanted to let you @bstaruk @CSKingMartin and @drolsen know that I have updated this branch with Atomic FC and moved |
Yet another common tag or component we tend to use on each project, so wanted to add it in. :)
I just created some basic styles for success, warning, error and information messaging.