commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
701d838dfc5afd616ccc94c2083bcc3564067342
app/assets/javascripts/components/search_container.js.jsx
app/assets/javascripts/components/search_container.js.jsx
var SearchContainer = React.createClass({ sendQuery: function() { if(this.state.searchQuery === '') { return; }; this.setState({ isSearching: true }); $.ajax({ url: '/api/search/amazon/?query=' + this.state.searchQuery, method: 'get', dataType: 'json', contentType: 'application/j...
var SearchContainer = React.createClass({ sendQuery: function() { if(this.state.searchQuery === '') { return; }; this.setState({ isSearching: true, listItems: [] }); $.ajax({ url: '/api/search/amazon/?query=' + this.state.searchQuery, method: 'get', dataType: 'json', ...
Reset search result list when new search begins.
Reset search result list when new search begins.
JSX
mit
kirillis/mytopten,kirillis/mytopten,krisimmig/mytopten,krisimmig/mytopten,krisimmig/mytopten,kirillis/mytopten
--- +++ @@ -2,7 +2,10 @@ sendQuery: function() { if(this.state.searchQuery === '') { return; }; - this.setState({ isSearching: true }); + this.setState({ + isSearching: true, + listItems: [] + }); $.ajax({ url: '/api/search/amazon/?query=' + this.state.searchQuery, @@ -49,7 ...
4c8153f8fba051440ef52023d58f36cd221537ae
template/src/components/toggle-button/toggle-button.jsx
template/src/components/toggle-button/toggle-button.jsx
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import styles from './toggle-button.less'; class ToggleButton extends Component { static displayName = 'ToggleButton'; static propTypes = { onClick: PropTypes.f...
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import styles from './toggle-button.less'; class ToggleButton extends Component { static displayName = 'ToggleButton'; static propTypes = { onClick: PropTypes.f...
Correct default indentation on toggle button
Correct default indentation on toggle button
JSX
apache-2.0
mongodb-js/compass-plugin,mongodb-js/compass-plugin
--- +++ @@ -36,14 +36,14 @@ */ render() { return ( - <button - className={classnames(styles.button, styles['button--ghost'], styles['button--animateFromTop'])} - type="button" - onClick={this.props.onClick}> - <span className={classnames(styles['button-text'])}> ...
777153092fafe6c8a6161b30a9f366360f1e527a
client/app/widgets/CrisisPrevention/__tests___/index.spec.jsx
client/app/widgets/CrisisPrevention/__tests___/index.spec.jsx
// @flow import { render } from 'enzyme'; import React from 'react'; import CrisisPrevention from '../index'; describe('CrisisPrevention', () => { it('renders the component', () => { let wrapper; expect(() => { wrapper = render(<CrisisPrevention />); }).not.toThrow(); expect(wrapper).not.toBeNu...
import { render } from 'enzyme'; import React from 'react'; import CrisisPrevention from '../index'; describe('CrisisPrevention', () => { it('renders the component', () => { let wrapper; expect(() => { wrapper = render(<CrisisPrevention />); }).not.toThrow(); expect(wrapper).not.toBeNull(); }...
Remove @flow from CrisisPrevention test
Remove @flow from CrisisPrevention test
JSX
agpl-3.0
julianguyen/ifme,cartothemax/ifme,julianguyen/ifme,cartothemax/ifme,julianguyen/ifme,cartothemax/ifme,cartothemax/ifme,julianguyen/ifme
--- +++ @@ -1,4 +1,3 @@ -// @flow import { render } from 'enzyme'; import React from 'react'; import CrisisPrevention from '../index';
951f0d7e508155dec305cf7a3321a12f1f28fe9a
src/main/webapp/resources/js/pages/launch/LaunchParameters.jsx
src/main/webapp/resources/js/pages/launch/LaunchParameters.jsx
import React from "react"; import { SectionHeading } from "../../components/ant.design/SectionHeading"; import { SavedParameters } from "./parameters/SavedParameters"; import { LaunchParametersWithOptions } from "./LaunchParametersWithOptions"; import { useLaunch } from "./launch-context"; /** * React component to re...
import React from "react"; import { SectionHeading } from "../../components/ant.design/SectionHeading"; import { SavedParameters } from "./parameters/SavedParameters"; import { LaunchParametersWithOptions } from "./LaunchParametersWithOptions"; import { useLaunch } from "./launch-context"; /** * React component to re...
Hide saved parameters if there are none
Hide saved parameters if there are none
JSX
apache-2.0
phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida
--- +++ @@ -18,7 +18,9 @@ <SectionHeading id="launch-parameters"> {i18n("LaunchParameters.title")} </SectionHeading> - {parameterSets && <SavedParameters form={form} sets={parameterSets} />} + {parameterSets[0]?.parameters.length ? ( + <SavedParameters form={form} sets={paramet...
f986aac31189f2a1318b6c4157843e8ae9218e10
app/operator/visitors/visitor/detailed_description/index.jsx
app/operator/visitors/visitor/detailed_description/index.jsx
import React from 'react'; import * as moment from 'moment'; export default React.createClass({ propTypes: { firstTime: React.PropTypes.number.isRequired, lastTime: React.PropTypes.number.isRequired, remote: React.PropTypes.string.isRequired, invitedBy: React.PropTypes.string, ...
import React from 'react'; import * as moment from 'moment'; export default React.createClass({ propTypes: { firstTime: React.PropTypes.number.isRequired, lastTime: React.PropTypes.number.isRequired, remote: React.PropTypes.string.isRequired, invitedBy: React.PropTypes.string, ...
Use Moment.js for visitor's invitation time
Use Moment.js for visitor's invitation time
JSX
apache-2.0
JustBlackBird/mibew-ui,JustBlackBird/mibew-ui
--- +++ @@ -14,7 +14,7 @@ getDefaultProps() { return { - invitationTime: '-', + invitationTime: null, invitedBy: '-' }; }, @@ -23,18 +23,24 @@ return ( <dl> <dt>First seen:</dt> - <dd>{moment.unix(th...
217e26230573d32b515b9c76f17d7edcbdc51bb7
src/components/util/hydra_aware.jsx
src/components/util/hydra_aware.jsx
"use strict"; var React = require('react') , Immutable = require('immutable') module.exports = function makeHydraLinkAware(Component) { var HydraAwareComponent = React.createClass({ propTypes: { data: React.PropTypes.instanceOf(Immutable.Map) }, hasHydraOperation(type) { var { data } = th...
"use strict"; var React = require('react') , Immutable = require('immutable') module.exports = function makeHydraLinkAware(Component) { var HydraAwareComponent = React.createClass({ propTypes: { data: React.PropTypes.instanceOf(Immutable.Map) }, hasHydraOperation(type) { var { data } = th...
Use @type instead of type for detecting hydra operations
Use @type instead of type for detecting hydra operations
JSX
agpl-3.0
editorsnotes/editorsnotes-renderer
--- +++ @@ -15,7 +15,7 @@ return data .get('hydra:operation') .some(operation => ( - operation.get('type') === `hydra:${type}ResourceOperation`)) + operation.get('@type') === `hydra:${type}ResourceOperation`)) }, canCreate() {
bab7eece59505be3bd827730f9725519bb19d406
imports/ui/report-view/table/element-characteristic-filter.jsx
imports/ui/report-view/table/element-characteristic-filter.jsx
import { Meteor } from 'meteor/meteor'; import React, { PropTypes } from 'react'; import { Glyphicon, OverlayTrigger, Popover, FormGroup, Checkbox } from 'react-bootstrap'; import Elements from '../../../api/elements/elements.js'; const ElementCharacteristicFilter = (props) => { const originalElement = Elements.coll...
import { Meteor } from 'meteor/meteor'; import React, { PropTypes } from 'react'; import { Glyphicon, OverlayTrigger, Popover, FormGroup, Checkbox } from 'react-bootstrap'; import Elements from '../../../api/elements/elements.js'; const ElementCharacteristicFilter = (props) => { const originalElement = Elements.coll...
Add id to popover and key to characteristics list in popover
Add id to popover and key to characteristics list in popover
JSX
mit
minden/data-furnace,minden/data-furnace
--- +++ @@ -11,7 +11,7 @@ placement="right" rootClose overlay={ - <Popover title="Characteristics" > + <Popover id={originalElement._id} title="Characteristics" > <FormGroup> {originalElement.characteristics.map((characteristic) => { return ( @...
2ed8c85956bd2ff40eacc83bc00e11c42c7e2c72
src/components/SelectField/SelectFieldContainer.jsx
src/components/SelectField/SelectFieldContainer.jsx
import { connect } from 'react-redux' import SelectField from './SelectField' import * as Actions from '../../actions' function mapStateToProps(state) { const { category, categories } = state.filter const menuItems = Object.keys(categories).map((item) => ( { text: categories[item], value: item } )) retu...
import { connect } from 'react-redux' import SelectField from './SelectField' import * as Actions from '../../actions' function mapStateToProps(state) { const { category, categories } = state.filter const menuItems = Object.keys(categories).map((item) => ( { text: categories[item], value: item } )) retu...
Fix incorrect category after navigating back from ComicViewer
Fix incorrect category after navigating back from ComicViewer
JSX
mit
rickychien/comiz,rickychien/comiz
--- +++ @@ -11,7 +11,7 @@ )) return { - category, + selectedValue: category, menuItems, } }
3c47a38afa78201040fa9702cad66f24081d0219
src/components/semver-checker.jsx
src/components/semver-checker.jsx
var React = require('react'), semver = require('semver'), SemverCheckerForm = require('./semver-checker-form.jsx'), SemverFeedback = require('./semver-feedback.jsx'), SemverExplain = require('./semver-explain.jsx'); var SemverChecker = React.createClass({ getInitialState: function() { retur...
var React = require('react'), semver = require('semver'), SemverCheckerForm = require('./semver-checker-form.jsx'), SemverFeedback = require('./semver-feedback.jsx'), SemverExplain = require('./semver-explain.jsx'); var SemverChecker = React.createClass({ getInitialState: function() { retur...
Fix empty constraint considered as "*" constraint
Fix empty constraint considered as "*" constraint
JSX
mit
jubianchi/semver-check,jubianchi/semver-check
--- +++ @@ -29,7 +29,7 @@ }, handleConstraintValidate: function(constraint) { - return semver.validRange(constraint); + return '' === constraint ? false : semver.validRange(constraint); }, render: function() {
eac771a103fb03b6da08f8a07dcd613b3d680356
src/routes/root/routes/organizations/components/value-proposition/content.jsx
src/routes/root/routes/organizations/components/value-proposition/content.jsx
const content = { title: 'Organizations', subTitle: 'Your Business Partner for Software Development', text: `From hiring the right tech professionals to untapping your team’s talent, we’re here to help you achieve your goals and grow your business. Hundreds of businesses and organizations trust Agile Actors ...
const content = { title: 'Business Services', subTitle: 'Your Business Partner for Software Development', text: ` From hiring the right tech professionals to untapping your team’s talent, we’re here to help you achieve your goals and grow your business. Hundreds of businesses and organizations trust A...
Change title "Organizations" to "Business Services"
Change title "Organizations" to "Business Services"
JSX
mit
dimitrisafendras/multiGame,dimitrisafendras/multiGame
--- +++ @@ -1,10 +1,12 @@ const content = { - title: 'Organizations', + title: 'Business Services', subTitle: 'Your Business Partner for Software Development', - text: `From hiring the right tech professionals to untapping your team’s talent, - we’re here to help you achieve your goals and grow your business....
47636ef71c8fb94064736b374a77e95a9f556560
chrome-extension/src/Store.jsx
chrome-extension/src/Store.jsx
import {createStore} from "redux" export const INITIAL_STATE = Symbol("Initial state") export const LIKED_STATE = Symbol("Liked state") export const SET_DISLIKE = Symbol("Set dislike") export const UNSET_DISLIKE = Symbol("Unset dislike") const dislikeStore = (state = {disliked: false, liked: false, count: 0}, action)...
import {createStore} from "redux" export const INITIAL_STATE = Symbol("Initial state") export const LIKED_STATE = Symbol("Liked state") export const SET_DISLIKE = Symbol("Set dislike") export const UNSET_DISLIKE = Symbol("Unset dislike") const dislikeStore = (state = {disliked: false, liked: false, count: NaN}, actio...
Change default count to NaN
Change default count to NaN
JSX
mit
mzyy94/yokunaine,mzyy94/yokunaine
--- +++ @@ -5,7 +5,7 @@ export const SET_DISLIKE = Symbol("Set dislike") export const UNSET_DISLIKE = Symbol("Unset dislike") -const dislikeStore = (state = {disliked: false, liked: false, count: 0}, action) => { +const dislikeStore = (state = {disliked: false, liked: false, count: NaN}, action) => { switch ...
a29d66fc6042952aa83f0e96f277ba568cc28e06
client/components/NoteList.jsx
client/components/NoteList.jsx
import React from 'react'; // import SearchBar from './SearchBar.jsx'; // Eventually use searchbar inside browse notes? // Is styling better that way? import NoteItem from './NoteItem.jsx'; const NoteList = props => ( <div className="notes-list"> <ul> {props.notes.map(element => <NoteItem ...
import React from 'react'; // import SearchBar from './SearchBar.jsx'; // Eventually use searchbar inside browse notes? // Is styling better that way? import NoteItem from './NoteItem.jsx'; const NoteList = props => ( <div className="notes-list"> <ul> {props.notes.map(element => <NoteItem ...
Fix some linting errors with React proptypes
Fix some linting errors with React proptypes
JSX
mit
enchanted-spotlight/Plato,enchanted-spotlight/Plato
--- +++ @@ -25,7 +25,7 @@ NoteList.propTypes = { notes: React.PropTypes.arrayOf(React.PropTypes.object), - username: React.PropTypes.string + username: React.PropTypes.string, }; export default NoteList;
7ac561f5ddaa5551858be32e542d6a9b5f3b9628
webapp/utils/requireAuth.jsx
webapp/utils/requireAuth.jsx
import React from 'react'; import PropTypes from 'prop-types'; import {connect} from 'react-redux'; export default function(ComposedComponent) { class Authenticate extends React.Component { static propTypes = {isAuthenticated: PropTypes.bool}; static contextTypes = {router: PropTypes.object.isRequired}; ...
import React from 'react'; import PropTypes from 'prop-types'; import {connect} from 'react-redux'; export default function(ComposedComponent) { class Authenticate extends React.Component { static propTypes = {isAuthenticated: PropTypes.bool}; static contextTypes = {router: PropTypes.object.isRequired}; ...
Handle state transition correctly for logout
Handle state transition correctly for logout
JSX
apache-2.0
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
--- +++ @@ -18,7 +18,7 @@ } componentWillUpdate(nextProps) { - if (this.props.isAuthenticated && !nextProps.isAuthenticated) { + if (nextProps.isAuthenticated === false) { this.context.router.push({ pathname: '/login', query: {next: this.buildUrl()}
cde969ebb36e2baaa39d213edca4d2d56a9e57ae
test/katex-a11y-test.jsx
test/katex-a11y-test.jsx
/* TODO(emily): fix these lint errors (http://eslint.org/docs/rules): */ /* eslint-disable eol-last, no-unused-vars, no-var, semi, space-after-keywords */ /* To fix, remove an entry above, run ka-lint, and fix errors. */ var fs = require("fs"); var assert = require("assert"); var katexA11y = require("../js/katex-a11y...
/* TODO(emily): fix these lint errors (http://eslint.org/docs/rules): */ /* eslint-disable eol-last, no-unused-vars, no-var, semi, space-after-keywords */ /* To fix, remove an entry above, run ka-lint, and fix errors. */ var fs = require("fs"); var assert = require("assert"); var katexA11y = require("../js/katex-a11y...
Fix lint after updating khan-linter to use eslint 3.x
Fix lint after updating khan-linter to use eslint 3.x Test Plan: - run ka-lint from perseus (with react-components as a submodule) Reviewers: john Reviewed By: john Differential Revision: https://phabricator.khanacademy.org/D32197
JSX
mit
Khan/react-components,Khan/react-components,Khan/react-components
--- +++ @@ -22,7 +22,7 @@ // Successfully rendered a string assert(true, math); - } catch(e) { + } catch (e) { // Hit something that was unknown - this is bad! assert(false, math + " " + e) }
a447ec0201a26d3040bc8daf2ed81a5139165643
app/routes/archive/containers/SubmissionArchivePanelList.jsx
app/routes/archive/containers/SubmissionArchivePanelList.jsx
import { connect } from "react-redux" import ItemArchivePanelList from "../components/ItemArchivePanelList" const mapStateToProps = (state) => { return { submissions: state.submissions } } export default connect(mapStateToProps, null)(ItemArchivePanelList)
import { connect } from "react-redux" import ItemArchivePanelList from "../components/ItemArchivePanelList" const mapStateToProps = (state) => { return { submissions: state.submissions.filter(each => each.selected) } } export default connect(mapStateToProps, null)(ItemArchivePanelList)
Remove nonselected items from the archive page
Remove nonselected items from the archive page
JSX
mit
education/classroom-desktop,education/classroom-desktop,education/classroom-desktop,education/classroom-desktop
--- +++ @@ -3,7 +3,7 @@ const mapStateToProps = (state) => { return { - submissions: state.submissions + submissions: state.submissions.filter(each => each.selected) } }
dd836fc40b96afc3a53682b7fdc4ad799dcbc0ab
src/components/FeedFallback.jsx
src/components/FeedFallback.jsx
'use strict'; const React = require('react'); const FeedItem = function () { return ( <section className='wk-feed__item'> <p> Couldn&apos;t load the latest news! But there&apos;s more, <a title='Follow us on twitter' href='https://twitter.com/thenativeweb'>follow us on Twitter</a> or <a ti...
'use strict'; const React = require('react'); const FeedItem = function () { return ( <section className='wk-feed__item'> <h2 className='wk-feed__item__title'>Failed to load the latest news 😢</h2> <p> Unfortunately, there went something wrong while loading the news. Please <a href='...
Update fallback message for news feed.
Update fallback message for news feed.
JSX
agpl-3.0
thenativeweb/wolkenkit-documentation,thenativeweb/wolkenkit-documentation
--- +++ @@ -5,9 +5,16 @@ const FeedItem = function () { return ( <section className='wk-feed__item'> + <h2 className='wk-feed__item__title'>Failed to load the latest news 😢</h2> <p> - Couldn&apos;t load the latest news! - But there&apos;s more, <a title='Follow us on twitter' href=...
ec90315a7e17cbcc2519851d60c9f4ef0d730cad
pages/cv/lastUpdate.jsx
pages/cv/lastUpdate.jsx
import React, {Fragment} from 'react' import {format} from 'date-fns' import {Section, P, Button} from '../../components' const printHandler = ev => { ev.preventDefault() window && window.print() } const LastUpdate = ({timestamp}) => { const DATE_FORMAT = 'LLLL io, YYYY' const date = format(new Date(timestamp...
import React, {Fragment} from 'react' import {format} from 'date-fns' import {Section, P, Button} from '../../components' const printHandler = ev => { ev.preventDefault() window && window.print() } const LastUpdate = ({timestamp}) => { const DATE_FORMAT = 'LLLL io, YYYY' const date = format(new Date(timestamp...
Update background none button for safari.
Update background none button for safari.
JSX
mit
andreiconstantinescu/constantinescu.io
--- +++ @@ -27,6 +27,7 @@ name="print" onClick={printHandler} customCss={{ + background: 'none', border: 'none', cursor: 'pointer', padding: 0,
dcb5654b0ce027d3fa1442097883b3759a055727
client-js/Requests.jsx
client-js/Requests.jsx
import React from 'react'; import {errorHandler, jsonOnSuccess, renderUpdateTime, getUserInfo} from './common.jsx'; export class RequestList extends React.Component { }; export class Request extends React.Component { }; export class RequestInfo extends React.Component { constructor(props) { super(props...
Add basic requests frontend code
Add basic requests frontend code
JSX
mit
dragonrobotics/PartTracker,stmobo/PartTracker,stmobo/PartTracker,stmobo/PartTracker,dragonrobotics/PartTracker,dragonrobotics/PartTracker
--- +++ @@ -0,0 +1,44 @@ +import React from 'react'; +import {errorHandler, jsonOnSuccess, renderUpdateTime, getUserInfo} from './common.jsx'; + +export class RequestList extends React.Component { + +}; + +export class Request extends React.Component { + +}; + +export class RequestInfo extends React.Component { + ...
669e5a11d82f7d08b172c587004aafee1617059d
SingularityUI/app/components/taskDetail/TaskEnvVars.jsx
SingularityUI/app/components/taskDetail/TaskEnvVars.jsx
import React, { PropTypes } from 'react'; import { InfoBox } from '../common/statelessComponents'; import CollapsableSection from '../common/CollapsableSection'; function TaskEnvVars (props) { if (!props.executor) return null; let vars = []; for (const variable of props.executor.command.environment.variables) {...
import React, { PropTypes } from 'react'; import { InfoBox } from '../common/statelessComponents'; import CollapsableSection from '../common/CollapsableSection'; function TaskEnvVars (props) { if (!props.executor) return null; let vars = []; for (const variable of _.sortBy(props.executor.command.environment.var...
Sort environment variables on task detail page alphabetically
Sort environment variables on task detail page alphabetically
JSX
apache-2.0
andrhamm/Singularity,HubSpot/Singularity,andrhamm/Singularity,HubSpot/Singularity,HubSpot/Singularity,hs-jenkins-bot/Singularity,hs-jenkins-bot/Singularity,andrhamm/Singularity,hs-jenkins-bot/Singularity,HubSpot/Singularity,andrhamm/Singularity,HubSpot/Singularity,hs-jenkins-bot/Singularity,hs-jenkins-bot/Singularity,a...
--- +++ @@ -6,7 +6,7 @@ function TaskEnvVars (props) { if (!props.executor) return null; let vars = []; - for (const variable of props.executor.command.environment.variables) { + for (const variable of _.sortBy(props.executor.command.environment.variables, 'name')) { vars.push(<InfoBox key={variable.nam...
2a12e86b3565166e9b927b42e0a6fe2c2e0324eb
js/components/Screen.jsx
js/components/Screen.jsx
import * as EmuActions from '../actions/EmuActions.js'; class Screen extends React.Component { componentDidMount() { // Since we currently only support one device at a time, assume the last // Screen is the one the device should render to. May never change, as // multiple devices should just be multiple ...
Build a canvas to pass into the emu
Build a canvas to pass into the emu
JSX
mit
jkoudys/remu,jkoudys/remu
--- +++ @@ -0,0 +1,18 @@ +import * as EmuActions from '../actions/EmuActions.js'; + +class Screen extends React.Component { + componentDidMount() { + // Since we currently only support one device at a time, assume the last + // Screen is the one the device should render to. May never change, as + // multipl...
51e754c09b89e1ddea98f4aaa97d776dc212f105
src/Slide.jsx
src/Slide.jsx
import React, { Component, PropTypes } from 'react' const styles = { root: { color: 'white' }, header: { height: 'calc(100% - 230px)', textAlign: 'center' }, headerItem: { position: 'relative', top: '50%', transform: 'translateY(-50%)' }, text: { textAlign: 'center' } } exp...
Add slide component for content presentation.
Add slide component for content presentation.
JSX
mit
TeamWertarbyte/material-auto-rotating-carousel
--- +++ @@ -0,0 +1,52 @@ +import React, { Component, PropTypes } from 'react' + +const styles = { + root: { + color: 'white' + }, + header: { + height: 'calc(100% - 230px)', + textAlign: 'center' + }, + headerItem: { + position: 'relative', + top: '50%', + transform: 'translateY(-50%)' + }, + ...
af7f85adf08b2c9ddf1c953fd98ac0048ec2d5b3
app/Resources/client/jsx/project/helpers/removeTraitFromProject.jsx
app/Resources/client/jsx/project/helpers/removeTraitFromProject.jsx
function removeTraitFromProject(traitName, biom, dbVersion,internalProjectId, action) { for(let row of biom.rows){ if(row.metadata != null){ delete row.metadata[traitName] if(row.metadata.trait_citations != null){ delete row.metadata.trait_citations[traitName] ...
Add new function for removing traits from biom
Add new function for removing traits from biom
JSX
mit
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
--- +++ @@ -0,0 +1,21 @@ +function removeTraitFromProject(traitName, biom, dbVersion,internalProjectId, action) { + for(let row of biom.rows){ + if(row.metadata != null){ + delete row.metadata[traitName] + if(row.metadata.trait_citations != null){ + delete row.metadata.t...
6f6f1e6ee9ec87cfbd014e22dd7736678e11c870
client/source/components/User/FollowingListEntry.jsx
client/source/components/User/FollowingListEntry.jsx
import React, {Component} from 'react'; import { Image, Grid, Row, Col, Form, FormGroup, Badge, ProgressBar, FormControl, Button, Container, ControlLabel, DropdownButton, MenuItem, Nav, NavItem } from 'react-bootstrap'; export default ({user, handleUserClick}) => { return ( <Row height={50}> <Col...
Add component to render the list of users a specific user is following.
Add component to render the list of users a specific user is following.
JSX
mit
JAC-Labs/SkilletHub,JAC-Labs/SkilletHub
--- +++ @@ -0,0 +1,22 @@ +import React, {Component} from 'react'; +import { Image, Grid, Row, Col, Form, FormGroup, Badge, ProgressBar, FormControl, Button, Container, ControlLabel, DropdownButton, MenuItem, Nav, NavItem } from 'react-bootstrap'; + +export default ({user, handleUserClick}) => { + + return ( + ...
b02b4744fdeea3007373e05fb36f30bd67a5d294
blueprints/component/files/app/tests/components/__name__.jsx
blueprints/component/files/app/tests/components/__name__.jsx
'use strict'; var React = require('react'), TestUtils = require('react-addons-test-utils'), expect = require('chai').expect, __name__ = require('../../components/__name__').default; describe('__name__', function() { describe('#render()', function() { it('should succeed', function() { let compo...
Add tests for the component generation blueprint
Add tests for the component generation blueprint
JSX
mit
reactcli/react-cli,reactcli/react-cli
--- +++ @@ -0,0 +1,18 @@ +'use strict'; + +var React = require('react'), + TestUtils = require('react-addons-test-utils'), + expect = require('chai').expect, + __name__ = require('../../components/__name__').default; + +describe('__name__', function() { + describe('#render()', function() { + it('should s...
64aadf84ef87b48c6e48bbd99aec5597787a9a68
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/dropdown-viewer.jsx
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/dropdown-viewer.jsx
import React from "react"; import "~/style/_dropdown-viewer.scss"; import PropTypes from "prop-types"; export default class WonDropdownViewer extends React.Component { render() { const icon = this.props.detail.icon && ( <svg className="dropdownv__header__icon"> <use xlinkHref={this.props.detail.ic...
Implement dropdownviewer as react components
Implement dropdownviewer as react components
JSX
apache-2.0
researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds
--- +++ @@ -0,0 +1,34 @@ +import React from "react"; + +import "~/style/_dropdown-viewer.scss"; +import PropTypes from "prop-types"; + +export default class WonDropdownViewer extends React.Component { + render() { + const icon = this.props.detail.icon && ( + <svg className="dropdownv__header__icon"> + ...
cbf1e8d6a863122396bdbcb4b8d36c4bc19ed722
src/AutoRotatingCarousel.jsx
src/AutoRotatingCarousel.jsx
import React, { Component, PropTypes } from 'react' import { RaisedButton } from 'material-ui' import autoPlay from 'react-swipeable-views/lib/autoPlay' import SwipeableViews from 'react-swipeable-views' import { Dots } from './Dots' const AutoPlaySwipeableViews = autoPlay(SwipeableViews) const styles = { root: { ...
Add root component to display slides in a beautiful manner.
Add root component to display slides in a beautiful manner.
JSX
mit
TeamWertarbyte/material-auto-rotating-carousel
--- +++ @@ -0,0 +1,73 @@ +import React, { Component, PropTypes } from 'react' +import { RaisedButton } from 'material-ui' +import autoPlay from 'react-swipeable-views/lib/autoPlay' +import SwipeableViews from 'react-swipeable-views' +import { Dots } from './Dots' + +const AutoPlaySwipeableViews = autoPlay(SwipeableVi...
bc217196183c27d3e37fd7f594825d8b2a3f1a25
src/app/components/Input.jsx
src/app/components/Input.jsx
import React, {Component} from 'react'; import PropTypes from 'prop-types'; const propTypes = { id: PropTypes.string.isRequired, label: PropTypes.string.isRequired, type: PropTypes.string, onChange: PropTypes.func }; const defaultProps = { type: "text" }; export default class Input extends Compon...
Add input class for input fields and show/hide for type=password
Add input class for input fields and show/hide for type=password Former-commit-id: 451303c4cd6b859dd49970da527e4d39a2a8d831 Former-commit-id: 52fc737a7cb3fbaf24af13eb27a045f664972bbb Former-commit-id: c26da866ea8d11a2ff21b8d250dc8bc56ce35ac3
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -0,0 +1,58 @@ +import React, {Component} from 'react'; +import PropTypes from 'prop-types'; + +const propTypes = { + id: PropTypes.string.isRequired, + label: PropTypes.string.isRequired, + type: PropTypes.string, + onChange: PropTypes.func +}; + +const defaultProps = { + type: "text" +}; + ...
59939a2eca9c05f0a4e6f0b886b668d128f482a2
app/assets/javascripts/components/developers/imports/data.es6.jsx
app/assets/javascripts/components/developers/imports/data.es6.jsx
// Modules import React from 'react'; import Relay from 'react-relay'; import { ListItem } from 'material-ui/List'; import FontIcon from 'material-ui/FontIcon'; import Checkbox from 'material-ui/Checkbox'; // Stylesheet import '../../styles/pins.sass'; const Data = (props) => { const { connectionData, selectItem, d...
Add a data component to show connection data
Add a data component to show connection data
JSX
artistic-2.0
gauravtiwari/techhire,gauravtiwari/hireables,gauravtiwari/hireables,gauravtiwari/techhire,Hireables/hireables,gauravtiwari/techhire,Hireables/hireables,gauravtiwari/hireables,Hireables/hireables
--- +++ @@ -0,0 +1,79 @@ +// Modules +import React from 'react'; +import Relay from 'react-relay'; +import { ListItem } from 'material-ui/List'; +import FontIcon from 'material-ui/FontIcon'; +import Checkbox from 'material-ui/Checkbox'; + +// Stylesheet +import '../../styles/pins.sass'; + +const Data = (props) => { +...
da6c202dea9706efaab0fb9da286f83be875e966
public/components/MultipleGlasses.jsx
public/components/MultipleGlasses.jsx
import React from 'react'; import glassDetails from './../../glassDetails.js'; import beerPair from './../../pairList.js'; class MultipleGlasses extends React.Component { constructor(props){ super(props); this.handleGlassUpdate = this.handleGlassUpdate.bind(this); } handleGlassUpdate(e) { e.preventDe...
Add component to display multiple glasses. can update display info on click of glass name
Add component to display multiple glasses. can update display info on click of glass name
JSX
mit
joeylaguna/tankard.io,joeylaguna/tankard.io
--- +++ @@ -0,0 +1,35 @@ +import React from 'react'; +import glassDetails from './../../glassDetails.js'; +import beerPair from './../../pairList.js'; + +class MultipleGlasses extends React.Component { + constructor(props){ + super(props); + this.handleGlassUpdate = this.handleGlassUpdate.bind(this); + } + + ...
04365e0448f849acfe2e7c2ec86eefd280a08d17
frontend/src/components/OfferFilter.react.jsx
frontend/src/components/OfferFilter.react.jsx
import React from 'react'; import {TextInput} from 'belle'; import _ from 'lodash'; export default class OfferFilter extends React.Component { static propTypes = { onFilterUpdate: React.PropTypes.func.isRequired } updateFilter({value}) { _.debounce(() => { this.props.onFilterUpdate(value); },...
Add the Offer filter component
Add the Offer filter component
JSX
agpl-3.0
jilljenn/voyageavecmoi,jilljenn/voyageavecmoi,jilljenn/voyageavecmoi
--- +++ @@ -0,0 +1,25 @@ +import React from 'react'; + +import {TextInput} from 'belle'; +import _ from 'lodash'; + +export default class OfferFilter extends React.Component { + static propTypes = { + onFilterUpdate: React.PropTypes.func.isRequired + } + + updateFilter({value}) { + _.debounce(() => { + ...
b8d5bcc19f2c88eff6cf3f3442b65c5024d0cfe7
src/js/components/header/header-spec.jsx
src/js/components/header/header-spec.jsx
var React = require('react/addons'); var TestUtils = React.addons.TestUtils; describe('Header', function() { var Header = require('./header.jsx'); var header; beforeEach(function() { header = TestUtils.renderIntoDocument( <Header /> ); }); it('renders', function() { var component = TestUt...
Add tests to Header component
Add tests to Header component
JSX
mit
haner199401/React-Node-Project-Seed,haner199401/React-Node-Project-Seed,mattpetrie/React-Node-Project-Seed,mattpetrie/React-Node-Project-Seed
--- +++ @@ -0,0 +1,21 @@ +var React = require('react/addons'); +var TestUtils = React.addons.TestUtils; + +describe('Header', function() { + var Header = require('./header.jsx'); + var header; + + beforeEach(function() { + header = TestUtils.renderIntoDocument( + <Header /> + ); + }); + + it('renders'...
fb6deb6bddf597ad1c6d894f6b270fab6ddb3ec5
app/app/components/navbar/Nav.jsx
app/app/components/navbar/Nav.jsx
import React from 'react'; import {Link, hashHistory} from 'react-router' import NavLinks from './NavLinks.jsx' export default class Nav extends React.Component { render(){ return ( <nav className="navbar navbar-inverse"> <div className="container"> <div className="navbar-header"> <button type="...
Refactor navbar into multiple components
Refactor navbar into multiple components
JSX
mit
taodav/MicroSerfs,taodav/MicroSerfs
--- +++ @@ -0,0 +1,29 @@ +import React from 'react'; +import {Link, hashHistory} from 'react-router' +import NavLinks from './NavLinks.jsx' + +export default class Nav extends React.Component { + + render(){ + return ( + <nav className="navbar navbar-inverse"> + <div className="container"> + <div className...
b2c1c8b79a20e5bfe6c57318a2fdbd5f4d00dc7f
src/client/public/components/home/Home.jsx
src/client/public/components/home/Home.jsx
var React = require('react'); var Flux = require('react-flux'); var Router = require('react-router'); var {Route, RouteHandler, Link } = Router; var Home = React.createClass({ render: function () { return ( <div> <h3>Welcome home!</h3> <RouteHandler/> </div> ); } }); module...
Create initial home page component
Create initial home page component
JSX
apache-2.0
andrewfhart/coinbox,andrewfhart/coinbox
--- +++ @@ -0,0 +1,18 @@ +var React = require('react'); +var Flux = require('react-flux'); +var Router = require('react-router'); +var {Route, RouteHandler, Link } = Router; + + +var Home = React.createClass({ + render: function () { + return ( + <div> + <h3>Welcome home!</h3> + <RouteHandle...
1f189011e9c4ee05e2aa85127659c62870e177b5
frontend/app/components/lists.jsx
frontend/app/components/lists.jsx
import React from 'react'; import BaseComponent from './base'; import { Grid, Cell } from 'rgx'; import styles from '../styles/lists'; import { IconButton, List, ListItem, ListDivider, Paper, Checkbox, FontIcon, Styles } from 'material-ui'; const Colors = Styles.Colors; export default class Lists extends BaseComponent...
import React from 'react'; import BaseComponent from './base'; import { Grid, Cell } from 'rgx'; import styles from '../styles/lists'; import { IconButton, List, ListItem, ListDivider, Paper, Checkbox, FontIcon, Styles } from 'material-ui'; import ActionCheckCircle from 'material-ui/lib/svg-icons/action/check-circle'; ...
Set ActionCheckCircle icon for Checkbox
Set ActionCheckCircle icon for Checkbox
JSX
mit
liof-io/liof,liof-io/liof,vitalyp/liof,feoktistov95/liof,vitalyp/liof,feoktistov95/liof,feoktistov95/liof,liof-io/liof,vitalyp/liof
--- +++ @@ -3,9 +3,14 @@ import { Grid, Cell } from 'rgx'; import styles from '../styles/lists'; import { IconButton, List, ListItem, ListDivider, Paper, Checkbox, FontIcon, Styles } from 'material-ui'; +import ActionCheckCircle from 'material-ui/lib/svg-icons/action/check-circle'; const Colors = Styles.Colors; ...
f5a25051379e26a0bfbeccdc07774abd8d04d9ca
web/src/components/common/Backend.jsx
web/src/components/common/Backend.jsx
import React, {Component} from 'react'; import 'babel-polyfill'; import 'isomorphic-fetch'; const BACKEND_URL = 'http://localhost:5000' export function fetchJson(path) { // use this function to make a GET request. const url = `${BACKEND_URL}${path}` return fetch(url).then(response => response.json()).ca...
Add files for communication with backend api
Add files for communication with backend api
JSX
mit
Drakulix/knex,Drakulix/knex,Drakulix/knex,Drakulix/knex
--- +++ @@ -0,0 +1,66 @@ +import React, {Component} from 'react'; +import 'babel-polyfill'; +import 'isomorphic-fetch'; +const BACKEND_URL = 'http://localhost:5000' + + export function fetchJson(path) { + // use this function to make a GET request. + const url = `${BACKEND_URL}${path}` + + return fetch(url)...
5fe5e33b8db0b1c3ea6717283cb43c57a9cfa872
src/sentry/static/sentry/app/components/projects/bookmarkToggle.jsx
src/sentry/static/sentry/app/components/projects/bookmarkToggle.jsx
import React from 'react'; import ApiMixin from '../../mixins/apimixin'; import {update as projectUpdate} from '../../actionCreators/projects'; const BookmarkToggle = React.createClass({ propTypes: { orgId: React.PropTypes.string.isRequired, project: React.PropTypes.object.isRequired, }, mixins: [ ...
import React from 'react'; import ApiMixin from '../../mixins/apiMixin'; import {update as projectUpdate} from '../../actionCreators/projects'; const BookmarkToggle = React.createClass({ propTypes: { orgId: React.PropTypes.string.isRequired, project: React.PropTypes.object.isRequired, }, mixins: [ ...
Fix bad case on import statement
Fix bad case on import statement
JSX
bsd-3-clause
mvaled/sentry,zenefits/sentry,looker/sentry,JamesMura/sentry,gencer/sentry,gencer/sentry,alexm92/sentry,mvaled/sentry,zenefits/sentry,mvaled/sentry,BuildingLink/sentry,JamesMura/sentry,alexm92/sentry,beeftornado/sentry,mvaled/sentry,BuildingLink/sentry,mvaled/sentry,zenefits/sentry,gencer/sentry,ifduyue/sentry,jean/sen...
--- +++ @@ -1,6 +1,6 @@ import React from 'react'; -import ApiMixin from '../../mixins/apimixin'; +import ApiMixin from '../../mixins/apiMixin'; import {update as projectUpdate} from '../../actionCreators/projects';
b8ad5418e050a4456b35400a5f5a693f05c5d8c4
src/DataTable.test.jsx
src/DataTable.test.jsx
import React from 'react'; import { shallow } from 'enzyme'; import { Pagination } from 'react-bootstrap'; import DataTable from './DataTable'; test('calls onPageClick', () => { let called = false; const wrapper = shallow(<DataTable pageSize={10} totalItems={10} onPageClick={() => { called = true; }} ...
Test DataTable handles page click
Test DataTable handles page click
JSX
mit
react-admin-lte/react-admin-lte,jonmpqts/reactjs-admin-lte,react-admin-lte/react-admin-lte
--- +++ @@ -0,0 +1,15 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import { Pagination } from 'react-bootstrap'; +import DataTable from './DataTable'; + +test('calls onPageClick', () => { + let called = false; + const wrapper = shallow(<DataTable + pageSize={10} + totalItems={10} + on...
221f809cd8f4dfa3d0c974bb6514fafc7f6c601e
woodstock/src/components/UnitItem.jsx
woodstock/src/components/UnitItem.jsx
import React, {Component} from 'react'; import PropTypes from 'prop-types'; export default class UnitItem extends Component { static propTypes = { todo: PropTypes.object.isRequired }; render() { const {todo} = this.props; const element = ( <label> {todo...
Create unit item react item
Create unit item react item
JSX
apache-2.0
solairerove/woodstock,solairerove/woodstock,solairerove/woodstock
--- +++ @@ -0,0 +1,24 @@ +import React, {Component} from 'react'; +import PropTypes from 'prop-types'; + +export default class UnitItem extends Component { + static propTypes = { + todo: PropTypes.object.isRequired + }; + + render() { + const {todo} = this.props; + + const element = ( + ...
125b6924909ffef4c9edf7953c1e8c5e6ed67630
app/components/elements/Reputation.jsx
app/components/elements/Reputation.jsx
import React from 'react'; export default ({value}) => { if (!value) return null; return <span className="Reputation" title="Reputation">{value}</span>; }
import React from 'react'; export default ({value}) => { if (isNaN(value)) { console.log("Unexpected rep value:", value); return null; } return <span className="Reputation" title="Reputation">{value}</span>; }
Fix - showing rep of 0
Fix - showing rep of 0
JSX
mit
GolosChain/tolstoy,TimCliff/steemit.com,TimCliff/steemit.com,GolosChain/tolstoy,enisey14/platform,TimCliff/steemit.com,GolosChain/tolstoy,enisey14/platform,steemit/steemit.com,steemit-intl/steemit.com,steemit/steemit.com,steemit/steemit.com,steemit-intl/steemit.com
--- +++ @@ -1,6 +1,9 @@ import React from 'react'; export default ({value}) => { - if (!value) return null; + if (isNaN(value)) { + console.log("Unexpected rep value:", value); + return null; + } return <span className="Reputation" title="Reputation">{value}</span>; }
177a33b118b572a7d9d012c9f29fb2e068ebc907
app/app/components/tasks/TaskForm.jsx
app/app/components/tasks/TaskForm.jsx
import React from 'react' export default class TaskForm extends React.Component { handleClick(){ let data = { name: this.refs.name.value, price: this.refs.price.value, description: this.refs.description.value } axios.post('users/' + this.props.params.id + '/tasks', data).then(() => { hashHistory.pus...
Refactor out form for creating a new task
Refactor out form for creating a new task
JSX
mit
taodav/MicroSerfs,taodav/MicroSerfs
--- +++ @@ -0,0 +1,33 @@ +import React from 'react' + +export default class TaskForm extends React.Component { + handleClick(){ + let data = { + name: this.refs.name.value, + price: this.refs.price.value, + description: this.refs.description.value + } + axios.post('users/' + this.props.params.id + '/tasks', ...
bb11e88a8e10dffea9276a99701f96c4e4e26654
src/app/views/content/CreateContent.jsx
src/app/views/content/CreateContent.jsx
import React, { Component } from "react"; import { push } from "react-router-redux"; import PropTypes from "prop-types"; import url from "../../utilities/url"; import SimpleSelectableList from "../../components/simple-selectable-list/SimpleSelectableList"; import Input from "../../components/Input"; const propTypes ...
Add create/edit content selection page
Add create/edit content selection page
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -0,0 +1,84 @@ +import React, { Component } from "react"; +import { push } from "react-router-redux"; +import PropTypes from "prop-types"; + +import url from "../../utilities/url"; + +import SimpleSelectableList from "../../components/simple-selectable-list/SimpleSelectableList"; +import Input from "../../c...
9d7424b55856db660f1546069730fd7a82c1efd7
BlazarUI/app/scripts/components/shared/CommitMessage.jsx
BlazarUI/app/scripts/components/shared/CommitMessage.jsx
import React, {Component, PropTypes} from 'react'; import {truncate as Truncate} from '../Helpers'; class CommitMessage extends Component { render() { const { message, truncate, truncateLen, truncateEllipsis } = this.props; return ( <span className='pre-text' titl...
Create commit message component for table rows
Create commit message component for table rows
JSX
apache-2.0
HubSpot/Blazar,HubSpot/Blazar,HubSpot/Blazar,HubSpot/Blazar
--- +++ @@ -0,0 +1,37 @@ +import React, {Component, PropTypes} from 'react'; +import {truncate as Truncate} from '../Helpers'; + +class CommitMessage extends Component { + + render() { + + const { + message, + truncate, + truncateLen, + truncateEllipsis + } = this.props; + + retu...
9df65873b83c11d3aeb8e3f586b0fa1b0d76e1a0
test/components/overview/available_actions.spec.jsx
test/components/overview/available_actions.spec.jsx
import React from 'react'; import ReactTestUtils from 'react-addons-test-utils'; import '../../testHelper'; import AvailableActions from '../../../app/assets/javascripts/components/overview/available_actions.jsx'; describe('AvailableActions', () => { it('Displays no actions for ended course', () => { const TestA...
Add test for available actions component
Add test for available actions component
JSX
mit
sejalkhatri/WikiEduDashboard,majakomel/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,KarmaHater/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,KarmaHater/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,majakomel/WikiEduDashboard,WikiEducationFoundation/WikiE...
--- +++ @@ -0,0 +1,21 @@ +import React from 'react'; +import ReactTestUtils from 'react-addons-test-utils'; +import '../../testHelper'; +import AvailableActions from '../../../app/assets/javascripts/components/overview/available_actions.jsx'; + +describe('AvailableActions', () => { + it('Displays no actions for ende...
2ea37882240fa0e6e46e65bf00e1f457a22df1ae
webapp/utils/__tests__/duration.spec.jsx
webapp/utils/__tests__/duration.spec.jsx
import {getDuration} from '../duration'; describe('getDuration', () => { it('handles weeks', () => { expect(getDuration(604800090)).toBe('1 week'); expect(getDuration(604800090, true)).toBe('1w'); expect(getDuration(1204800090)).toBe('2 weeks'); expect(getDuration(1204800090, true)).toBe('2w'); });...
Add coverage for duration utils
test: Add coverage for duration utils
JSX
apache-2.0
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
--- +++ @@ -0,0 +1,37 @@ +import {getDuration} from '../duration'; + +describe('getDuration', () => { + it('handles weeks', () => { + expect(getDuration(604800090)).toBe('1 week'); + expect(getDuration(604800090, true)).toBe('1w'); + expect(getDuration(1204800090)).toBe('2 weeks'); + expect(getDuration(1...
791213b49c00b17dd95afb3cdd60d5035a26eb38
src/components/views/statistic/__tests__/value-test.jsx
src/components/views/statistic/__tests__/value-test.jsx
import React from 'react'; import { expect } from 'chai'; import { shallow } from 'enzyme'; import { itShouldConsumeOwnAndPassCustomProps } from '../../../test-utils'; import Value from '../value'; describe('Value', () => { it('Should be rendered as <div> by default', () => { let wrapper = shallow(<Value /...
Add unit test for Value
Add unit test for Value
JSX
mit
ngsru/semantic-react,aphofstede/semantic-react,hallister/semantic-react,ngsru/semantic-react,aphofstede/semantic-react,hallister/semantic-react
--- +++ @@ -0,0 +1,24 @@ +import React from 'react'; +import { expect } from 'chai'; +import { shallow } from 'enzyme'; +import { itShouldConsumeOwnAndPassCustomProps } from '../../../test-utils'; +import Value from '../value'; + +describe('Value', () => { + it('Should be rendered as <div> by default', () => { + ...
3e24961905582b20ce7dc0d9c296ba9cfd43e373
app/Resources/client/jsx/trait/search/quickSearch.jsx
app/Resources/client/jsx/trait/search/quickSearch.jsx
$(document).ready(function(){ //autocomplete for trait search $("#search_trait").autocomplete({ position: { my: "right top", at: "right bottom" }, source: function (request, response) { var search = request.term; $.ajax({ url: "{{ path(...
Add quick search jsx template for trait page
Add quick search jsx template for trait page
JSX
mit
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
--- +++ @@ -0,0 +1,35 @@ +$(document).ready(function(){ + //autocomplete for trait search + $("#search_trait").autocomplete({ + position: { + my: "right top", at: "right bottom" + }, + source: function (request, response) { + var search = request.term; + $.a...
480cf5566392974a5533026c76dd1dc98da402a3
components/SiteNav/index.jsx
components/SiteNav/index.jsx
import React from 'react' import { RouteHandler, Link } from 'react-router' import { prefixLink } from 'gatsby-helpers' import './style.css' class SiteNav extends React.Component { render() { const {location} = this.props return ( <nav className='blog-nav'> <ul> ...
import React from 'react' import { RouteHandler, Link } from 'react-router' import { prefixLink } from 'gatsby-helpers' import './style.css' class SiteNav extends React.Component { render() { const {location} = this.props return ( <nav className='blog-nav'> <ul> ...
Add trailing slashes to nav links
Add trailing slashes to nav links gatsby@0.12.5 enforces trailing slashes https://github.com/gatsbyjs/gatsby/pull/378
JSX
mit
ochaloup/blog.chalda.cz,YoruNoHikage/blog,YoruNoHikage/yorunohikage.github.io,alxshelepenok/gatsby-starter-lumen,maxgrok/maxgrok.github.io,hb-gatsby/gatsby-starter-lumen,renegens/blog,maxgrok/maxgrok.github.io,ochaloup/blog.chalda.cz,abisz/piedcode,YoruNoHikage/yorunohikage.github.io,renegens/blog,Chogyuwon/chogyuwon.g...
--- +++ @@ -14,11 +14,11 @@ </Link> </li> <li> - <Link to="/about" className={ location.pathname === prefixLink('/about') ? "current" : null }> About me + <Link to="/about/" className={ location.pathname === prefixLink('/about/') ?...
65278e325958ec93866d9a35dc785946ea896a62
src/js/components/__tests__/date-picker.spec.jsx
src/js/components/__tests__/date-picker.spec.jsx
import React from 'react'; import { shallow } from 'enzyme'; import { DatePicker } from '../'; describe('DatePicker', () => { const shallowRender = props => shallow(<DatePicker {...props} />); let globalProps, SELECT_FULL_DATE; beforeEach(() => { SELECT_FULL_DATE = jest.fn(); ...
Test coverage for DatePicker component
Test coverage for DatePicker component
JSX
mit
CarlaCrandall/React-Calendar,CarlaCrandall/React-Calendar
--- +++ @@ -0,0 +1,90 @@ +import React from 'react'; +import { shallow } from 'enzyme'; +import { DatePicker } from '../'; + +describe('DatePicker', () => { + const + shallowRender = props => shallow(<DatePicker {...props} />); + + let globalProps, + SELECT_FULL_DATE; + + beforeEach(() => { + ...
b8f5764c4aaa8a6e9d7ccbd82ef74e99a3684ff9
app/assets/javascripts/components/typeahead.js.jsx
app/assets/javascripts/components/typeahead.js.jsx
/** @jsx React.DOM */ var CONSTANTS = require('../constants'); (function() { var TC = CONSTANTS.TYPEAHEAD; var Typeahead = React.createClass({ mixins: [React.addons.LinkedStateMixin], getInitialState: function() { return { inputValue: '', transform: (this.props.transform || this.transform) }; ...
Rename TextComplete component to Typeahead so as not to conflict with global TextComplete
Rename TextComplete component to Typeahead so as not to conflict with global TextComplete
JSX
agpl-3.0
lachlanjc/meta,assemblymade/meta,assemblymade/meta,lachlanjc/meta,assemblymade/meta,lachlanjc/meta,assemblymade/meta,lachlanjc/meta
--- +++ @@ -0,0 +1,80 @@ +/** @jsx React.DOM */ + +var CONSTANTS = require('../constants'); + +(function() { + var TC = CONSTANTS.TYPEAHEAD; + + var Typeahead = React.createClass({ + mixins: [React.addons.LinkedStateMixin], + + getInitialState: function() { + return { inputValue: '', transform: (this.pro...
bf9e8b5c2afbab974712970d75ef33093e52e17c
src/app/views/workflow-preview/WorkflowPreview.jsx
src/app/views/workflow-preview/WorkflowPreview.jsx
import React, { Component } from "react"; import { push } from "react-router-redux"; import { Link } from "react-router"; import PropTypes from "prop-types"; import url from "../../utilities/url"; import notifications from "../../utilities/notifications"; import Iframe from "../../components/iframe/Iframe"; const pr...
Add wrokflow preview component that can be used by any content type
Add wrokflow preview component that can be used by any content type
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -0,0 +1,91 @@ +import React, { Component } from "react"; +import { push } from "react-router-redux"; +import { Link } from "react-router"; +import PropTypes from "prop-types"; + +import url from "../../utilities/url"; +import notifications from "../../utilities/notifications"; + +import Iframe from "../../...
b444848ad5caab1d8004a8b732e933e3c4deddbd
app/scripts/shared/components/nav-links/nav-links.jsx
app/scripts/shared/components/nav-links/nav-links.jsx
var React = require('react'); var Link = require('react-router').Link; var NavLinks = React.createClass({ propTypes: { links: React.PropTypes.array }, //<ul className="nav navbar-nav navbar-right"> getDefaultProps: function() { return {className: "nav navbar-nav"}; }, getLinks: function(links...
Add nav links component to programmatically create navbar links
[TASK] Add nav links component to programmatically create navbar links
JSX
isc
dabibbit/gatewayd-quoting-app,AiNoKame/gatewayd-basic-admin-phase-1,dabibbit/gatewayd-banking-app,cryptospora/gatewayd-basic-app,hserang/gatewayd-admin-seeds,n0rmz/gatewayd-client,dabibbit/gatewayd-banking-app,AiNoKame/gatewayd-basic-admin-dec,n0rmz/gatewayd-client,dabibbit/gatewayd-quoting-app
--- +++ @@ -0,0 +1,39 @@ +var React = require('react'); +var Link = require('react-router').Link; + +var NavLinks = React.createClass({ + propTypes: { + links: React.PropTypes.array + }, + + //<ul className="nav navbar-nav navbar-right"> + getDefaultProps: function() { + return {className: "nav navbar-n...
65a0c2af2934ad3cf7f8dc81e94e6d0f2ec50207
src/public/views/components/header/alertBanner.jsx
src/public/views/components/header/alertBanner.jsx
'use strict'; import React from 'react'; import {Link} from 'react-router'; import { strings } from '../../../lib/i18n'; class AlertBanner extends React.Component { render() { if (!this.props.message) { return null } else { return ( <div className='alert__b...
Add ne alert banner component
Add ne alert banner component
JSX
mit
BitcoinUnlimited/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,gandrewstone/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,gandrewstone/BitcoinUnlimitedWeb
--- +++ @@ -0,0 +1,26 @@ +'use strict'; + +import React from 'react'; +import {Link} from 'react-router'; +import { strings } from '../../../lib/i18n'; + +class AlertBanner extends React.Component { + + render() { + if (!this.props.message) { + return null + } else { + return ( ...
a42d2da60e6e4c8173e60999ba168b25ea40a5c5
src/app/components/form-error-summary/FormErrorSummary.jsx
src/app/components/form-error-summary/FormErrorSummary.jsx
import React, { Component } from 'react'; import PropTypes from 'prop-types'; const propTypes = { errors: PropTypes.arrayOf(PropTypes.string) } class FormErrorSummary extends Component { constructor(props) { super(props); } render() { if (!this.props.errors.length) { retur...
Add form error sumamry componeent that lists all errors on a form
Add form error sumamry componeent that lists all errors on a form Former-commit-id: 491d442f3e3ba44980e24bea6b2efd4015ce7d7f Former-commit-id: 64fdfa3ec46582c7713cb0d57cf7355de7b337ee Former-commit-id: 3843129e557828bcfdecf91ca41e7af3fce16c18
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -0,0 +1,33 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +const propTypes = { + errors: PropTypes.arrayOf(PropTypes.string) +} + +class FormErrorSummary extends Component { + constructor(props) { + super(props); + } + render() { + if (!this....
91420c40da61dc46b3b3761fd404068fb70845ba
ui/src/message_popup/playtest/insubordination_scenarios_test.jsx
ui/src/message_popup/playtest/insubordination_scenarios_test.jsx
/* @flow weak */ import {expect} from 'chai'; import {InsubordinationScenarios} from './insubordination_scenarios.js'; describe('InsubordinationScenarios', () => { it('#cohortKey', () => { expect(InsubordinationScenarios.cohortKey('krob@mit.edu')).to.equal(2); expect(InsubordinationScenarios.cohortKey(...
Add minimal tests to insubordination scenarios
Add minimal tests to insubordination scenarios
JSX
mit
mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows
--- +++ @@ -0,0 +1,18 @@ +/* @flow weak */ +import {expect} from 'chai'; + +import {InsubordinationScenarios} from './insubordination_scenarios.js'; + + +describe('InsubordinationScenarios', () => { + it('#cohortKey', () => { + expect(InsubordinationScenarios.cohortKey('krob@mit.edu')).to.equal(2); + expec...
b1ffa9d0e359cfe3fef8d837fc9e9de70e1de563
client/app/bundles/course/survey/components/LoadingIndicator.jsx
client/app/bundles/course/survey/components/LoadingIndicator.jsx
import React from 'react'; import RefreshIndicator from 'material-ui/RefreshIndicator'; const styles = { loading: { display: 'flex', justifyContent: 'center', width: '100%', }, loadingInnerDiv: { position: 'relative', }, }; const LoadingIndicator = () => ( <div style={styles.loading}> <d...
Add standard loading indicator for survey pages
Add standard loading indicator for survey pages
JSX
mit
cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2
--- +++ @@ -0,0 +1,23 @@ +import React from 'react'; +import RefreshIndicator from 'material-ui/RefreshIndicator'; + +const styles = { + loading: { + display: 'flex', + justifyContent: 'center', + width: '100%', + }, + loadingInnerDiv: { + position: 'relative', + }, +}; + +const LoadingIndicator = () ...
b5de9efce84b5c0ce33b570e958238ae29c9186a
src/js/components/PagedContentComponent.jsx
src/js/components/PagedContentComponent.jsx
var React = require("react/addons"); module.exports = React.createClass({ displayName: "PagedContentComponent", propTypes: { className: React.PropTypes.string, currentPage: React.PropTypes.number.isRequired, itemsPerPage: React.PropTypes.number, tag: React.PropTypes.string }, ...
var React = require("react/addons"); module.exports = React.createClass({ displayName: "PagedContentComponent", propTypes: { children: React.PropTypes.node, className: React.PropTypes.string, currentPage: React.PropTypes.number.isRequired, itemsPerPage: React.PropTypes.number, ta...
Declare propTypes for children prop
Declare propTypes for children prop This removes the eslint warning due to the missing propType declaration. For info see: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
JSX
apache-2.0
watonyweng/marathon-ui,mesosphere/marathon-ui,quamilek/marathon-ui,cribalik/marathon-ui,mesosphere/marathon-ui,cribalik/marathon-ui,yp-engineering/marathon-ui,yp-engineering/marathon-ui,Kosta-Github/marathon-ui,janisz/marathon-ui,Kosta-Github/marathon-ui,quamilek/marathon-ui,Raffo/marathon-ui,janisz/marathon-ui,watonyw...
--- +++ @@ -4,6 +4,7 @@ displayName: "PagedContentComponent", propTypes: { + children: React.PropTypes.node, className: React.PropTypes.string, currentPage: React.PropTypes.number.isRequired, itemsPerPage: React.PropTypes.number,
39c7a5c23ddcab9f5dba7918a49cda80c7b665d2
src/apps/investments/client/opportunities/OpportunitySummary.jsx
src/apps/investments/client/opportunities/OpportunitySummary.jsx
import React from 'react' import SummaryTable from '../../../../client/components/SummaryTable' import Tag from '../../../../client/components/Tag' import { currencyGBP } from '../../../../client/utils/number-utils' import Link from '@govuk-react/link' import styled from 'styled-components' const StyledTag = styled...
Add Task logic for investment opportunities
Add Task logic for investment opportunities
JSX
mit
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
--- +++ @@ -0,0 +1,79 @@ +import React from 'react' + +import SummaryTable from '../../../../client/components/SummaryTable' +import Tag from '../../../../client/components/Tag' + +import { currencyGBP } from '../../../../client/utils/number-utils' + +import Link from '@govuk-react/link' +import styled from 'styled-c...
d52a99e35ababfbe929388a636de63a81166d4ef
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/admin_new/source/src/app/components/APICategories/DeleteAPICategory.jsx
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/admin_new/source/src/app/components/APICategories/DeleteAPICategory.jsx
/* * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
Apply new theme for API Category delete
Apply new theme for API Category delete
JSX
apache-2.0
prasa7/carbon-apimgt,chamindias/carbon-apimgt,chamindias/carbon-apimgt,Rajith90/carbon-apimgt,chamilaadhi/carbon-apimgt,isharac/carbon-apimgt,jaadds/carbon-apimgt,malinthaprasan/carbon-apimgt,malinthaprasan/carbon-apimgt,tharikaGitHub/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,chamindias/carbon-apimgt,wso2/carbon-a...
--- +++ @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License...
ad72f483a56aee6a49a0ea721905879f44c58110
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/file-viewer.jsx
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/file-viewer.jsx
import React from "react"; import { get } from "../../../utils.js"; import "~/style/_file-viewer.scss"; import PropTypes from "prop-types"; export default class WonFileViewer extends React.Component { render() { const icon = this.props.detail.icon && ( <svg className="titlev__header__icon"> <use x...
Implement fileviewer as react components
Implement fileviewer as react components
JSX
apache-2.0
researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds
--- +++ @@ -0,0 +1,89 @@ +import React from "react"; + +import { get } from "../../../utils.js"; +import "~/style/_file-viewer.scss"; +import PropTypes from "prop-types"; + +export default class WonFileViewer extends React.Component { + render() { + const icon = this.props.detail.icon && ( + <svg className="...
694ae633643bba9166cf509540f14b46f2ee7085
client/src/components/customer/RestaurantCard.jsx
client/src/components/customer/RestaurantCard.jsx
import React from 'react'; class RestaurantCard extends React.Component { constructor(props) { super(props); this.state = { } } render() { return ( <div class="row"> <div class="col s12 m7"> <div class="card"> <div class="card-image"> <img src="...
Add header to select group sizes
Add header to select group sizes
JSX
mit
Pegaiur/q-dot,Lynne-Daniels/q-dot,q-dot/q-dot,nehacp/q-dot
--- +++ @@ -0,0 +1,34 @@ +import React from 'react'; + +class RestaurantCard extends React.Component { + constructor(props) { + super(props); + this.state = { + + } + } + + render() { + return ( + <div class="row"> + <div class="col s12 m7"> + <div class="card"> + <div c...
7213896d61b49ab51c890a6c6fbd7aa54ea11bc1
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/description-viewer.jsx
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/description-viewer.jsx
import React from "react"; import "~/style/_description-viewer.scss"; import PropTypes from "prop-types"; import ReactMarkdown from "react-markdown"; export default class WonDescriptionViewer extends React.Component { render() { const icon = this.props.detail.icon && ( <svg className="dv__header__icon"> ...
Implement description as react components
Implement description as react components
JSX
apache-2.0
researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds
--- +++ @@ -0,0 +1,33 @@ +import React from "react"; + +import "~/style/_description-viewer.scss"; +import PropTypes from "prop-types"; +import ReactMarkdown from "react-markdown"; + +export default class WonDescriptionViewer extends React.Component { + render() { + const icon = this.props.detail.icon && ( + ...
69f105e00dab21a0b52042cb68c60b9b339bb2de
t/run/076.statement-head-of-func-expr.todo.jsx
t/run/076.statement-head-of-func-expr.todo.jsx
/*EXPECTED foo bar */ class Test { static function run() : void { (function() : void { log "foo"; }()); (function() : void { log "bar"; })(); } }
Add TODO tests to make sure the statement head of function exprs is allowed
Add TODO tests to make sure the statement head of function exprs is allowed
JSX
mit
jsx/JSX,jsx/JSX,jsx/JSX,dj31416/JSX,mattn/JSX,dj31416/JSX,dj31416/JSX,mattn/JSX,jsx/JSX,jsx/JSX,dj31416/JSX,dj31416/JSX
--- +++ @@ -0,0 +1,11 @@ +/*EXPECTED +foo +bar +*/ + +class Test { + static function run() : void { + (function() : void { log "foo"; }()); + (function() : void { log "bar"; })(); + } +}
3b365cadae8bcd0a9aa9d416967ffaccb4835b65
imports/ui/components/publicRoute.jsx
imports/ui/components/publicRoute.jsx
import React from 'react'; import PropTypes from 'prop-types'; import { Route, Redirect } from 'react-router-dom'; const PublicRoute = ({ loggingIn, authenticated, component, ...rest }) => ( <Route {...rest} render={(props) => { if (loggingIn) return <div />; return !authenticated ? (React....
Add new UI component PublicRoute for redirect user authenticated to home
Add new UI component PublicRoute for redirect user authenticated to home
JSX
mit
ggallon/rock,ggallon/rock
--- +++ @@ -0,0 +1,23 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Route, Redirect } from 'react-router-dom'; + +const PublicRoute = ({ loggingIn, authenticated, component, ...rest }) => ( + <Route + {...rest} + render={(props) => { + if (loggingIn) return <div />; + ...
30ffdb9a7788c76be4af149d5257eb409cde07a3
src/BoxCollapsedToggleButton.test.jsx
src/BoxCollapsedToggleButton.test.jsx
import React from 'react'; import { mount } from 'enzyme'; import Box from './Box'; import BoxCollapsedToggleButton from './BoxCollapsedToggleButton'; test('Box notified when clicked', () => { let received = false; class BoxFake extends React.Component { static childContextTypes = Box.childContextTypes; ...
Test BoxCollapsedToggleButton click works properly
Test BoxCollapsedToggleButton click works properly
JSX
mit
jonmpqts/reactjs-admin-lte,react-admin-lte/react-admin-lte,react-admin-lte/react-admin-lte
--- +++ @@ -0,0 +1,33 @@ +import React from 'react'; +import { mount } from 'enzyme'; +import Box from './Box'; +import BoxCollapsedToggleButton from './BoxCollapsedToggleButton'; + +test('Box notified when clicked', () => { + let received = false; + + class BoxFake extends React.Component { + static childContex...
64fe024b9e11f23b9c5db676ef1ea934fabd5004
generate.jsx
generate.jsx
// (c) Copyright 2007 Adobe Systems, Inc. All rights reserved. // Written by Ed Rose // based on the ADM Mode Change by Joe Ault from 1998 /* @@@BUILDINFO@@@ Generate.jsx 1.0.0.0 */ /* Special properties for a JavaScript to enable it to behave like an automation plug-in, the variable name must be exactly as the f...
Add .jsx file to bootstrap menu
Add .jsx file to bootstrap menu
JSX
mit
PaladinStudiosBVs/generator-assets,PaladinStudiosBVs/generator-assets,jimulabs/generator-assets,adobe-photoshop/generator-assets,adobe-photoshop/generator-assets
--- +++ @@ -0,0 +1,60 @@ +// (c) Copyright 2007 Adobe Systems, Inc. All rights reserved. +// Written by Ed Rose +// based on the ADM Mode Change by Joe Ault from 1998 + +/* +@@@BUILDINFO@@@ Generate.jsx 1.0.0.0 +*/ + +/* Special properties for a JavaScript to enable it to behave like an automation plug-in, the variab...
4e48abd505fc78a9109065d60b09d892c90a9775
app/scripts/components/nav-secondary.jsx
app/scripts/components/nav-secondary.jsx
"use strict"; var React = require('react'); var Navigation = require('react-router').Navigation; var session = require('../modules/session/models/session'); var sessionActions = require('../modules/session/actions'); var NavLinks = require('../shared/components/nav-links/nav-links.jsx'); var NavSecondary = React.cr...
Add nav secondary component to navigate between sent/received payments
[TASK] Add nav secondary component to navigate between sent/received payments
JSX
isc
dabibbit/gatewayd-banking-app,dabibbit/gatewayd-quoting-app,hserang/gatewayd-admin-seeds,cryptospora/gatewayd-basic-app,AiNoKame/gatewayd-basic-admin-phase-1,dabibbit/gatewayd-quoting-app,n0rmz/gatewayd-client,dabibbit/gatewayd-banking-app,n0rmz/gatewayd-client,AiNoKame/gatewayd-basic-admin-dec
--- +++ @@ -0,0 +1,39 @@ +"use strict"; + +var React = require('react'); +var Navigation = require('react-router').Navigation; + +var session = require('../modules/session/models/session'); +var sessionActions = require('../modules/session/actions'); + +var NavLinks = require('../shared/components/nav-links/nav-links...
3b6fe552b79d376529239641171e5ae23a9bd314
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/paypal-payment-viewer.jsx
webofneeds/won-owner-webapp/src/main/webapp/app/components/details/react-viewer/paypal-payment-viewer.jsx
import React from "react"; import { get } from "../../../utils.js"; import "~/style/_paypalpayment-viewer.scss"; import PropTypes from "prop-types"; export default class WonPaypalPaymentViewer extends React.Component { render() { const icon = this.props.detail.icon && ( <svg className="paypalpaymentv__hea...
Implement paypal payment as react components
Implement paypal payment as react components
JSX
apache-2.0
researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds
--- +++ @@ -0,0 +1,65 @@ +import React from "react"; +import { get } from "../../../utils.js"; + +import "~/style/_paypalpayment-viewer.scss"; +import PropTypes from "prop-types"; + +export default class WonPaypalPaymentViewer extends React.Component { + render() { + const icon = this.props.detail.icon && ( + ...
9527ef74c5aecf149cfd98c841d00f6a2af16334
imports/ui/ContactRequests.jsx
imports/ui/ContactRequests.jsx
import React from 'react' import {Container, Jumbotron} from 'reactstrap' import Spinner from 'react-spinkit' const ContactRequests = ({loading, requests}) => { if (loading) { return <Spinner name='double-bounce' /> } return ( <Container fluid> <Jumbotron> <h1 className='display-3'> Your co...
Add a component showing contact requests
Add a component showing contact requests
JSX
mit
SpidChain/spidchain-btcr,SpidChain/spidchain-btcr
--- +++ @@ -0,0 +1,24 @@ +import React from 'react' +import {Container, Jumbotron} from 'reactstrap' +import Spinner from 'react-spinkit' + +const ContactRequests = ({loading, requests}) => { + if (loading) { + return <Spinner name='double-bounce' /> + } + return ( + <Container fluid> + <Jumbotron> + ...
f9e1de201ff43a75beadea2b6323a6c1037bac42
client/source/components/EditRecipe/invalidStepsModal.jsx
client/source/components/EditRecipe/invalidStepsModal.jsx
import React from 'react'; //Bootstrap import { Modal, Button, Form, FormGroup, FormControl, ControlLabel } from 'react-bootstrap'; class InvalidStepsModal extends React.Component { constructor(props) { super(props); } close(event) { // this.setState({showModal: false}); console.log('CLOSING MODA...
Implement modal to be displayed when user is attempting to submit recipe with invalid steps (steps contain deleted ingredients)
Implement modal to be displayed when user is attempting to submit recipe with invalid steps (steps contain deleted ingredients)
JSX
mit
JAC-Labs/SkilletHub,JAC-Labs/SkilletHub
--- +++ @@ -0,0 +1,66 @@ +import React from 'react'; + +//Bootstrap +import { Modal, Button, Form, FormGroup, FormControl, ControlLabel } from 'react-bootstrap'; + +class InvalidStepsModal extends React.Component { + constructor(props) { + super(props); + } + + close(event) { + // this.setState({showModal: ...
dcafc76631b14bcf31ac491052bc6074cb680497
src/main/webapp/resources/js/pages/projects/share/ShareButton.jsx
src/main/webapp/resources/js/pages/projects/share/ShareButton.jsx
import { Dropdown, Menu } from "antd"; import React from "react"; import { useSelector } from "react-redux"; export function ShareButton() { const { samples, owner, projectId } = useSelector( (state) => state.shareReducer ); const shareSamples = (type) => { console.log({ type, samples, owner, projectId ...
Disable copy button if not ready to copy
Disable copy button if not ready to copy
JSX
apache-2.0
phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida
--- +++ @@ -0,0 +1,31 @@ +import { Dropdown, Menu } from "antd"; +import React from "react"; +import { useSelector } from "react-redux"; + +export function ShareButton() { + const { samples, owner, projectId } = useSelector( + (state) => state.shareReducer + ); + + const shareSamples = (type) => { + console....
877e016d52e3b81860f77266efd0cd4dcca5aaa5
app/src/script/component/EmbeddedPage.jsx
app/src/script/component/EmbeddedPage.jsx
var React = require('react'); var PropTypes = React.PropTypes; var Footer = require('./Footer'); var EmbeddedPage = React.createClass({ render: function() { return ( <div> {this.props.children || <div/>} <Footer/> </div> ); } }); modul...
Add a new component to wrap embedded pages.
Add a new component to wrap embedded pages.
JSX
mit
promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico
--- +++ @@ -0,0 +1,19 @@ +var React = require('react'); +var PropTypes = React.PropTypes; + +var Footer = require('./Footer'); + +var EmbeddedPage = React.createClass({ + + render: function() { + return ( + <div> + {this.props.children || <div/>} + <Footer/> + ...
5fbe67b9acbadbdcd40c530a9142f4f008735736
components/dialog/index.jsx
components/dialog/index.jsx
import React from 'react'; import Button from '../button'; import Overlay from '../overlay'; import style from './style'; const Dialog = (props) => { const actions = props.actions.map((action, idx) => { let className = style.button; if (action.className) className += ` ${action.className}`; return <Butto...
import React from 'react'; import Button from '../button'; import Overlay from '../overlay'; import style from './style'; const Dialog = (props) => { const actions = props.actions.map((action, idx) => { let className = style.button; if (action.className) className += ` ${action.className}`; return <Butto...
Add react-toolbox attribute to dialog
Add react-toolbox attribute to dialog
JSX
mit
KerenChandran/react-toolbox,KerenChandran/react-toolbox,rubenmoya/react-toolbox,react-toolbox/react-toolbox,showings/react-toolbox,soyjavi/react-toolbox,rubenmoya/react-toolbox,jasonleibowitz/react-toolbox,react-toolbox/react-toolbox,rubenmoya/react-toolbox,soyjavi/react-toolbox,react-toolbox/react-toolbox,showings/rea...
--- +++ @@ -16,7 +16,7 @@ return ( <Overlay active={props.active} onClick={props.onOverlayClick}> - <div className={className}> + <div data-react-toolbox='dialog' className={className}> <section role='body' className={style.body}> { props.title ? <h6 className={style.title}>{pr...
25bf5fbc9aadb9c943f5c30abf872ed0deb802ed
src/ui/components/nav_bar.jsx
src/ui/components/nav_bar.jsx
import React from 'react'; import { Link } from 'react-router-dom'; import { Container, Row, Navbar, Nav, NavItem } from 'reactstrap'; const NavBar = () => ( <Navbar color="faded" light> <Container> <Row className="align-items-center"> <Link to="/" className="navbar-brand">Apollo Starter Kit</Link>...
import React from 'react'; import { Link } from 'react-router-dom'; import { Container, Row, Navbar, Nav, NavItem } from 'reactstrap'; import { app as settings } from '../../../package.json'; const NavBar = () => ( <Navbar color="faded" light> <Container> <Row className="align-items-center"> <Link...
Disable GraphiQL link in prod mode when persistGraphQL is on
Disable GraphiQL link in prod mode when persistGraphQL is on Ref: #117
JSX
mit
sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,josephdburdick/apollo-fullstack-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit
--- +++ @@ -1,6 +1,8 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { Container, Row, Navbar, Nav, NavItem } from 'reactstrap'; + +import { app as settings } from '../../../package.json'; const NavBar = () => ( <Navbar color="faded" light> @@ -12,11 +14,11 @@ <Link...
3e397d05d3aed9525017350e9491406b2985c78e
app/src/script/component/AuthenticationError.jsx
app/src/script/component/AuthenticationError.jsx
var React = require('react'); var ReactBootstrap = require('react-bootstrap'); var PropTypes = React.PropTypes; var Hint = require('./Hint'); var Grid = ReactBootstrap.Grid, Row = ReactBootstrap.Row, Col = ReactBootstrap.Col; var AuthenticationError = React.createClass({ render: function() { re...
Add a new reusable component to display authentication errors.
Add a new reusable component to display authentication errors.
JSX
mit
promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico
--- +++ @@ -0,0 +1,27 @@ +var React = require('react'); +var ReactBootstrap = require('react-bootstrap'); + +var PropTypes = React.PropTypes; + +var Hint = require('./Hint'); + +var Grid = ReactBootstrap.Grid, + Row = ReactBootstrap.Row, + Col = ReactBootstrap.Col; + +var AuthenticationError = React.createClass...
9c46a0f98819ed1d6687d91520383aec1cb64527
app/ui/browser/views/navbar/vertical-separator.jsx
app/ui/browser/views/navbar/vertical-separator.jsx
/* Copyright 2016 Mozilla Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed u...
Create a vertical separator component
Create a vertical separator component Signed-off-by: Victor Porof <7d8eebacd0931807085fa6b9af29638ed74e0886@mozilla.com>
JSX
apache-2.0
bgrins/tofino,bgrins/tofino,mozilla/tofino,mozilla/tofino,jsantell/tofino,bgrins/tofino,bgrins/tofino,mozilla/tofino,victorporof/tofino,victorporof/tofino,jsantell/tofino,jsantell/tofino,mozilla/tofino,jsantell/tofino
--- +++ @@ -0,0 +1,27 @@ +/* +Copyright 2016 Mozilla + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to ...
71ea740c5c53395abaebcfc0e4ed9cbbf01c4725
client/source/components/User/FollowingListEntry.jsx
client/source/components/User/FollowingListEntry.jsx
import React, {Component} from 'react'; import { Image, Grid, Row, Col, Form, FormGroup, Badge, ProgressBar, FormControl, Button, Container, ControlLabel, DropdownButton, MenuItem, Nav, NavItem } from 'react-bootstrap'; export default ({user, handleUserClick}) => { return ( <Row height={50}> <Col...
Add component to render the list of users a specific user is following.
Add component to render the list of users a specific user is following.
JSX
mit
JAC-Labs/SkilletHub,JAC-Labs/SkilletHub
--- +++ @@ -0,0 +1,22 @@ +import React, {Component} from 'react'; +import { Image, Grid, Row, Col, Form, FormGroup, Badge, ProgressBar, FormControl, Button, Container, ControlLabel, DropdownButton, MenuItem, Nav, NavItem } from 'react-bootstrap'; + +export default ({user, handleUserClick}) => { + + return ( + ...
d4645a37293a7b89db0d59303654f6ba6f3ecde9
src/components/FootballField/Grid/PlayerDragLayer/index.jsx
src/components/FootballField/Grid/PlayerDragLayer/index.jsx
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { DragLayer } from 'react-dnd'; const layerStyles = { position: 'fixed', pointerEvents: 'none', zIndex: 100, left: 0, top: 0, width: '100%', height: '100%', }; const getItemStyles = (props) => { const { currentOffset ...
Add a custom DragLayer for react-dnd
Add a custom DragLayer for react-dnd
JSX
mit
m-mik/tactic-editor,m-mik/tactic-editor
--- +++ @@ -0,0 +1,71 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import { DragLayer } from 'react-dnd'; + +const layerStyles = { + position: 'fixed', + pointerEvents: 'none', + zIndex: 100, + left: 0, + top: 0, + width: '100%', + height: '100%', +}; + +const getItemStyl...
f4a2cade05281f432313a306aaa2be12c3f05ae1
src/app/components/Input.jsx
src/app/components/Input.jsx
import React, {Component} from 'react'; import PropTypes from 'prop-types'; const propTypes = { id: PropTypes.string.isRequired, label: PropTypes.string.isRequired, type: PropTypes.string, onChange: PropTypes.func }; const defaultProps = { type: "text" }; export default class Input extends Compon...
Add input class for input fields and show/hide for type=password
Add input class for input fields and show/hide for type=password
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -0,0 +1,58 @@ +import React, {Component} from 'react'; +import PropTypes from 'prop-types'; + +const propTypes = { + id: PropTypes.string.isRequired, + label: PropTypes.string.isRequired, + type: PropTypes.string, + onChange: PropTypes.func +}; + +const defaultProps = { + type: "text" +}; + ...
bf2921cf953f8d29738b319c7780266af7ca7ae0
src/common/components/addons/RoutingWrapper/index.jsx
src/common/components/addons/RoutingWrapper/index.jsx
import React, {Component} from 'react' import PropTypes from 'prop-types' import {Switch, Redirect} from 'react-router-dom' import {LazyLoad} from 'components/addons' /** * Returns application routing with protected by AuthCheck func routes * @desc This function returns JSX, so we can think about it as "stateless co...
Implement RoutingWrapper component that renders routes
feat(src/common/components/addons/RoutingWrapper): Implement RoutingWrapper component that renders routes
JSX
apache-2.0
billymcintosh/react-semantic.ui-starter,Metnew/react-semantic.ui-starter,versi786/parts-checkout,billymcintosh/react-semantic.ui-starter,versi786/parts-checkout
--- +++ @@ -0,0 +1,54 @@ +import React, {Component} from 'react' +import PropTypes from 'prop-types' +import {Switch, Redirect} from 'react-router-dom' +import {LazyLoad} from 'components/addons' + +/** + * Returns application routing with protected by AuthCheck func routes + * @desc This function returns JSX, so we ...
6dd3366c8678f92437c77e6010f769afabc01860
src/BoxRemoveButton.test.jsx
src/BoxRemoveButton.test.jsx
import React from 'react'; import { mount } from 'enzyme'; import Box from './Box'; import BoxRemoveButton from './BoxRemoveButton'; test('Box notified when clicked', () => { let received = false; class BoxFake extends React.Component { static childContextTypes = Box.childContextTypes; getChildContext() ...
Test BoxRemoveButton click works properly
Test BoxRemoveButton click works properly
JSX
mit
jonmpqts/reactjs-admin-lte,react-admin-lte/react-admin-lte,react-admin-lte/react-admin-lte
--- +++ @@ -0,0 +1,33 @@ +import React from 'react'; +import { mount } from 'enzyme'; +import Box from './Box'; +import BoxRemoveButton from './BoxRemoveButton'; + +test('Box notified when clicked', () => { + let received = false; + + class BoxFake extends React.Component { + static childContextTypes = Box.child...
7c9870504621a5778a3c408a4054f499d04ecc8b
src/Image.jsx
src/Image.jsx
import React from 'react'; require('./../www/main.css'); class Image extends React.Component { constructor() { super(); this.state = { }; } render() { return ( <div> <p>Image is here</p> <img src="https://upload.wikimedia.org/wikipedia/en/d/df/Franklin_turtle.jpg" /> ...
Create and add images to the page
Create and add images to the page
JSX
mit
OrderlyPhoenix/OrderlyPhoenix,OrderlyPhoenix/OrderlyPhoenix
--- +++ @@ -0,0 +1,21 @@ +import React from 'react'; +require('./../www/main.css'); + +class Image extends React.Component { + constructor() { + super(); + this.state = { + }; + } + + render() { + return ( + <div> + <p>Image is here</p> + <img src="https://upload.wikimedia.org/wiki...
c23945cb52d8a8f4cdae481ae12dade1cbff6405
jsx/test/upload-test.jsx
jsx/test/upload-test.jsx
import { describe, it } from 'mocha'; import React from 'react'; import chai from 'chai' import { expect } from 'chai'; import chaiEnzyme from 'chai-enzyme'; import { shallow } from 'enzyme'; import { UploadFile } from '../upload'; chai.use(chaiEnzyme()); describe('<UploadFile />', () => { it('renders a form'...
Add some tests for the UploadFile
Add some tests for the UploadFile
JSX
bsd-3-clause
tealeg/helloxl,tealeg/helloxl
--- +++ @@ -0,0 +1,38 @@ +import { describe, it } from 'mocha'; + +import React from 'react'; +import chai from 'chai' +import { expect } from 'chai'; +import chaiEnzyme from 'chai-enzyme'; +import { shallow } from 'enzyme'; + + +import { UploadFile } from '../upload'; + +chai.use(chaiEnzyme()); + +describe('<UploadF...
4a0e34b9d7343576d41e8ff8acba94ff758934bc
docs/src/app/components/pages/components/sliders.jsx
docs/src/app/components/pages/components/sliders.jsx
/** * @jsx React.DOM */ var React = require('react'), mui = require('mui'); var SlidersPage = React.createClass({ render: function() { return ( <div> <h2 className="mui-font-style-headline">Sliders</h2> <mui.Slider name="slider1" /> <mui.Slider name="slider2" value={0.5} /> ...
/** * @jsx React.DOM */ var React = require('react'), mui = require('mui'), Slider = mui.Slider, CodeExample = require('../../code-example/code-example.jsx'); var SlidersPage = React.createClass({ render: function() { var code = '// Default\n' + '<Slider name="slider1" />\n\n' + '// W...
Update example page for Slider
Update example page for Slider
JSX
mit
tirams/material-ui,arkxu/material-ui,matthewoates/material-ui,insionng/material-ui,subjectix/material-ui,rhaedes/material-ui,chirilo/material-ui,marwein/material-ui,dsslimshaddy/material-ui,marnusw/material-ui,agnivade/material-ui,salamer/material-ui,domagojk/material-ui,bright-sparks/material-ui,Qix-/material-ui,wunde...
--- +++ @@ -3,20 +3,35 @@ */ var React = require('react'), - mui = require('mui'); + mui = require('mui'), + Slider = mui.Slider, + CodeExample = require('../../code-example/code-example.jsx'); var SlidersPage = React.createClass({ render: function() { + var code = + '// Default\n' + + '...
92abdef2ecbd7bda886e6ef62be9983b9b20afb4
src/client/public/components/home/Splash.jsx
src/client/public/components/home/Splash.jsx
'use strict'; var React = require('react'); var Flux = require('react-flux'); var Router = require('react-router'); var {Route, RouteHandler, Link } = Router; var Login = require('../Login.jsx'); var Register = require('../Register.jsx'); var userStore = require('../../flux/stores/user'); var Splash = React....
Add splash page with login and registration forms
Add splash page with login and registration forms
JSX
apache-2.0
andrewfhart/coinbox,andrewfhart/coinbox
--- +++ @@ -0,0 +1,38 @@ +'use strict'; + +var React = require('react'); +var Flux = require('react-flux'); +var Router = require('react-router'); +var {Route, RouteHandler, Link } = Router; + +var Login = require('../Login.jsx'); +var Register = require('../Register.jsx'); + +var userStore = require('../../flu...
312d693396f44c317049cb812069e7be9767cc91
src/components/readme/edit_link.jsx
src/components/readme/edit_link.jsx
/** * @license Apache-2.0 * * Copyright (c) 2019 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
Add component for rendering a README edit link
Add component for rendering a README edit link
JSX
apache-2.0
stdlib-js/www,stdlib-js/www,stdlib-js/www
--- +++ @@ -0,0 +1,50 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2019 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses...
4fceaedc92f357d6584f1c14d978c5941b496068
src/client/components/DocumentsSection/index.jsx
src/client/components/DocumentsSection/index.jsx
import React from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' import { SPACING } from '@govuk-react/constants' import { typography } from '@govuk-react/lib' import NewWindowLink from '../NewWindowLink' const StyledSectionHeader = styled('div')` ${typography.font({ size: 24, wei...
Create reusable component for document link
Create reusable component for document link
JSX
mit
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
--- +++ @@ -0,0 +1,39 @@ +import React from 'react' +import PropTypes from 'prop-types' +import styled from 'styled-components' +import { SPACING } from '@govuk-react/constants' +import { typography } from '@govuk-react/lib' + +import NewWindowLink from '../NewWindowLink' + +const StyledSectionHeader = styled('div')`...
04f5722f817d863808e7947ef73f9a5034e8075b
indico/web/client/js/react/IButton.jsx
indico/web/client/js/react/IButton.jsx
/* This file is part of Indico. * Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). * * Indico is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 3 of the * License...
Add basic implementation of i-button component
Add basic implementation of i-button component
JSX
mit
ThiefMaster/indico,ThiefMaster/indico,DirkHoffmann/indico,ThiefMaster/indico,OmeGak/indico,pferreir/indico,mvidalgarcia/indico,mic4ael/indico,mvidalgarcia/indico,ThiefMaster/indico,mvidalgarcia/indico,OmeGak/indico,mic4ael/indico,indico/indico,DirkHoffmann/indico,pferreir/indico,mvidalgarcia/indico,indico/indico,pferre...
--- +++ @@ -0,0 +1,29 @@ +/* This file is part of Indico. + * Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). + * + * Indico is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; e...
d1f80e2a9e1fd4f4d54a3de61d3cf23c17582eb8
app/js/common/components/FormikSelect.jsx
app/js/common/components/FormikSelect.jsx
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Select from 'react-select'; import 'react-select/dist/react-select.css'; // See: https://github.com/jaredpalmer/formik#why-use-setfieldvalue-instead-of-handlechange class FormikSelect extends Component { static propTypes = { fi...
Add Select Component Compatible w/ Formik
Add Select Component Compatible w/ Formik
JSX
mit
rit-sse/OneRepoToRuleThemAll
--- +++ @@ -0,0 +1,43 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import Select from 'react-select'; + +import 'react-select/dist/react-select.css'; + +// See: https://github.com/jaredpalmer/formik#why-use-setfieldvalue-instead-of-handlechange +class FormikSelect extends Compon...
6862cd90e76223601b074b7d4d5bd53d3b7f8abf
webofneeds/won-owner-webapp/src/main/webapp/app/components/atom-card-grid.jsx
webofneeds/won-owner-webapp/src/main/webapp/app/components/atom-card-grid.jsx
/** * Created by fsuda on 21.08.2017. */ import React from "react"; import WonAtomCard from "./atom-card.jsx"; export default class WonAtomCardGrid extends React.Component { render() { if(this.props && this.props.atomUris && this.props.atomUris.length > 0) { const atomUris = this.props.atomUris; ...
Create simple ng-repeat replacing react atomCardGrid
Create simple ng-repeat replacing react atomCardGrid
JSX
apache-2.0
researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds,researchstudio-sat/webofneeds
--- +++ @@ -0,0 +1,34 @@ +/** + * Created by fsuda on 21.08.2017. + */ + +import React from "react"; +import WonAtomCard from "./atom-card.jsx"; + +export default class WonAtomCardGrid extends React.Component { + + render() { + if(this.props && this.props.atomUris && this.props.atomUris.length > 0) { + const...
a3b6c77ca69fe54b9a61b7c28a29a0a3c2eb716a
client/source/Index.jsx
client/source/Index.jsx
// React + React-Router Dependencies import React, { Component } from 'react'; import { render } from 'react-dom'; import { Router, IndexRoute, Route, browserHistory } from 'react-router'; // Importing the React components from components folder import App from './components/App'; import LandingPage from './components...
Implement basic Router for application
Implement basic Router for application
JSX
mit
JAC-Labs/SkilletHub,JAC-Labs/SkilletHub
--- +++ @@ -0,0 +1,16 @@ +// React + React-Router Dependencies +import React, { Component } from 'react'; +import { render } from 'react-dom'; +import { Router, IndexRoute, Route, browserHistory } from 'react-router'; + +// Importing the React components from components folder +import App from './components/App'; +im...
414c76f9dc0f8ea42049eb985e128057cd36160c
src/app/containers/Post/PostForm.jsx
src/app/containers/Post/PostForm.jsx
import React, { Component } from 'react' // import Recaptcha from 'react-recaptcha' import { TextField, Icon, IconCircle, FileInput } from '~/components'; const i = window.appSettings.icons; class PostForm extends Component { constructor(props) { super(props) this.state = { ...
Add post form for submitting posts
feat(Post): Add post form for submitting posts
JSX
mit
AdamSalma/Lurka,AdamSalma/Lurka
--- +++ @@ -0,0 +1,125 @@ +import React, { Component } from 'react' +// import Recaptcha from 'react-recaptcha' +import { + TextField, + Icon, + IconCircle, + FileInput +} from '~/components'; + +const i = window.appSettings.icons; + +class PostForm extends Component { + constructor(props) { + s...
e8107ba8aa2ae98fa5d9f0131c40fbcedb9dac9e
lib/main.jsx
lib/main.jsx
var React = require('react'); var Router = require('react-router'); var config = require('./config'); var routes = require('./routes.jsx'); function startRunningSite() { var url = document.querySelector('meta[name=url]').getAttribute('value'); var pageHolder = document.getElementById('page-holder'); if (config...
var React = require('react'); var Router = require('react-router'); var config = require('./config'); var routes = require('./routes.jsx'); function startRunningSite() { var url = document.querySelector('meta[name=url]').getAttribute('value'); var pageHolder = document.getElementById('page-holder'); if (config...
Use Router.RefreshLocation instead of Router.HashLocation.
Use Router.RefreshLocation instead of Router.HashLocation. This fixes #232. I also know that we could just pass Router.HistoryLocation to react-router and let it gracefully degrade to Router.RefreshLocation on its own, but that would make it harder for us to manually test.
JSX
mpl-2.0
mozilla/teach.webmaker.org,mozilla/teach.mozilla.org,Pomax/teach.mozilla.org,asdofindia/teach.webmaker.org,mmmavis/teach.mozilla.org,Pomax/teach.webmaker.org,Pomax/teach.webmaker.org,fredericksilva/teach.webmaker.org,AnthonyBobsin/teach.webmaker.org,mmmavis/teach.webmaker.org,Pomax/teach.mozilla.org,mozilla/teach.webma...
--- +++ @@ -11,9 +11,7 @@ if (config.ENABLE_PUSHSTATE) { routes.run(Router.HistoryLocation, pageHolder); } else { - if (!window.location.hash.slice(1)) - window.location.hash = '#' + url; - routes.run(Router.HashLocation, pageHolder); + routes.run(Router.RefreshLocation, pageHolder); } } ...
a14ba8a7bf1abffe2787bbbef05ba39e9d9da2f8
client/src/components/layout/LoadedQueryNotFoundMessage.jsx
client/src/components/layout/LoadedQueryNotFoundMessage.jsx
import React from 'react'; import { InfoMessage } from './../../assets/styled/UI'; import BaseLayoutLoader from './BaseLayoutLoader'; export default ({ query, message }) => { if (query && (query.loading && !query.error)) { return <BaseLayoutLoader />; } else { return <InfoMessage visible content...
Add loading query when finished loading and nothing found show message
Add loading query when finished loading and nothing found show message
JSX
bsd-2-clause
Lochmann85/shout-out-loud-dev,Lochmann85/shout-out-loud-dev,Lochmann85/shout-out-loud-dev
--- +++ @@ -0,0 +1,14 @@ +import React from 'react'; + +import { InfoMessage } from './../../assets/styled/UI'; + +import BaseLayoutLoader from './BaseLayoutLoader'; + +export default ({ query, message }) => { + if (query && (query.loading && !query.error)) { + return <BaseLayoutLoader />; + } + else { + ...
26411b316c52aa6b6e85b75d34b1398952eb2ed5
12/create-textframe-align-contents-center.jsx
12/create-textframe-align-contents-center.jsx
// // textFrame style customization example. // var createDocument = function(params){ params.documentPreferences = { pageWidth : params.pageWidth+"mm", pageHeight : params.pageHeight+"mm", facingPages : false}; var doc = app.documents.add(params); var page = doc.pages.item(...
Add textFrame contents alignment example.
Add textFrame contents alignment example.
JSX
mit
mindboard/indesign-extendscript,mindboard/indesign-extendscript
--- +++ @@ -0,0 +1,65 @@ +// +// textFrame style customization example. +// + +var createDocument = function(params){ + params.documentPreferences = { + pageWidth : params.pageWidth+"mm", + pageHeight : params.pageHeight+"mm", + facingPages : false}; + + var doc = app.documents.add(pa...
1b3f6c918f961b1d5a6bd45264e321e807868782
client/source/components/EditRecipe/invalidStepsModal.jsx
client/source/components/EditRecipe/invalidStepsModal.jsx
import React from 'react'; //Bootstrap import { Modal, Button, Form, FormGroup, FormControl, ControlLabel } from 'react-bootstrap'; class InvalidStepsModal extends React.Component { constructor(props) { super(props); } close(event) { // this.setState({showModal: false}); console.log('CLOSING MODA...
Implement modal to be displayed when user is attempting to submit recipe with invalid steps (steps contain deleted ingredients)
Implement modal to be displayed when user is attempting to submit recipe with invalid steps (steps contain deleted ingredients)
JSX
mit
JAC-Labs/SkilletHub,JAC-Labs/SkilletHub
--- +++ @@ -0,0 +1,66 @@ +import React from 'react'; + +//Bootstrap +import { Modal, Button, Form, FormGroup, FormControl, ControlLabel } from 'react-bootstrap'; + +class InvalidStepsModal extends React.Component { + constructor(props) { + super(props); + } + + close(event) { + // this.setState({showModal: ...
bd803637a827afbc00e3e98962dd9ad5e6d054ec
src/components/Stats.jsx
src/components/Stats.jsx
var React = require('react'); var _ = require('lodash'); var Stats = React.createClass({ propTypes: { playerInstances: React.PropTypes.array.isRequired, playerStates: React.PropTypes.array.isRequired, winners: React.PropTypes.array.isRequired }, render() { var {playerInstances, playerStates, wi...
var React = require('react'); var _ = require('lodash'); var Stats = React.createClass({ propTypes: { playerInstances: React.PropTypes.array.isRequired, playerStates: React.PropTypes.array.isRequired, winners: React.PropTypes.array.isRequired }, render() { var {playerInstances, playerStates, wi...
Include a winrate in stats
Include a winrate in stats
JSX
bsd-3-clause
Ripjaw415/clashjs,qizhiyu/clashjs,manlito/clashjs,javierbyte/clashjs,jladuval/clashjs,mediasuitenz/clashjs,kiwiandroiddev/clashjs,mediasuitenz/clashjs,pandaman4125/clashjs,Ripjaw415/clashjs,DanielOram/clashjs,Wingie/clashjs,Wingie/clashjs,codingpains/clashjs,qizhiyu/clashjs,Lerc/clashjs,DanielOram/clashjs,javierbyte/cl...
--- +++ @@ -11,6 +11,11 @@ render() { var {playerInstances, playerStates, winners} = this.props; + var stats = _.map(playerInstances, (el, index) => ({ + wins: winners[index], + rate: winners[index] ? Math.round(winners[index] / (winners.reduce((prev, cur) => prev + cur))) : 0 + }) + ...
98d22beffbf0cc6827dcb58ae7c76b6b49a7fe3a
imports/ui/ShowTruncatedText.jsx
imports/ui/ShowTruncatedText.jsx
import React from 'react' import CopyToClipboard from 'react-copy-to-clipboard' import {Button} from 'reactstrap' const ShowTruncatedText = ({text}) => { const truncateWithEllipsis = { 'width': '270px', 'white-space': 'nowrap', 'overflow': 'hidden', 'text-overflow': 'ellipsis' } return <p style={...
Write a component that shows long strings truncated and a clipboard icon
Write a component that shows long strings truncated and a clipboard icon
JSX
mit
SpidChain/spidchain-btcr,SpidChain/spidchain-btcr
--- +++ @@ -0,0 +1,19 @@ +import React from 'react' +import CopyToClipboard from 'react-copy-to-clipboard' +import {Button} from 'reactstrap' + +const ShowTruncatedText = ({text}) => { + const truncateWithEllipsis = { + 'width': '270px', + 'white-space': 'nowrap', + 'overflow': 'hidden', + 'text-overflow...
828f621e13d04c0d77bb2ff669e82d000aede32a
client/app/bundles/course/video/videos.jsx
client/app/bundles/course/video/videos.jsx
import React from 'react'; import { render } from 'react-dom'; import ProviderWrapper from 'lib/components/ProviderWrapper'; import HeatMap from './submission/containers/Charts/HeatMap'; $(document).ready(() => { const mountNode = document.getElementById('video-overall-stats'); if (!mountNode) { return; } cons...
Add frontend for video overall stats
Add frontend for video overall stats Signed-off-by: Shen Yichen <be3bb257ef8d73236feaba36cd3e5ee9095e6819@gmail.com>
JSX
mit
Coursemology/coursemology2,cysjonathan/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2
--- +++ @@ -0,0 +1,20 @@ +import React from 'react'; +import { render } from 'react-dom'; +import ProviderWrapper from 'lib/components/ProviderWrapper'; +import HeatMap from './submission/containers/Charts/HeatMap'; + +$(document).ready(() => { + const mountNode = document.getElementById('video-overall-stats'); + + ...
a1871d419580d710d14bfb2a1882c523c00987d7
newControlNull.jsx
newControlNull.jsx
/* newControlNull Author: Yahor Hayeuski Script for ft-Toolbar Create new small(50x50) null layer in top right corner in active comp with orange label, and name it "controller". The source item always stays the same, so there is no mess in project panel with many items like: "Null 1", "Null 2", etc. */ (functio...
Create new file from newNull, and change description
Create new file from newNull, and change description
JSX
mit
di23/scripts_ft-Toolbar
--- +++ @@ -0,0 +1,75 @@ +/* + newControlNull + Author: Yahor Hayeuski + Script for ft-Toolbar + + Create new small(50x50) null layer in top right corner in active comp with orange label, + and name it "controller". The source item always stays the same, so there is no mess + in project panel with many items like: "N...
54eb6c38881f626216af6762dca5efa3c4b819d4
ui/src/auth_container_test.jsx
ui/src/auth_container_test.jsx
/* @flow weak */ import React from 'react'; import {shallow} from 'enzyme'; import {expect} from 'chai'; import AuthContainer from './auth_container.jsx'; describe('<AuthContainer />', () => { // Mock localStorage beforeEach(() => { window.localStorage = { getItem(key) { return null; } }; }); it('valida...
Add example of testing a method in a component in isolation
Add example of testing a method in a component in isolation
JSX
mit
kesiena115/threeflows,kesiena115/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,kesiena115/threeflows,mit-teaching-systems-lab/threeflows
--- +++ @@ -0,0 +1,20 @@ +/* @flow weak */ +import React from 'react'; + +import {shallow} from 'enzyme'; +import {expect} from 'chai'; + +import AuthContainer from './auth_container.jsx'; + +describe('<AuthContainer />', () => { + // Mock localStorage + beforeEach(() => { + window.localStorage = { getItem(key) ...