This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
[terra-avatar] Changed Shared user variant to Generic Avatar variant #2620
Merged
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
aac0063
Changed Shared user to Generic Avatar Varaint
supreethmr c7d376e
Added upgrade Guide for Breaking Changes
supreethmr 5f17135
Upgrade Guide Corrections
supreethmr 4a470cf
export added for constants
supreethmr 07b365e
mergeconflicts
supreethmr 71741fd
Changed Examples for Generic Icon
supreethmr b30d6b9
Merge branch 'master' into Avatar-Provider-Variant
supreethmr 881586c
Updating documentation for Generic variant
supreethmr 8a3b15f
Merge branch 'master' into Avatar-Provider-Variant
supreethmr 8c90d71
Merge branch 'master' into Avatar-Provider-Variant
supreethmr c4a3798
Merge branch 'master' into Avatar-Provider-Variant
supreethmr f944aab
Merge branch 'master' into Avatar-Provider-Variant
supreethmr 4efa018
Merge branch 'master' into Avatar-Provider-Variant
mjhenkes 10260c7
Update packages/terra-avatar/CHANGELOG.md
supreethmr bee5afb
Merge branch 'master' into Avatar-Provider-Variant
supreethmr c03aa55
removed theme variables update from upgrade guide
supreethmr 5d5682b
Added user Icon example in upgrade guide
supreethmr 128dd37
updated changelogs and upgrade guide
supreethmr 8b523a7
corrections to changelog and upgradeguide
supreethmr e921aca
Merge branch 'master' into Avatar-Provider-Variant
ryanthemanuel 5c4d57f
Merge branch 'master' into Avatar-Provider-Variant
supreethmr 4da2553
Update CONTRIBUTORS.md
jeremyfuksa 0990768
Merge remote-tracking branch 'origin/master' into Avatar-Provider-Var…
rm012685 c5d1843
Merge branch 'master' into Avatar-Provider-Variant
ryanthemanuel 46c15fe
Update screenshots
rm012685 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
packages/terra-avatar/docs/shared-user.md → packages/terra-avatar/docs/generic.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Avatar from './variants/Avatar'; | ||
import Facility from './variants/Facility'; | ||
import SharedUser from './variants/SharedUser'; | ||
import Generic from './variants/Generic'; | ||
|
||
export default Avatar; | ||
export { Facility, SharedUser }; | ||
export { Facility, Generic }; |
91 changes: 91 additions & 0 deletions
91
packages/terra-avatar/src/terra-dev-site/doc/avatar/Generic.d.doc.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import React from 'react'; | ||
import DocTemplate from 'terra-doc-template'; | ||
import ReadMe from '../../../../docs/generic.md'; | ||
import { name, version } from '../../../../package.json'; | ||
|
||
// Component Source | ||
import GenericSrc from '!raw-loader!../../../../src/variants/Generic.jsx'; | ||
import SingleUser from '../example/generic/single-user/GenericSingleUser'; | ||
import SingleUserSrc from '!raw-loader!../../../../src/terra-dev-site/doc/example/generic/single-user/GenericSingleUser'; | ||
import SingleUserSize from '../example/generic/single-user/GenericSingleUserSize'; | ||
import SingleUserSizeSrc from '!raw-loader!../../../../src/terra-dev-site/doc/example/generic/single-user/GenericSingleUserSize'; | ||
import SingleUserColorVariants from '../example/generic/single-user/GenericSingleUserColorVariants'; | ||
import SingleUserColorVariantsSrc from '!raw-loader!../../../../src/terra-dev-site/doc/example/generic/single-user/GenericSingleUserColorVariants'; | ||
|
||
import SharedUser from '../example/generic/shared-user/GenericSharedUser'; | ||
import SharedUserSrc from '!raw-loader!../../../../src/terra-dev-site/doc/example/generic/shared-user/GenericSharedUser'; | ||
import SharedUserSize from '../example/generic/shared-user/GenericSharedUserSize'; | ||
import SharedUserSizeSrc from '!raw-loader!../../../../src/terra-dev-site/doc/example/generic/shared-user/GenericSharedUserSize'; | ||
import SharedUserColorVariants from '../example/generic/shared-user/GenericSharedUserColorVariants'; | ||
import SharedUserColorVariantsSrc from '!raw-loader!../../../../src/terra-dev-site/doc/example/generic/shared-user/GenericSharedUserColorVariants'; | ||
|
||
import Provider from '../example/generic/provider/Provider'; | ||
import ProviderSrc from '!raw-loader!../../../../src/terra-dev-site/doc/example/generic/provider/Provider'; | ||
import ProviderSize from '../example/generic/provider/ProviderSize'; | ||
import ProviderSizeSrc from '!raw-loader!../../../../src/terra-dev-site/doc/example/generic/provider/ProviderSize'; | ||
import ProviderColorVariants from '../example/generic/provider/ProviderColorVariants'; | ||
import ProviderColorVariantsSrc from '!raw-loader!../../../../src/terra-dev-site/doc/example/generic/provider/ProviderColorVariants'; | ||
|
||
const DocPage = () => ( | ||
<DocTemplate | ||
packageName={name} | ||
packageVersion={version} | ||
readme={ReadMe} | ||
srcPath={`https://github.com/cerner/terra-core/tree/master/packages/${name}`} | ||
examples={[ | ||
{ | ||
title: 'Single User - Default', | ||
example: <SingleUser />, | ||
source: SingleUserSrc, | ||
}, | ||
{ | ||
title: 'Single User - Override Size', | ||
example: <SingleUserSize />, | ||
source: SingleUserSizeSrc, | ||
}, | ||
{ | ||
title: 'Single User - Toggle Color Variants - Theme Specific', | ||
example: <SingleUserColorVariants />, | ||
source: SingleUserColorVariantsSrc, | ||
}, | ||
{ | ||
title: 'Shared User - Default', | ||
example: <SharedUser />, | ||
source: SharedUserSrc, | ||
}, | ||
{ | ||
title: 'Shared User - Override Size', | ||
example: <SharedUserSize />, | ||
source: SharedUserSizeSrc, | ||
}, | ||
{ | ||
title: 'Shared User - Toggle Color Variants - Theme Specific', | ||
example: <SharedUserColorVariants />, | ||
source: SharedUserColorVariantsSrc, | ||
}, | ||
{ | ||
title: 'Provider - Default', | ||
example: <Provider />, | ||
source: ProviderSrc, | ||
}, | ||
{ | ||
title: 'Provider - Override Size', | ||
example: <ProviderSize />, | ||
source: ProviderSizeSrc, | ||
}, | ||
{ | ||
title: 'Provider - Toggle Color Variants - Theme Specific', | ||
example: <ProviderColorVariants />, | ||
source: ProviderColorVariantsSrc, | ||
}, | ||
]} | ||
propsTables={[ | ||
{ | ||
componentName: 'Generic', | ||
componentSrc: GenericSrc, | ||
}, | ||
]} | ||
/> | ||
); | ||
|
||
export default DocPage; |
47 changes: 0 additions & 47 deletions
47
packages/terra-avatar/src/terra-dev-site/doc/avatar/SharedUser.d.doc.jsx
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
packages/terra-avatar/src/terra-dev-site/doc/example/generic/provider/Provider.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import { Generic } from 'terra-avatar'; | ||
|
||
const AvatarProvider = () => ( | ||
<Generic variant="provider" alt="Provider" /> | ||
); | ||
|
||
export default AvatarProvider; |
15 changes: 15 additions & 0 deletions
15
...es/terra-avatar/src/terra-dev-site/doc/example/generic/provider/ProviderColorVariants.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Generic } from 'terra-avatar'; | ||
import ColorVariantsWrapper from 'terra-avatar/lib/terra-dev-site/doc/example/common/ColorVariantsWrapper'; | ||
|
||
const propTypes = { color: PropTypes.string }; | ||
|
||
const GenericUserColorVariants = ({ | ||
...props | ||
}) => ( | ||
<Generic variant="provider" alt="Provider" color={props.color} /> | ||
); | ||
|
||
GenericUserColorVariants.propTypes = propTypes; | ||
export default ColorVariantsWrapper(GenericUserColorVariants); |
8 changes: 8 additions & 0 deletions
8
packages/terra-avatar/src/terra-dev-site/doc/example/generic/provider/ProviderSize.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import { Generic } from 'terra-avatar'; | ||
|
||
const AvatarSize = () => ( | ||
<Generic variant="provider" alt="Provider" size="2em" /> | ||
); | ||
|
||
export default AvatarSize; |
4 changes: 2 additions & 2 deletions
4
...te/doc/example/shared-user/SharedUser.jsx → ...generic/shared-user/GenericSharedUser.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import React from 'react'; | ||
import { SharedUser } from 'terra-avatar'; | ||
import { Generic } from 'terra-avatar'; | ||
|
||
const AvatarSharedUser = () => ( | ||
<SharedUser alt="Shared User" /> | ||
<Generic variant="shared-user" alt="Shared User" /> | ||
); | ||
|
||
export default AvatarSharedUser; |
15 changes: 15 additions & 0 deletions
15
...tar/src/terra-dev-site/doc/example/generic/shared-user/GenericSharedUserColorVariants.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Generic } from 'terra-avatar'; | ||
import ColorVariantsWrapper from 'terra-avatar/lib/terra-dev-site/doc/example/common/ColorVariantsWrapper'; | ||
|
||
const propTypes = { color: PropTypes.string }; | ||
|
||
const GenericUserColorVariants = ({ | ||
...props | ||
}) => ( | ||
<Generic variant="shared-user" alt="Shared User" color={props.color} /> | ||
); | ||
|
||
GenericUserColorVariants.propTypes = propTypes; | ||
export default ColorVariantsWrapper(GenericUserColorVariants); |
8 changes: 8 additions & 0 deletions
8
...terra-avatar/src/terra-dev-site/doc/example/generic/shared-user/GenericSharedUserSize.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import { Generic } from 'terra-avatar'; | ||
|
||
const AvatarSize = () => ( | ||
<Generic variant="shared-user" alt="Shared User" size="2em" /> | ||
); | ||
|
||
export default AvatarSize; |
8 changes: 8 additions & 0 deletions
8
...ges/terra-avatar/src/terra-dev-site/doc/example/generic/single-user/GenericSingleUser.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import { Generic } from 'terra-avatar'; | ||
|
||
const AvatarSingleUser = () => ( | ||
<Generic variant="single-user" alt="Single User" /> | ||
); | ||
|
||
export default AvatarSingleUser; |
15 changes: 15 additions & 0 deletions
15
...tar/src/terra-dev-site/doc/example/generic/single-user/GenericSingleUserColorVariants.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Generic } from 'terra-avatar'; | ||
import ColorVariantsWrapper from 'terra-avatar/lib/terra-dev-site/doc/example/common/ColorVariantsWrapper'; | ||
|
||
const propTypes = { color: PropTypes.string }; | ||
|
||
const GenericUserColorVariants = ({ | ||
...props | ||
}) => ( | ||
<Generic variant="single-user" alt="Single User" color={props.color} /> | ||
); | ||
|
||
GenericUserColorVariants.propTypes = propTypes; | ||
export default ColorVariantsWrapper(GenericUserColorVariants); |
8 changes: 8 additions & 0 deletions
8
...terra-avatar/src/terra-dev-site/doc/example/generic/single-user/GenericSingleUserSize.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import { Generic } from 'terra-avatar'; | ||
|
||
const AvatarSize = () => ( | ||
<Generic variant="single-user" alt="Single User" size="2em" /> | ||
); | ||
|
||
export default AvatarSize; |
15 changes: 0 additions & 15 deletions
15
packages/terra-avatar/src/terra-dev-site/doc/example/shared-user/SharedUserColorVariants.jsx
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
packages/terra-avatar/src/terra-dev-site/doc/example/shared-user/SharedUserSize.jsx
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
packages/terra-avatar/src/terra-dev-site/test/avatar/generic/Provider.test.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import React from 'react'; | ||
import { Generic } from '../../../../index'; | ||
|
||
export default () => <Generic variant="provider" id="provider" alt="provider" color="seven" />; |
4 changes: 4 additions & 0 deletions
4
packages/terra-avatar/src/terra-dev-site/test/avatar/generic/SharedUser.test.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import React from 'react'; | ||
import { Generic } from '../../../../index'; | ||
|
||
export default () => <Generic id="shared-user" variant="shared-user" alt="shared user" color="eight" />; |
4 changes: 4 additions & 0 deletions
4
packages/terra-avatar/src/terra-dev-site/test/avatar/generic/SingleUser.test.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import React from 'react'; | ||
import { Generic } from '../../../../index'; | ||
|
||
export default () => <Generic id="single-user" alt="single user" color="four" />; |
4 changes: 0 additions & 4 deletions
4
packages/terra-avatar/src/terra-dev-site/test/avatar/shared-user/DefaultSharedUser.test.jsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a MVB, right? Removing a variant altogether is a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this will be MVB..