-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ZNTA-1734) added activity feed components to editor and activity…
… tab components to storybook
- Loading branch information
kgough
committed
Jun 27, 2017
1 parent
21ff01a
commit 25e4782
Showing
15 changed files
with
415 additions
and
22 deletions.
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
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,12 @@ | ||
import React from 'react' | ||
import { storiesOf } from '@kadira/storybook' | ||
import { action, decorateAction } from '@kadira/storybook-addon-actions' | ||
import ActTabCommentBox from '.' | ||
|
||
/* | ||
* See .storybook/README.md for info on the component storybook. | ||
*/ | ||
storiesOf('ActTabCommentBox', module) | ||
.add('default', () => ( | ||
<ActTabCommentBox /> | ||
)) |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import React from 'react' | ||
import { storiesOf } from '@kadira/storybook' | ||
import { action, decorateAction } from '@kadira/storybook-addon-actions' | ||
import { Well } from 'react-bootstrap' | ||
import Icon from '../../../components/Icon' | ||
import ActTabFeed from '.' | ||
import RevisionTranslated from '../ActTabFeed/RevisionTranslated.js' | ||
import RevisionApproved from '../ActTabFeed/RevisionApproved.js' | ||
import RevisionRejected from '../ActTabFeed/RevisionRejected.js' | ||
import RevisionComment from '../ActTabFeed/RevisionComment.js' | ||
|
||
/* | ||
* Copyright 2016, Red Hat, Inc. and individual contributors as indicated by the | ||
* @author tags. See the copyright.txt file in the distribution for a full | ||
* listing of individual contributors. | ||
* | ||
* This is free software; you can redistribute it and/or modify it under the | ||
* terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 2.1 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this software; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF | ||
* site: http://www.fsf.org. | ||
*/ | ||
|
||
/* | ||
* See .storybook/README.md for info on the component storybook. | ||
*/ | ||
|
||
storiesOf('ActTabFeed', module) | ||
.add('comment', () => ( | ||
<div className="revision-box"> | ||
<RevisionComment /> | ||
</div> | ||
)) | ||
.add('translated revision', () => ( | ||
<div className="revision-box"> | ||
<RevisionTranslated /> | ||
</div> | ||
)) | ||
.add('fuzzy revision', () => ( | ||
<div className="revision-box"> | ||
<RevisionFuzzy /> | ||
</div> | ||
)) | ||
.add('approved revision', () => ( | ||
<div className="revision-box"> | ||
<RevisionApproved /> | ||
</div> | ||
)) | ||
.add('rejected revision', () => ( | ||
<div className="revision-box"> | ||
<RevisionRejected /> | ||
</div> | ||
)) |
23 changes: 23 additions & 0 deletions
23
server/zanata-frontend/src/frontend/app/editor/components/ActTabFeed/RevisionApproved.js
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,23 @@ | ||
import React from 'react' | ||
import { Well } from 'react-bootstrap' | ||
import Icon from '../../../components/Icon' | ||
|
||
class RevisionApproved extends React.Component { | ||
|
||
render () { | ||
return ( | ||
<div> | ||
<p><Icon name="refresh" className="s0" /> | ||
<img className="u-round activity-avatar" src="" /><a>Username</a> | ||
<span className="u-textHighlight"> <strong>approved</strong> | ||
</span> a translation. | ||
</p> | ||
<Well className="well-approved">নাম</Well> | ||
<p className="small u-textMuted"> | ||
<Icon name="clock" className="n1" /> May 18 2017 at 15:00</p> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default RevisionApproved |
21 changes: 21 additions & 0 deletions
21
server/zanata-frontend/src/frontend/app/editor/components/ActTabFeed/RevisionComment.js
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,21 @@ | ||
import React from 'react' | ||
import { Well } from 'react-bootstrap' | ||
import Icon from '../../../components/Icon' | ||
|
||
class RevisionComment extends React.Component { | ||
|
||
render () { | ||
return ( | ||
<div> | ||
<p><Icon name="comment" className="s0" /> | ||
<img className="u-round activity-avatar" src="" /><a>Username</a> | ||
commented on a <strong>Spanish</strong> translation.</p> | ||
<Well>I have no idea what this translation means</Well> | ||
<p className="small u-textMuted"> | ||
<Icon name="clock" className="n1" /> May 20 2017 at 06:00</p> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default RevisionComment |
24 changes: 24 additions & 0 deletions
24
server/zanata-frontend/src/frontend/app/editor/components/ActTabFeed/RevisionFuzzy.js
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,24 @@ | ||
import React from 'react' | ||
import { Well } from 'react-bootstrap' | ||
import Icon from '../../../components/Icon' | ||
|
||
class RevisionFuzzy extends React.Component { | ||
|
||
render () { | ||
return ( | ||
<div> | ||
<p><Icon name="refresh" className="s0" /> | ||
<img className="u-round activity-avatar" src="" /><a>Username</a> | ||
created a | ||
<span className="u-textUnsure"> <strong>fuzzy</strong> | ||
</span> revision. | ||
</p> | ||
<Well className="well-fuzzy">নাম</Well> | ||
<p className="small u-textMuted"> | ||
<Icon name="clock" className="n1" /> May 19 2017 at 10:00</p> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default RevisionFuzzy |
23 changes: 23 additions & 0 deletions
23
server/zanata-frontend/src/frontend/app/editor/components/ActTabFeed/RevisionRejected.js
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,23 @@ | ||
import React from 'react' | ||
import { Well } from 'react-bootstrap' | ||
import Icon from '../../../components/Icon' | ||
|
||
class RevisionRejected extends React.Component { | ||
|
||
render () { | ||
return ( | ||
<div> | ||
<p><Icon name="refresh" className="s0" /> | ||
<img className="u-round activity-avatar" src="" /><a>Username</a> | ||
<span className="u-textWarning"><strong> rejected</strong> | ||
</span> | ||
a translation.</p> | ||
<Well className="well-rejected">নাম</Well> | ||
<p className="small u-textMuted"> | ||
<Icon name="clock" className="n1" /> May 21 2017 at 08:00</p> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default RevisionRejected |
24 changes: 24 additions & 0 deletions
24
server/zanata-frontend/src/frontend/app/editor/components/ActTabFeed/RevisionTranslated.js
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,24 @@ | ||
import React from 'react' | ||
import { Well } from 'react-bootstrap' | ||
import Icon from '../../../components/Icon' | ||
|
||
class RevisionTranslated extends React.Component { | ||
|
||
render () { | ||
return ( | ||
<div> | ||
<p> | ||
<Icon name="refresh" className="s0" /> | ||
<img className="u-round activity-avatar" src="" /><a>Username</a> | ||
created a | ||
<span className="u-textSuccess"><strong> translated </strong></span> | ||
revision.</p> | ||
<Well className="well-translated">নাম</Well> | ||
<p className="small u-textMuted"> | ||
<Icon name="clock" className="n1" /> May 21 2017 at 10:00</p> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default RevisionTranslated |
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
Oops, something went wrong.