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
ccd27d39d9edd25bd8a709c297385d2797470478
src/components/subs-list.jsx
src/components/subs-list.jsx
import React from 'react'; import throbber16 from '../../assets/images/throbber-16.gif'; import {tileUserListFactory, WITH_MUTUALS} from './tile-user-list'; const TileList = tileUserListFactory({type: WITH_MUTUALS}); export default (props) => { const title = props.title || "No title"; if (props.isPending) { ...
import React from 'react'; import throbber16 from '../../assets/images/throbber-16.gif'; import {tileUserListFactory, WITH_MUTUALS} from './tile-user-list'; const TileList = tileUserListFactory({type: WITH_MUTUALS}); export default (props) => { const title = props.title || "No title"; if (props.isPending) { ...
Add a message for empty TileList
Add a message for empty TileList
JSX
mit
kadmil/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,FreeFeed/freefeed-react-client,davidmz/freefeed-react-client,davidmz/freefeed-react-client,davidmz/freefeed-react-client
--- +++ @@ -43,6 +43,8 @@ <TileList users={s.users}/> ])} + {!sections.length ? <div>Nobody's here!</div> : ''} + </div> ); };
18c2dbb4f8b147fcfcb371cbfccc7ce328ea57e1
src/js/components/Logout.jsx
src/js/components/Logout.jsx
import React from 'react'; import Router from 'react-router'; import UserActions from '../actions/UserActions'; var Logout = React.createClass({ mixins: [Router.Navigation], componentWillMount() { UserActions.logout(); this.transitionTo('login'); }, render() { return <div></div>; }, }); export...
import React from 'react'; import Router from 'react-router'; import UserActions from '../actions/UserActions'; var Logout = React.createClass({ mixins: [Router.Navigation], componentWillMount() { UserActions.logout(); this.transitionTo('login'); }, render() { return null; }, }); export defaul...
Return `null` instead of empty `div` in the logout route.
Return `null` instead of empty `div` in the logout route. Makes more sense.
JSX
mit
kentor/notejs-react,kentor/notejs-react,kentor/notejs-react
--- +++ @@ -11,7 +11,7 @@ }, render() { - return <div></div>; + return null; }, });
ddd098b61b9de74800ee4771ce55aad44d7dbfc0
frontend/src/components/getStarted/StagingBanner.jsx
frontend/src/components/getStarted/StagingBanner.jsx
import React from 'react'; export default class StagingBanner extends React.Component { render() { return ( <div className="stagingBanner"> <div className="container"> <h1>Warning! This is our bleeding-edge staging environment, and therefore performance, accuracy and reliability of the ...
import React from 'react'; export default class StagingBanner extends React.Component { render() { return ( <div className="stagingBanner"> <div className="container"> <h1>Warning! This is our bleeding-edge staging environment, and therefore performance, accuracy and reliability of the ...
Update spacing to test deployment script
Update spacing to test deployment script
JSX
mit
uclapi/uclapi,uclapi/uclapi,uclapi/uclapi,uclapi/uclapi
--- +++ @@ -7,11 +7,7 @@ return ( <div className="stagingBanner"> <div className="container"> - <h1>Warning! This is our bleeding-edge staging environment, and therefore performance, accuracy and reliability of the API cannot be guaranteed. For our stable, supported API please go to - ...
89bf495a5901554a99e9c8af2f7e49e9a1a9758c
app/classifier/custom-sign-in-prompt.jsx
app/classifier/custom-sign-in-prompt.jsx
import React from 'react'; const PROMPT_CUSTOM_SIGN_IN_EVERY = 5; export default class CustomSignInPrompt extends React.Component { constructor(props) { super(props); this.hide = this.hide.bind(this); this.state = { hidden: true, }; } componentWillReceiveProps(nextProps) { if (nextPro...
import React from 'react'; const PROMPT_CUSTOM_SIGN_IN_EVERY = 5; export default class CustomSignInPrompt extends React.Component { constructor(props) { super(props); this.hide = this.hide.bind(this); this.state = { hidden: true, }; } componentWillReceiveProps(nextProps) { if (nextPro...
Fix class name to match change
Fix class name to match change
JSX
apache-2.0
jelliotartz/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,zooniverse/Panoptes-Front-End,amyrebecca/Panoptes-Front-End
--- +++ @@ -24,7 +24,7 @@ render() { if (!this.state.hidden) { return ( - <div className="classify-announcement-banner custom-sign-in-banner"> + <div className="classifier-announcement-banner custom-sign-in-banner"> <span> <i className="fa fa-exclamation-circle" ar...
8b422546fe4d0e87c4968b388e4d21075d810192
src/app/components/simple-selectable-list/SimpleSelectableList.jsx
src/app/components/simple-selectable-list/SimpleSelectableList.jsx
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import SimpleSelectableListItem from './SimpleSelectableListItem'; const propTypes = { rows: PropTypes.arrayOf(PropTypes.shape({ title: PropTypes.string.isRequired, id: PropTypes.string.isRequired, url: PropType...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import SimpleSelectableListItem from './SimpleSelectableListItem'; const propTypes = { rows: PropTypes.arrayOf(PropTypes.shape({ title: PropTypes.string.isRequired, id: PropTypes.string.isRequired, url: PropTypes...
Add loader to show laoding state
Add loader to show laoding state
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -1,6 +1,5 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; - import SimpleSelectableListItem from './SimpleSelectableListItem'; @@ -11,7 +10,7 @@ url: PropTypes.string.isRequired, details: PropTypes.arrayOf(PropTypes.string) })).isRequired, - ...
cba964807ffd8019d4698065790a008243f67ce1
client/components/layouts.main/index.jsx
client/components/layouts.main/index.jsx
import Navigations from '../navigations/index.jsx'; const Layout = ({content = () => null }) => ( <div> <header> <h1>Mantra Voice</h1> <Navigations /> </header> <div> {content()} </div> <footer> <small>Mantra is an application architecture for Meteor.</small> </footer> </d...
import Navigations from '../navigations/index.jsx'; const Layout = ({content = () => null }) => ( <div> <header> <h1>Mantra Voice</h1> <Navigations /> </header> <div> {content()} </div> <footer> <small>Built with <a href='https://github.com/kadirahq/mantra'>Mantra</a> & Meteor.<...
Add Kadira link to footer
Add Kadira link to footer
JSX
mit
LikeJasper/mantra-plus,warehouseman/meteor-mantra-kickstarter,hacksong2016/angel,ShockiTV/mantra-test,markoshust/mantra-sample-blog-app,mantrajs/meteor-mantra-kickstarter,warehouseman/meteor-mantra-kickstarter,mantrajs/mantra-sample-blog-app,mantrajs/mantra-dialogue,Entropy03/jianwei,wmzhai/mantra-demo,worldwidejamie/s...
--- +++ @@ -12,7 +12,7 @@ </div> <footer> - <small>Mantra is an application architecture for Meteor.</small> + <small>Built with <a href='https://github.com/kadirahq/mantra'>Mantra</a> & Meteor.</small> </footer> </div> );
92a729e9c8794d1a521335d59fcd1bbd45a8738a
src/components/languagechooser/languagechooser.jsx
src/components/languagechooser/languagechooser.jsx
const bindAll = require('lodash.bindall'); const classNames = require('classnames'); const PropTypes = require('prop-types'); const React = require('react'); const jar = require('../../lib/jar.js'); const languages = require('scratch-l10n').default; const Form = require('../forms/form.jsx'); const Select = require('.....
const bindAll = require('lodash.bindall'); const classNames = require('classnames'); const PropTypes = require('prop-types'); const React = require('react'); const jar = require('../../lib/jar.js'); const languages = require('scratch-l10n').default; const Form = require('../forms/form.jsx'); const Select = require('.....
Set language cookie domain to allow for cross-domain cookies
Set language cookie domain to allow for cross-domain cookies Add leading `.` to the current hostname for the language cookie domain.
JSX
bsd-3-clause
LLK/scratch-www,LLK/scratch-www
--- +++ @@ -21,7 +21,7 @@ ]); } handleSetLanguage (name, value) { - jar.set('scratchlanguage', value); + jar.set('scratchlanguage', value, {domain: `.${window.location.hostname}`}); window.location.reload(); } render () {
b414003f1534a1bde43e6ed8f108d56a03a73442
lib/assets/javascripts/views/relative_timestamp.js.jsx
lib/assets/javascripts/views/relative_timestamp.js.jsx
/** @jsx React.DOM */ Drop.Views.RelativeTimestamp = React.createClass({ resetInterval: function () { this.setState({ interval: setInterval(this.forceUpdate.bind(this), 1000) }); }, clearInterval: function () { clearInterval(this.state.interval); }, componentDidMount: function () { this.resetInterval...
/** @jsx React.DOM */ Drop.Views.RelativeTimestamp = React.createClass({ getInitialState: function () { return {}; }, resetInterval: function () { this.clearInterval(); var updateEvery = function (n) { this.setState({ interval: setInterval(this.forceUpdate.bind(this), n) }); }.bind(this); v...
Optimize re-render interval for timestamps
Optimize re-render interval for timestamps
JSX
bsd-3-clause
cupcake/files-web,cupcake/files-web
--- +++ @@ -1,10 +1,31 @@ /** @jsx React.DOM */ Drop.Views.RelativeTimestamp = React.createClass({ + getInitialState: function () { + return {}; + }, + resetInterval: function () { - this.setState({ - interval: setInterval(this.forceUpdate.bind(this), 1000) - }); + this.clearInterval(); + + var updateEve...
608ea5a4a414b2e35cca0d22e603f1d6f44ce65e
src/components/user-name.jsx
src/components/user-name.jsx
import React from 'react' import {Link} from 'react-router' import {connect} from 'react-redux' import {preventDefault} from '../utils' const DisplayOption = ({user, me, preferences}) => { if (user.username === me && preferences.useYou) { return <span>You</span> } switch (preferences.displayOption) { ca...
import React from 'react' import {Link} from 'react-router' import {connect} from 'react-redux' import {preventDefault} from '../utils' const DisplayOption = ({user, me, preferences}) => { if (user.username === me && preferences.useYou) { return <span>You</span> } if (user.screenName === user.username) { ...
Add special case (display name = username) to UserName
Add special case (display name = username) to UserName
JSX
mit
davidmz/freefeed-react-client,kadmil/freefeed-react-client,clbn/freefeed-gamma,FreeFeed/freefeed-html-react,clbn/freefeed-gamma,FreeFeed/freefeed-react-client,davidmz/freefeed-react-client,ujenjt/freefeed-react-client,kadmil/freefeed-react-client,FreeFeed/freefeed-html-react,kadmil/freefeed-react-client,davidmz/freefee...
--- +++ @@ -6,6 +6,10 @@ const DisplayOption = ({user, me, preferences}) => { if (user.username === me && preferences.useYou) { return <span>You</span> + } + + if (user.screenName === user.username) { + return <span>{user.screenName}</span> } switch (preferences.displayOption) {
2134b88f3ef4812b8664a0b93e60c282eb5da554
app/javascript/packs/agendum_note/agendum_note_list.jsx
app/javascript/packs/agendum_note/agendum_note_list.jsx
import React, { Component } from 'react'; // Controls import AgendumNote from './agendum_note'; /* * Create a list of agendum Notes. */ export default class AgendumNoteList extends Component { constructor(props) { super(props); this.state = this.getInitialState(props.notes); } getInitia...
import React, { Component } from 'react'; // Controls import AgendumNote from './agendum_note'; /* * Create a list of agendum Notes. */ export default class AgendumNoteList extends Component { constructor(props) { super(props); this.state = this.getInitialState(props.notes); } getInitia...
Fix new agendum not showing without page reload.
Fix new agendum not showing without page reload.
JSX
mit
robyparr/adjourn,robyparr/adjourn,robyparr/adjourn
--- +++ @@ -13,7 +13,7 @@ } getInitialState(notes) { - notes = notes.slice(); + notes = notes ? notes.slice() : []; // Add an empty note for the 'new note' interface notes.push({});
bf1c6b91b36b636164710ae68a8378268570fce2
src/core/error_screen.jsx
src/core/error_screen.jsx
import React from 'react'; import Screen from './screen'; import * as l from './index'; export default class ErrorScreen extends Screen { constructor() { super("error"); } render() { return ErrorPane; } } const ErrorPane = ({t}) => ( <div className="auth0-lock-error-pane"> <p>{t("unrecoverabl...
import React from 'react'; import Screen from './screen'; import * as l from './index'; export default class ErrorScreen extends Screen { constructor() { super("error"); } render() { return ErrorPane; } } const ErrorPane = ({i18n}) => ( <div className="auth0-lock-error-pane"> <p>{i18n.html("u...
Use i18n prop instead of t in Error screen
Use i18n prop instead of t in Error screen
JSX
mit
mike-casas/lock,mike-casas/lock,mike-casas/lock
--- +++ @@ -14,9 +14,9 @@ } -const ErrorPane = ({t}) => ( +const ErrorPane = ({i18n}) => ( <div className="auth0-lock-error-pane"> - <p>{t("unrecoverableError")}</p> + <p>{i18n.html("unrecoverableError")}</p> </div> );
1f41ea9bf63e6abe4f359ee98d3ee96d11cd93c6
indico/web/client/js/react/components/ClipboardButton.jsx
indico/web/client/js/react/components/ClipboardButton.jsx
// This file is part of Indico. // Copyright (C) 2002 - 2020 CERN // // Indico is free software; you can redistribute it and/or // modify it under the terms of the MIT License; see the // LICENSE file for more details. import React, {useState} from 'react'; import PropTypes from 'prop-types'; import {Popup, Icon} from...
// This file is part of Indico. // Copyright (C) 2002 - 2020 CERN // // Indico is free software; you can redistribute it and/or // modify it under the terms of the MIT License; see the // LICENSE file for more details. import React, {useState} from 'react'; import PropTypes from 'prop-types'; import {Popup, Button} fr...
Fix the copy link icon
Fix the copy link icon
JSX
mit
mic4ael/indico,DirkHoffmann/indico,ThiefMaster/indico,mic4ael/indico,pferreir/indico,ThiefMaster/indico,indico/indico,indico/indico,pferreir/indico,mic4ael/indico,DirkHoffmann/indico,DirkHoffmann/indico,DirkHoffmann/indico,mic4ael/indico,ThiefMaster/indico,pferreir/indico,indico/indico,pferreir/indico,ThiefMaster/indic...
--- +++ @@ -7,7 +7,7 @@ import React, {useState} from 'react'; import PropTypes from 'prop-types'; -import {Popup, Icon} from 'semantic-ui-react'; +import {Popup, Button} from 'semantic-ui-react'; import {Translate} from 'indico/react/i18n'; import {useTimeout} from 'indico/react/hooks'; @@ -29,11 +29,14 @@ ...
1f0fb1125a74072191c237dd2255636c71dc298e
lib/common/Image.jsx
lib/common/Image.jsx
import React, { Component, PropTypes } from 'react'; export default class Image extends Component { static propTypes = { imgStyle: PropTypes.objectOf( PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), ).isRequired, isBlurred: PropTypes.bool.isRequired, blurAmou...
import React, { Component, PropTypes } from 'react'; export default class Image extends Component { static propTypes = { alt: PropTypes.string.isRequired, image: PropTypes.shape({ url: PropTypes.string.isRequired, width: PropTypes.number.isRequired, }).isRequired, imgStyle: PropTypes.obje...
Update PropTypes and remove console.log
Update PropTypes and remove console.log
JSX
mit
benox3/react-pic
--- +++ @@ -2,6 +2,11 @@ export default class Image extends Component { static propTypes = { + alt: PropTypes.string.isRequired, + image: PropTypes.shape({ + url: PropTypes.string.isRequired, + width: PropTypes.number.isRequired, + }).isRequired, imgStyle: PropTypes.objectOf( Prop...
4b02838fe77e93de3177ebaa901ec7102f07d56a
src/components/Widget/Weather/WidgetWeather.jsx
src/components/Widget/Weather/WidgetWeather.jsx
import React, { Component } from 'react'; import Widget from '../Widget.jsx'; import './WidgetWeather.scss'; class WidgetWeather extends Component { render() { return ( <div> <Widget module="Weather" parameters={this.props.parameters}> <p className="basic"> <span className="te...
import React, { Component } from 'react'; import Widget from '../Widget.jsx'; import './WidgetWeather.scss'; class WidgetWeather extends Component { render() { return ( <div> <Widget module="Weather" parameters={this.props.parameters}> <p className="basic"> <span className="te...
Fix hardcoded value in Weather widget percentage.
Fix hardcoded value in Weather widget percentage.
JSX
mit
NazarenoL/smart-mirror-front,NazarenoL/smart-mirror-front
--- +++ @@ -19,7 +19,7 @@ </p> <p className="rain-probability"> <i className="icon icon-umbrella" /> - <span className="percentage">30%</span> + <span className="percentage">{this.props.parameters.percentage}</span> </p> </Widget> </d...
dd779e1523a9762b50c4a3dd757edce531a940b4
ditto/static/flux-chat/js/components/ShowStatus.jsx
ditto/static/flux-chat/js/components/ShowStatus.jsx
var React = require('react'); var ChatConstants = require('../constants/ChatConstants'); var ShowStatus = React.createClass({ propTypes: { code: React.PropTypes.oneOf([ 'online', 'away', 'chat', 'dnd', 'xa', 'offline' ]).isRequired, message: React.PropTy...
var React = require('react'); var ChatConstants = require('../constants/ChatConstants'); var ShowStatus = React.createClass({ propTypes: { code: React.PropTypes.oneOf([ 'online', 'away', 'chat', 'dnd', 'xa', 'offline' ]).isRequired, message: React.PropTy...
Fix user's status shown on message thread accordion
Fix user's status shown on message thread accordion
JSX
bsd-3-clause
Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto
--- +++ @@ -33,10 +33,10 @@ } else { style.backgroundColor = 'red'; } - statusText = statusText || ChatConstants.chatStatus[code]; + statusText = statusText || ChatConstants.chatStatus[this.props.code]; return ( <span> - <i style={style}></i> + <i key={this.props.code} style={style}></i> <span ...
948ee1c3eb10780e9548f8135d3095ca7acc8f9a
client_side/components/radio_station.jsx
client_side/components/radio_station.jsx
var React = require('react'); /** * A component for single station item. * * This is a "dumb" React component. * * These options must be passed to the component: * - id * - name * - isPlaying */ module.exports = React.createClass({ propTypes: { id: React.PropTypes.string.isRequired, nam...
var React = require('react'); /** * A component for single station item. * * This is a "dumb" React component. * * These options must be passed to the component: * - id * - name * - isPlaying */ module.exports = React.createClass({ propTypes: { id: React.PropTypes.string.isRequired, nam...
Add missed prop definition to RadioStation component
Add missed prop definition to RadioStation component
JSX
apache-2.0
JustBlackBird/bluethroat,JustBlackBird/bluethroat,JustBlackBird/bluethroat
--- +++ @@ -14,7 +14,8 @@ propTypes: { id: React.PropTypes.string.isRequired, name: React.PropTypes.string.isRequired, - isPlaying: React.PropTypes.bool.isRequired + isPlaying: React.PropTypes.bool.isRequired, + clickHandler: React.PropTypes.func.isRequired }, h...
f95d539026c10c737ad321443af3659591c0d45e
src/javascript/app_2/App/Components/Elements/money.jsx
src/javascript/app_2/App/Components/Elements/money.jsx
import PropTypes from 'prop-types'; import React from 'react'; import { formatMoney } from '../../../../_common/base/currency_base'; const Money = ({ amount, currency, is_formatted = true, }) => ( <React.Fragment> <span className={`symbols ${(currency || 'USD').toLowerCase()}`} ...
import PropTypes from 'prop-types'; import React from 'react'; import { formatMoney } from '../../../../_common/base/currency_base'; const Money = ({ amount, currency = 'USD', has_sign, is_formatted = true, }) => { let sign = ''; if (+amount && (amount < 0 || has_sign)) { ...
Extend the Money component to display number sign
Extend the Money component to display number sign
JSX
apache-2.0
4p00rv/binary-static,binary-com/binary-static,kellybinary/binary-static,ashkanx/binary-static,ashkanx/binary-static,kellybinary/binary-static,4p00rv/binary-static,ashkanx/binary-static,binary-static-deployed/binary-static,binary-com/binary-static,4p00rv/binary-static,binary-com/binary-static,kellybinary/binary-static,b...
--- +++ @@ -4,14 +4,26 @@ const Money = ({ amount, - currency, + currency = 'USD', + has_sign, is_formatted = true, -}) => ( - <React.Fragment> - <span className={`symbols ${(currency || 'USD').toLowerCase()}`} /> - {is_formatted ? formatMoney(currency, amount, true) : amount} -...
056999f7459aa6ab82fd5de3e64e727f7faca13f
ui/src/main.jsx
ui/src/main.jsx
/* @flow weak */ import App from './app.jsx'; import React from 'react'; import ReactDOM from 'react-dom'; document.addEventListener('DOMContentLoaded', () => { ReactDOM.render(<App history={true}/>, document.getElementById('app-main')); });
/* @flow weak */ import App from './app.jsx'; import React from 'react'; import ReactDOM from 'react-dom'; import Rollbar from 'rollbar-browser'; document.addEventListener('DOMContentLoaded', () => { startRollbar(); ReactDOM.render(<App history={true}/>, document.getElementById('app-main')); }); function startR...
Add rollbar to report JS errors
Add rollbar to report JS errors
JSX
mit
mit-teaching-systems-lab/threeflows,kesiena115/threeflows,mit-teaching-systems-lab/threeflows,kesiena115/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,kesiena115/threeflows
--- +++ @@ -2,7 +2,26 @@ import App from './app.jsx'; import React from 'react'; import ReactDOM from 'react-dom'; +import Rollbar from 'rollbar-browser'; + document.addEventListener('DOMContentLoaded', () => { + startRollbar(); ReactDOM.render(<App history={true}/>, document.getElementById('app-main')); }...
aca988a16b4b5412e6bc7559a1822834c3af8fd7
app/assets/javascripts/components/components/drawer.jsx
app/assets/javascripts/components/components/drawer.jsx
import PureRenderMixin from 'react-addons-pure-render-mixin'; const Drawer = React.createClass({ mixins: [PureRenderMixin], render () { return ( <div style={{ width: '280px', flex: '0', boxSizing: 'border-box', background: '#454b5e', margin: '10px', marginRight: '0', padding: '0', display: 'flex', flex...
import PureRenderMixin from 'react-addons-pure-render-mixin'; const Drawer = React.createClass({ mixins: [PureRenderMixin], render () { return ( <div style={{ width: '280px', flex: '0 0 auto', boxSizing: 'border-box', background: '#454b5e', margin: '10px', marginRight: '0', padding: '0', display: 'flex...
Fix for Drawer growing horizontally
Fix for Drawer growing horizontally
JSX
agpl-3.0
Ryanaka/mastodon,3846masa/mastodon,esetomo/mastodon,8796n/mastodon,ykzts/mastodon,rainyday/mastodon,Nyoho/mastodon,Gargron/mastodon,MastodonCloud/mastodon,kirakiratter/mastodon,anon5r/mastonon,mhffdq/mastodon,NS-Kazuki/mastodon,primenumber/mastodon,h3zjp/mastodon,narabo/mastodon,tri-star/mastodon,pso2club/mastodon,h3zj...
--- +++ @@ -6,7 +6,7 @@ render () { return ( - <div style={{ width: '280px', flex: '0', boxSizing: 'border-box', background: '#454b5e', margin: '10px', marginRight: '0', padding: '0', display: 'flex', flexDirection: 'column' }}> + <div style={{ width: '280px', flex: '0 0 auto', boxSizing: 'border-...
38c100482799d1381b6b4c645f45ccb0c7b514de
app/javascript/packs/agendum_note/agendum_note_list.jsx
app/javascript/packs/agendum_note/agendum_note_list.jsx
import React, { Component } from 'react'; // Controls import AgendumNote from './agendum_note'; /* * Create a list of agendum Notes. */ export default class AgendumNoteList extends Component { constructor(props) { super(props); this.state = this.getInitialState(props.notes); } getInitia...
import React, { Component } from 'react'; // Controls import AgendumNote from './agendum_note'; /* * Create a list of agendum Notes. */ export default class AgendumNoteList extends Component { constructor(props) { super(props); this.state = this.getInitialState(props.notes); } getInitia...
Fix new notes bug. ~/Projects/adjourn Adding a new note resulted in the new "add new note" field having the text from the previously added new note.
Fix new notes bug. ~/Projects/adjourn Adding a new note resulted in the new "add new note" field having the text from the previously added new note.
JSX
mit
robyparr/adjourn,robyparr/adjourn,robyparr/adjourn
--- +++ @@ -49,7 +49,7 @@ this.state.notes.map(note => { return ( <AgendumNote - key={note.id || 'new'} + key={note.id || new Date()} note={note} ...
f8c9fece931f3a9a0be96a318a45aea16da23be1
app/scripts/components/views/teacher-dashboard-view.jsx
app/scripts/components/views/teacher-dashboard-view.jsx
import React from 'react'; import {ButtonLink} from 'react-router-bootstrap'; import {PageHeader, ListGroup, ListGroupItem} from 'react-bootstrap'; /** * Shown to the teacher upon logging in; contains a list of classes. */ let TeacherDashboardView = React.createClass({ render: function() { return ( ...
import React from 'react'; import {ListGroupItemLink} from 'react-router-bootstrap'; import {PageHeader, ListGroup, ListGroupItem} from 'react-bootstrap'; /** * Shown to the teacher upon logging in; contains a list of classes. */ let TeacherDashboardView = React.createClass({ render: function() { return...
Make list items use ListGroupItemLink
Make list items use ListGroupItemLink
JSX
mit
DigitalLiteracyProject/class,DigitalLiteracyProject/class
--- +++ @@ -1,5 +1,5 @@ import React from 'react'; -import {ButtonLink} from 'react-router-bootstrap'; +import {ListGroupItemLink} from 'react-router-bootstrap'; import {PageHeader, ListGroup, ListGroupItem} from 'react-bootstrap'; /** @@ -15,14 +15,11 @@ </PageHeader> <ListGr...
75473a59f39dafb3c6c873c10efb34e8b35bd1e5
app/assets/javascripts/App.js.jsx
app/assets/javascripts/App.js.jsx
//= require_self //= require_tree ./App App = {}; App.setPath = function(path){ history.pushState({}, document.title, path); $(window).trigger('pushstate'); }; App.router = function(path){ if (path === '/') return <HomePage /> if (path === '/tweet-box') return <TweetBox /> return <div>Page Not Found</div>...
//= require_self //= require_tree ./App App = {}; App.request = function(method, path, data){ return new Promise(function(resolve, reject){ var request = $.ajax({ url: path, method: method, data: data, dataType: "json" }); request.done(function(serverData){ reso...
Update router and ajax button for SPA
Update router and ajax button for SPA
JSX
mit
acoravos/veritas,acoravos/veritas,acoravos/veritas
--- +++ @@ -3,7 +3,26 @@ App = {}; -App.setPath = function(path){ +App.request = function(method, path, data){ + return new Promise(function(resolve, reject){ + var request = $.ajax({ + url: path, + method: method, + data: data, + dataType: "json" + }); + + request.done(f...
251f7bf59d4bb66dece956172be79732dbcfc65d
src/views/splash/beta/middle-banner.jsx
src/views/splash/beta/middle-banner.jsx
const FormattedMessage = require('react-intl').FormattedMessage; const injectIntl = require('react-intl').injectIntl; const React = require('react'); const FlexRow = require('../../../components/flex-row/flex-row.jsx'); const TitleBanner = require('../../../components/title-banner/title-banner.jsx'); require('./middl...
const FormattedMessage = require('react-intl').FormattedMessage; const injectIntl = require('react-intl').injectIntl; const React = require('react'); const FlexRow = require('../../../components/flex-row/flex-row.jsx'); const TitleBanner = require('../../../components/title-banner/title-banner.jsx'); require('./middl...
Add middle banner in progress copy
Add middle banner in progress copy
JSX
bsd-3-clause
LLK/scratch-www,LLK/scratch-www
--- +++ @@ -9,11 +9,13 @@ const MiddleBanner = () => ( <TitleBanner className="beta-middle-banner"> - <FlexRow> + <FlexRow className="beta-middle-container column"> + <h2 className="beta-header">The Next Generation of Scratch</h2> + <h3 className="beta-copy">Try out the bet...
dec267c11c289d8a80058e365779575d227759e0
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/devportal/source/src/app/components/Apis/Details/ApiConsole/SwaggerUI.jsx
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/devportal/source/src/app/components/Apis/Details/ApiConsole/SwaggerUI.jsx
import React from 'react'; import PropTypes from 'prop-types'; import 'swagger-ui/dist/swagger-ui.css'; import SwaggerUILib from './PatchedSwaggerUIReact'; const disableAuthorizeAndInfoPlugin = function () { return { wrapComponents: { info: () => () => null, }, }; }; /** * * @clas...
import React from 'react'; import PropTypes from 'prop-types'; import 'swagger-ui/dist/swagger-ui.css'; import SwaggerUILib from './PatchedSwaggerUIReact'; const disableAuthorizeAndInfoPlugin = function () { return { wrapComponents: { info: () => () => null, }, }; }; /** * * @clas...
Remove /* from url with query parameters.
Remove /* from url with query parameters.
JSX
apache-2.0
tharindu1st/carbon-apimgt,ruks/carbon-apimgt,nuwand/carbon-apimgt,ruks/carbon-apimgt,ruks/carbon-apimgt,Rajith90/carbon-apimgt,malinthaprasan/carbon-apimgt,Rajith90/carbon-apimgt,chamindias/carbon-apimgt,tharikaGitHub/carbon-apimgt,praminda/carbon-apimgt,tharikaGitHub/carbon-apimgt,chamilaadhi/carbon-apimgt,Rajith90/ca...
--- +++ @@ -29,6 +29,9 @@ req.headers[authorizationHeader] = 'Bearer ' + accessTokenProvider(); if (url.endsWith(patternToCheck)) { req.url = url.substring(0, url.length - 2); + } else if (url.includes('/*?')) { + const splitTokens = url.split('/*?'...
d51d2be60cc163c8b4f8989c046e20786aa3b1f0
src/components/SightingList.jsx
src/components/SightingList.jsx
import React from 'react'; const SightingList = props => { console.log(props); return ( <div> <h1>Sighting List</h1> {props.sightings.map(s => ( <ul> <li>{s.scientificName}</li> <li> Count: {s.count} </li> <li> Sex:...
import React from 'react'; // import { Card, CardMedia, CardTitle, CardText } from 'material-ui/Card'; // import styled from 'styled-components'; // const Img = styled.img` // margin: // ` const SightingList = props => { console.log(props); return ( <div> <h1>Sighting List</h1> {props.sightings.m...
Add images on profile page per user sighting list
Add images on profile page per user sighting list
JSX
mit
omarcodex/butterfly-pinner,omarcodex/butterfly-pinner
--- +++ @@ -1,4 +1,9 @@ import React from 'react'; +// import { Card, CardMedia, CardTitle, CardText } from 'material-ui/Card'; +// import styled from 'styled-components'; +// const Img = styled.img` +// margin: +// ` const SightingList = props => { console.log(props); @@ -24,6 +29,9 @@ Long: ...
5d42f6a6f71a04e6a21f1fb026a940560fb34ba0
src/components/Link/index.jsx
src/components/Link/index.jsx
import { Link as GatsbyLink } from "gatsby" import React from "react" import { linkColor } from "../../utils/styles" const styles = { backgroundImage: `linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 1px, ${linkColor} 1px, ${linkColor} 2px, rgba(0, 0, 0, 0) 2px)`, borderRadius: "0.3em", color: linkCol...
import { Link as GatsbyLink } from "gatsby" import React from "react" import { linkColor } from "../../utils/styles" const styles = { backgroundImage: `linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 1px, ${linkColor} 1px, ${linkColor} 2px, rgba(0, 0, 0, 0) 2px)`, borderRadius: "0.3em", color: linkCol...
Add noopener to existing rel on external links
Add noopener to existing rel on external links
JSX
mit
jbhannah/jbhannah.net,jbhannah/jbhannah.net
--- +++ @@ -19,7 +19,11 @@ } if (domainPattern.test(href)) { - props.rel = "noopener" + if (props.hasOwnProperty("rel")) { + props.rel += " noopener" + } else { + props.rel = "noopener" + } props.target = "_blank" }
a60bbf267789d1e3e9f4efca77ee61767bc3f86f
src/renderer/containers/app.jsx
src/renderer/containers/app.jsx
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import 'semantic-ui-css/semantic.css'; import 'semantic-ui-css/semantic'; import './app.css'; class AppContainer extends Component { static propTypes = { dispatch: PropTypes.func.isRequired, history: PropTypes.obje...
import React, { Component, PropTypes } from 'react'; import 'semantic-ui-css/semantic.css'; import 'semantic-ui-css/semantic'; import './app.css'; export default class AppContainer extends Component { static propTypes = { history: PropTypes.object.isRequired, route: PropTypes.object.isRequired, routeP...
Remove not used Redux connect
Remove not used Redux connect
JSX
mit
sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui,sqlectron/sqlectron-gui
--- +++ @@ -1,5 +1,4 @@ import React, { Component, PropTypes } from 'react'; -import { connect } from 'react-redux'; import 'semantic-ui-css/semantic.css'; @@ -7,9 +6,8 @@ import './app.css'; -class AppContainer extends Component { +export default class AppContainer extends Component { static propTypes ...
987e5853c183d519a811cfe2fd0e381ee3aae5d0
src/main/webapp/resources/js/pages/projects/linelist/components/Table/renderers/IconCellRenderer.jsx
src/main/webapp/resources/js/pages/projects/linelist/components/Table/renderers/IconCellRenderer.jsx
import React from "react"; import PropTypes from "prop-types"; import { Icon, Tooltip } from "antd"; function LockedIcon() { return ( <Tooltip title={i18n("project.samples.locked-title")} placement="right"> <Icon type="lock" theme="twoTone" /> </Tooltip> ); } export class IconCellRenderer extends R...
/** * @file Display a column for icons based on specific data from the entry. */ import React from "react"; import PropTypes from "prop-types"; import { Tooltip } from "antd"; import { blue6 } from "../../../../../../styles/colors"; function LockedIcon() { return ( <Tooltip title={i18n("project.samples.locked...
Update file comments and icon
Update file comments and icon
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
--- +++ @@ -1,12 +1,16 @@ +/** + * @file Display a column for icons based on specific data from the entry. + */ import React from "react"; import PropTypes from "prop-types"; -import { Icon, Tooltip } from "antd"; +import { Tooltip } from "antd"; +import { blue6 } from "../../../../../../styles/colors"; functi...
97aa4a53b1cf5a1c2bb41ecb4b98422a4817e0a8
client/index.jsx
client/index.jsx
import React from 'react' import {render} from 'react-dom' import Router from './router.jsx'; render( Router, document.getElementById('app') );
import React from 'react' import {render} from 'react-dom' import Router from './router.jsx'; import 'babel-polyfill'; render( Router, document.getElementById('app') );
Add polyfill to support IE11
Add polyfill to support IE11
JSX
apache-2.0
spolnik/JAlgoArena-UI,spolnik/JAlgoArena-UI,spolnik/JAlgoArena-UI
--- +++ @@ -1,6 +1,7 @@ import React from 'react' import {render} from 'react-dom' import Router from './router.jsx'; +import 'babel-polyfill'; render( Router,
b6eab5c9a0f574dcf9e20e7624ec5912d9c19c5c
ui/src/components/EntityScreen/Entity.jsx
ui/src/components/EntityScreen/Entity.jsx
import { Link } from 'react-router-dom'; import React, { Component } from 'react'; import Schema from 'src/components/common/Schema'; import getPath from 'src/util/getPath'; class Label extends Component { render() { const { icon = false } = this.props; let { title, name, file_name, schema } = this.props.e...
import { Link } from 'react-router-dom'; import React, { Component } from 'react'; import Schema from 'src/components/common/Schema'; import getPath from 'src/util/getPath'; class Label extends Component { render() { const { icon = false } = this.props; let { title, name, file_name, schema } = this.props.e...
Remove ugly entity name stuff, need to do this better.
Remove ugly entity name stuff, need to do this better.
JSX
mit
alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph,pudo/aleph,alephdata/aleph,pudo/aleph,pudo/aleph
--- +++ @@ -9,17 +9,6 @@ render() { const { icon = false } = this.props; let { title, name, file_name, schema } = this.props.entity; - // title = toString(title); - // name = toString(name); - // file_name = toString(file_name); - // if (!short && title && file_name && title !== file_name) { ...
bb38602428d7bd5b6368afb62f11a70ec635f631
src/views/landmarks/Header.jsx
src/views/landmarks/Header.jsx
import * as React from 'react'; import {NavLink} from 'react-router-dom'; class Header extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function render() { return ( <div className="header clearfix"> <nav> <ul className="nav nav-pil...
import * as React from 'react'; import {NavLink} from 'react-router-dom'; class Header extends React.Component { // eslint-disable-line react/prefer-stateless-function render() { return ( <div className="header clearfix"> <nav> <ul className="nav nav-pills f...
Fix issue with activeClassNave not working because component was changed to a PureComponent.
Fix issue with activeClassNave not working because component was changed to a PureComponent.
JSX
mit
codeBelt/hapi-react-hot-loader-example,codeBelt/hapi-react-hot-loader-example
--- +++ @@ -1,7 +1,7 @@ import * as React from 'react'; import {NavLink} from 'react-router-dom'; -class Header extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function +class Header extends React.Component { // eslint-disable-line react/prefer-stateless-function render() { ...
30f1ddbdde7acfb574e9ef4688fb310252676dea
js/ClientApp.jsx
js/ClientApp.jsx
/* global React ReactDOM */ const React = require('react') const ReactDOM = require('react-dom') const Landing = require('./Landing') const Search = require('./Search') const ReactRouter = require('react-router') { /* destructuring es6 feature*/ } const { Router, Route, hashHistory } = ReactRouter { /* line 11-13, e...
/* global React ReactDOM */ const React = require('react') const ReactDOM = require('react-dom') const Landing = require('./Landing') const Search = require('./Search') const Layout = require('./Layout') const ReactRouter = require('react-router') { /* destructuring es6 feature*/ } const { Router, Route, IndexRoute, ...
Add index route to landing page and Nest Routes to pass Layout as props
Add index route to landing page and Nest Routes to pass Layout as props
JSX
mit
aramay/react-intro-v1,aramay/react-intro-v1
--- +++ @@ -3,11 +3,12 @@ const ReactDOM = require('react-dom') const Landing = require('./Landing') const Search = require('./Search') +const Layout = require('./Layout') const ReactRouter = require('react-router') { /* destructuring es6 feature*/ } -const { Router, Route, hashHistory } = ReactRouter +const...
c3999717f5ece3498ce571b4512ced089333952a
static/app/index.jsx
static/app/index.jsx
console.log("Hello World!");
import React from 'react'; import {render} from 'react-dom'; class App extends React.Component { render () { return <p> Hello React Component!</p>; } } render(<App/>, document.getElementById('app'));
Create sample react component to test it out
Create sample react component to test it out
JSX
mit
FarmRadioHangar/fessboxconfig,FarmRadioHangar/fessboxconfig
--- +++ @@ -1 +1,9 @@ -console.log("Hello World!"); +import React from 'react'; +import {render} from 'react-dom'; + +class App extends React.Component { + render () { + return <p> Hello React Component!</p>; + } +} +render(<App/>, document.getElementById('app'));
b5b9d18175d5f32082f2a413d3b873b4c53ca0e9
src/client/components/HardRedirect/index.jsx
src/client/components/HardRedirect/index.jsx
import { useEffect } from 'react' import { connect } from 'react-redux' import { HARD_REDIRECT } from '../../actions' /** * @function HardRedirect * @description When rendered, it will change {window.location.href} to the * value of {to}. This is meant to be used in cases when there's a need to * redirect to a di...
import { useEffect } from 'react' import { connect } from 'react-redux' import { HARD_REDIRECT } from '../../actions' /** * @function HardRedirect * @description When rendered, it will change {window.location.href} to the * value of {to}. This is meant to be used in cases when there's a need to * redirect to a di...
Update HardRedirect to take a function as children
Update HardRedirect to take a function as children This will allow the hard redirect function to be called imperatively.
JSX
mit
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
--- +++ @@ -13,6 +13,9 @@ * @param {string} props.to - The URL to redirect to * @param {any} props.when - The redirect will only happen when this expression * is truthy + * @param {(redirect: (to: string) => any) => React.ReactNode} props.children - A + * function which will be passed the redirect function as i...
372354613f9461116f5e71ee33994c1bbe292a60
src/containers/Root/Root.prod.jsx
src/containers/Root/Root.prod.jsx
import React from 'react' import createBrowserHistory from 'history/lib/createBrowserHistory' // have no idea which api version this will work in. fuck rackt. import useScroll from 'scroll-behavior/lib/useSimpleScroll' import { Provider } from 'react-redux' import configureStore from 'store/configureStore' import confi...
import React from 'react' import createBrowserHistory from 'history/lib/createBrowserHistory' // have no idea which api version this will work in. fuck rackt. import useScroll from 'scroll-behavior/lib/useSimpleScroll' import { Provider } from 'react-redux' import configureStore from 'store/configureStore' import confi...
Fix incorrect usage of enhancer function 'useScroll' on 'createHistory.'
Fix incorrect usage of enhancer function 'useScroll' on 'createHistory.' Accidentally executed createHistory -> createHistory() before passing it into useScroll().
JSX
mit
sunyang713/sabor-website,sunyang713/sabor-website
--- +++ @@ -5,7 +5,7 @@ import configureStore from 'store/configureStore' import configureRoutes from './configureRoutes' -const browserHistory = useScroll(createBrowserHistory())() +const browserHistory = useScroll(createBrowserHistory)() export default ( <Provider store={ configureStore(browserHistory) }>
974d989332643a45393a1d18589f82aaced7a200
src/components/MoveModal.spec.jsx
src/components/MoveModal.spec.jsx
import React from 'react' import { render, fireEvent, configure } from '@testing-library/react' import MoveModal from './MoveModal' import CozyClient, { CozyProvider } from 'cozy-client' import useInstanceSettings from 'hooks/useInstanceSettings' import AppLike from '../../test/AppLike' configure({ testIdAttribute: 'd...
import React from 'react' import { render, fireEvent, configure } from '@testing-library/react' import MoveModal from './MoveModal' import CozyClient, { CozyProvider } from 'cozy-client' import useInstanceSettings from 'hooks/useInstanceSettings' import AppLike from '../../test/AppLike' configure({ testIdAttribute: 'd...
Update MoveModal test after upgrade to muiv4
test: Update MoveModal test after upgrade to muiv4 The dialog paper changes roles to none when hidden, and when shown, uses the presentation role.
JSX
agpl-3.0
cozy/cozy-home,cozy/cozy-home,cozy/cozy-home
--- +++ @@ -43,6 +43,7 @@ 'DELETE', '/settings/instance/moved_from' ) - expect(root.queryByRole('document').style.opacity).toBe('0') + const dialogPaper = root.queryByRole('none') + expect(dialogPaper.style.opacity).toBe('0') }) })
cf515d0700ed4dff8cab1e5d86fbc123b3ee0307
src/js/components/MenuItemComponent.jsx
src/js/components/MenuItemComponent.jsx
import React from "react/addons"; import Util from "../helpers/Util"; var MenuItemComponent = React.createClass({ "displayName": "MenuItemComponent", propTypes: { children: React.PropTypes.node, className: React.PropTypes.string, id: React.PropTypes.string, name: React.PropTypes.string, select...
import React from "react/addons"; import Util from "../helpers/Util"; var MenuItemComponent = React.createClass({ "displayName": "MenuItemComponent", propTypes: { children: React.PropTypes.node, className: React.PropTypes.string, id: React.PropTypes.string, name: React.PropTypes.string, select...
Fix app modal error highlighting issue
Fix app modal error highlighting issue Remove the shouldComponent check as it prevents rendering on class name change and is unnecessary. Closes mesosphere/marathon#3436
JSX
apache-2.0
mesosphere/marathon-ui,cribalik/marathon-ui,cribalik/marathon-ui,mesosphere/marathon-ui
--- +++ @@ -15,12 +15,8 @@ getInitialState: function () { return { - id: "menu-item-" + Util.getUniqueId(), + id: "menu-item-" + Util.getUniqueId() }; - }, - - shouldComponentUpdate: function (newProps) { - return this.props.selected !== newProps.selected; }, render: function ()...
b80917769e2c532edcecb5298ae9fce3f00f58c7
src/ui/components/FileList.jsx
src/ui/components/FileList.jsx
import { h } from 'preact'; import FileListItem from 'components/FileListItem'; import Center from 'components/Center'; import { GATEWAY_URL } from '../../electron/constants'; import { Button } from 'preact-photon'; import { shell, ipcRenderer } from 'electron'; const FileList = ({ files, synced, boxPath }) => { i...
import { h } from 'preact'; import FileListItem from 'components/FileListItem'; import Center from 'components/Center'; import { GATEWAY_URL } from '../../electron/constants'; import { Button } from 'preact-photon'; import { shell, ipcRenderer } from 'electron'; const FileList = ({ files, synced, boxPath }) => { i...
Sort by the most recent added file
Sort by the most recent added file
JSX
mit
BusterLabs/Partyshare,BusterLabs/Partyshare
--- +++ @@ -28,6 +28,8 @@ ); } + files = files.sort((a, b) => new Date(b.stats.ctime) - new Date(a.stats.ctime)); + return ( <ul className="file_list"> {files.map((file) => <FileListItem file={file} url={`${GATEWAY_URL}/${file.hash}`} />)}
577f645c6e33f96002f93607e7d6fc5e25bc6ca7
Hello-React/public/app.jsx
Hello-React/public/app.jsx
ReactDOM.render( <h1>Hello via React</h1>, document.getElementById("app") );
var Greeter = React.createClass({ getDefaultProps: function () { return { name: 'you', message: 'This is from the component' }; }, render: function () { var name = this.props.name, message = this.props.message; return ( <div> <h1>Hello to {name} from React Com...
Add parameters to first React component
Add parameters to first React component
JSX
mit
JulianNicholls/Complete-React-Web-App,JulianNicholls/Complete-React-Web-App
--- +++ @@ -1,4 +1,26 @@ +var Greeter = React.createClass({ + getDefaultProps: function () { + return { + name: 'you', + message: 'This is from the component' + }; + }, + render: function () { + var name = this.props.name, + message = this.props.message; + + return ( + <div> + ...
d1153994c9f38e0abeb84d745f17435b1aee0d69
packages/lesswrong/components/sequences/SequenceTooltip.jsx
packages/lesswrong/components/sequences/SequenceTooltip.jsx
import React from 'react'; import { Components, registerComponent, } from 'meteor/vulcan:core'; import { withStyles } from '@material-ui/core/styles'; import { truncate } from '../../lib/editor/ellipsize'; const SEQUENCE_DESCRIPTION_TRUNCATION_LENGTH = 750; const styles = theme => ({ sequenceDescriptionHighlight: {...
import React from 'react'; import { Components, registerComponent, } from 'meteor/vulcan:core'; import { withStyles } from '@material-ui/core/styles'; import { truncate } from '../../lib/editor/ellipsize'; const SEQUENCE_DESCRIPTION_TRUNCATION_LENGTH = 750; const styles = theme => ({ sequenceDescriptionHighlight: {...
Hide sequence-creation date (it's the post dates you want), title and author (they're already on the grid item)
Hide sequence-creation date (it's the post dates you want), title and author (they're already on the grid item)
JSX
mit
Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2
--- +++ @@ -16,9 +16,10 @@ const truncatedDescription = truncate(sequence.contents && sequence.contents.htmlHighlight, SEQUENCE_DESCRIPTION_TRUNCATION_LENGTH); return <div> - <div>{sequence.title}</div> - <div>by {sequence.user.displayName}</div> - <div>Created <CalendarDate date={sequence.createdA...
b8880086c6a401eeebd17af7158eab78c6b905b6
src/js/myapp.jsx
src/js/myapp.jsx
import React from 'react'; import ReactDOM from 'react-dom'; import App from './app'; import Data from '../../../data/monsters'; ReactDOM.render(<App allMonsters={Data} />, document.getElementById('mountpoint'));
import React from 'react'; import ReactDOM from 'react-dom'; import App from './app'; import Data from '../../../data/monsters'; import "../css/style"; ReactDOM.render(<App allMonsters={Data} />, document.getElementById('mountpoint'));
Add ref to style for webpack
Add ref to style for webpack
JSX
mit
jkrayer/summoner,jkrayer/summoner
--- +++ @@ -3,4 +3,6 @@ import App from './app'; import Data from '../../../data/monsters'; +import "../css/style"; + ReactDOM.render(<App allMonsters={Data} />, document.getElementById('mountpoint'));
e86ce5cf0621d00ff5981500af1b38e18e155f21
client/homebrew/pages/printPage/printPage.jsx
client/homebrew/pages/printPage/printPage.jsx
const React = require('react'); const createClass = require('create-react-class'); const _ = require('lodash'); const cx = require('classnames'); const Markdown = require('naturalcrit/markdown.js'); const PrintPage = createClass({ getDefaultProps : function() { return { query : {}, brew : { text :...
const React = require('react'); const createClass = require('create-react-class'); const _ = require('lodash'); const cx = require('classnames'); const Markdown = require('naturalcrit/markdown.js'); const PrintPage = createClass({ getDefaultProps : function() { return { query : {}, brew : { text :...
Fix potentially inconsistent React state update
PrintPage: Fix potentially inconsistent React state update
JSX
mit
calculuschild/homebrewery,stolksdorf/homebrewery,calculuschild/homebrewery
--- +++ @@ -22,7 +22,9 @@ componentDidMount : function() { if(this.props.query.local){ - this.setState({ brewText: localStorage.getItem(this.props.query.local) }); + this.setState((prevState, prevProps) => ({ + brewText: localStorage.getItem(prevProps.query.local) + })); } if(this.props.query....
ab7c5859e5e131ea18d898064320c382372a6c95
src/components/side-panel/add-swatches/AddSwatchesPanel.jsx
src/components/side-panel/add-swatches/AddSwatchesPanel.jsx
// @flow import React from 'react'; import AddSwatchForm from './AddSwatchForm'; import Palette from './Palette'; import type { PaletteType } from '../../../redux/modules/palettes'; type Props = { palettes: Array<PaletteType>, addNewSwatch: Function, deleteSwatches: Function } const AddSwatchesPanel = (props: ...
// @flow import React from 'react'; import AddSwatchForm from './AddSwatchForm'; import Palette from './Palette'; import type { PaletteType } from '../../../redux/modules/palettes'; type Props = { palettes: Array<PaletteType>, addNewSwatch: Function, deleteSwatches: Function } const AddSwatchesPanel = (props: ...
Move palette mapping inside return
[Refactor] Move palette mapping inside return
JSX
isc
eddyerburgh/palette-picker,eddyerburgh/palette-picker
--- +++ @@ -11,29 +11,26 @@ deleteSwatches: Function } -const AddSwatchesPanel = (props: Props): React$Element<any> => { - const palettes = props.palettes.map((palette, i) => - <Palette - {...palette} - addNewSwatch={props.addNewSwatch} - key={`palette${i}`} - />); - return ( - <div> -...
d73b7508bc82352f2a78b0627d606fcddeff4fc7
src/views/splash/splash.jsx
src/views/splash/splash.jsx
var React = require('react'); var Api = require('../../mixins/api.jsx'); var Session = require('../../mixins/session.jsx'); var Activity = require('../../components/activity/activity.jsx'); var Box = require('../../components/box/box.jsx'); var Carousel = require('../../components/carousel/carousel.jsx'); var Intro =...
var React = require('react'); var Api = require('../../mixins/api.jsx'); var Session = require('../../mixins/session.jsx'); var Activity = require('../../components/activity/activity.jsx'); var Box = require('../../components/box/box.jsx'); var Carousel = require('../../components/carousel/carousel.jsx'); var Intro =...
Add missing key, heed React warning
Add missing key, heed React warning
JSX
bsd-3-clause
LLK/scratch-www,LLK/scratch-www
--- +++ @@ -34,7 +34,7 @@ return ( <div className="inner"> {loggedIn ? [ - <div className="splash-header"> + <div key="header" className="splash-header"> <Activity /> <News /> ...
808ad6932749b5d48ad2d8f0e049dc80d56d8170
components/about.jsx
components/about.jsx
/** @jsx React.DOM */ About = React.createClass({ render: function() { return ( <div> <img src="images/inspectocat.png" className="octocat" /> <h1>Github Release Watch</h1> <h4>Github Release Watch checks your favourite Github repositories every day to see if any new tags or releas...
/** @jsx React.DOM */ About = React.createClass({ render: function() { return ( <div> <img src="images/inspectocat.png" className="octocat" /> <h1>Github Release Watch</h1> <h4>Github Release Watch checks your favourite Github repositories for any new tags or releases.</h4> ...
Clean up welcome page a bit
Clean up welcome page a bit
JSX
mit
mystor/gh-release-watch,doctaweeks/gh-release-watch,doctaweeks/gh-release-watch,mystor/gh-release-watch
--- +++ @@ -7,7 +7,7 @@ <img src="images/inspectocat.png" className="octocat" /> <h1>Github Release Watch</h1> - <h4>Github Release Watch checks your favourite Github repositories every day to see if any new tags or releases have been added.</h4> + <h4>Github Release Watch checks you...
549daced6e7d09a857af4d56ae31676cc47ee197
app/react/app/app.jsx
app/react/app/app.jsx
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux' import { createStore } from 'redux' import configureStore from './configureStore'; import Routes from './router'; import Tabbar from './views/Tabbar'; import './stylesheets/app.sass'; // Track errors in ...
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux' import { createStore } from 'redux' import configureStore from './configureStore'; import Routes from './router'; import Tabbar from './views/Tabbar'; import './stylesheets/app.sass'; // Track errors in ...
Remove clickdelay, it makes it worse
Remove clickdelay, it makes it worse
JSX
mit
sping/abcd-epic-fussball,sping/abcd-epic-fussball,sping/abcd-epic-fussball
--- +++ @@ -13,14 +13,6 @@ Raven.config('https://4ef1929be17b4868b4328e552d1451ad@sentry.io/152218').install() } -// remove 200ms delay on mobile click -import FastClick from 'fastclick' -if ('addEventListener' in document) { - document.addEventListener('DOMContentLoaded', function() { - FastClick.attach(do...
811c9cb47d6251b7116c9f6407fd47f5f3d85994
src/web/components/userEntry.jsx
src/web/components/userEntry.jsx
import Col from 'react-bootstrap/lib/Col'; import React, { PropTypes } from 'react'; import Row from 'react-bootstrap/lib/Row'; import Well from 'react-bootstrap/lib/Well'; import Login from './login'; import Signup from './signup'; const UserEntry = ({ login, onLoginChange, onLoginSubmit, onSignupChange, ...
import Col from 'react-bootstrap/lib/Col'; import React, { PropTypes } from 'react'; import Row from 'react-bootstrap/lib/Row'; import Well from 'react-bootstrap/lib/Well'; import Login from './login'; import Signup from './signup'; const UserEntry = ({ login, onLoginChange, onLoginSubmit, onSignupChange, ...
Disable user entry on load
Disable user entry on load
JSX
mit
just-paja/improtresk-web,just-paja/improtresk-web
--- +++ @@ -15,30 +15,35 @@ onSignupChange, onSignupSubmit, signup, -}) => ( - <Row> - <Col md={6}> - <h2>Už jsem zaregistrovaný</h2> - <Well> - <Login - form="login" - onChange={onLoginChange} - onSubmit={onLoginSubmit} - {...login} +}) => { + const ...
f5479d81fdbf72a95fcc42b6131b6702fa6a1f94
js/dispatcher.jsx
js/dispatcher.jsx
let operationList = []; let linkList = []; let count = 0; let observer = null; function emitChange() { observer(operationList, linkList); } export function observe(o) { if (observer) { throw new Error('Multiple observers not implemented.'); } observer = o; emitChange(); } export function addOperation(opType, ...
let operationList = []; let linkList = []; let count = 0; let observer = null; function emitChange() { observer(operationList, linkList); } export function observe(o) { if (observer) { throw new Error('Multiple observers not implemented.'); } observer = o; emitChange(); } export function addOperation(opType, ...
Add one simple constraint while adding link.
Add one simple constraint while adding link.
JSX
mit
ReactExperiment/Paint,ReactExperiment/Paint
--- +++ @@ -27,9 +27,25 @@ emitChange(); } +function canAddLink(index_a, index_b) { + if (index_a != index_b) { + for (let i = 0; i < linkList.length; i++) { + let a = linkList[i].a; + let b = linkList[i].b; + if (a === index_a && b === index_b) { + return false; + } + } + return true; + } + return...
184cb351c646f725d7eeefe2c323290311f71951
app/components/Container.jsx
app/components/Container.jsx
import React from 'react'; import $ from 'jquery'; import Title from './Title.jsx'; import UserEntry from './UserEntry.jsx'; import UrbanDictionaryListing from './UrbanDictionaryListing.jsx'; export default class Container extends React.Component { render() { return ( <div className="container"> <T...
import React from 'react'; import $ from 'jquery'; import Title from './Title.jsx'; import UserEntry from './UserEntry.jsx'; import UrbanDictionaryListing from './UrbanDictionaryListing.jsx'; export default class Container extends React.Component { render() { return ( <div className="container"> <T...
Remove temp var for key
Remove temp var for key
JSX
mit
hoop33/talk-teen,hoop33/talk-teen
--- +++ @@ -31,7 +31,6 @@ listings: [] } translate = (text) => { - var key = this.props.mashapeKey; $.ajax({ url: this.props.url, dataType: 'json', @@ -40,8 +39,8 @@ 'term': text }, beforeSend: function(xhr) { - xhr.setRequestHeader('X-Mashape-Key', key);...
506f68356046a685fb1e0209a81fdaea4a95c392
src/app.jsx
src/app.jsx
var React = require("react"); var App = React.createClass({ getInitialState(){ return { isActive: "true", id: 0 } }, getDefaultProps(){ return { text: 'this is a default prop', number: 0 } }, propTypes: { text: React.PropTypes.string, number: React.PropTypes.nu...
var React = require("react"); var App = React.createClass({ getInitialState(){ return { id: 0, first:"first", second:"second", third:"third", fourth:"fourth" } }, getDefaultProps(){ return { text: 'this is a default prop', number: 0 } }, propTypes: { ...
Use refs to access components
Use refs to access components
JSX
mit
vandosant/infohound,vandosant/infohound
--- +++ @@ -3,8 +3,11 @@ var App = React.createClass({ getInitialState(){ return { - isActive: "true", - id: 0 + id: 0, + first:"first", + second:"second", + third:"third", + fourth:"fourth" } }, getDefaultProps(){ @@ -18,16 +21,24 @@ number: React.PropTypes...
26b14f0472a70d56e3e39c78f740aa99faa3e66e
app/components/ListingItem/ListingItem.jsx
app/components/ListingItem/ListingItem.jsx
'use strict'; import './_ListingItem.scss'; import React from 'react'; import classnames from 'classnames'; import moment from 'moment'; import { COMMENTS_CLICK } from '../../constants/AppConstants'; var { PropTypes } = React; class ListingItem extends React.Component { constructor(...args) { super(...args)...
'use strict'; import './_ListingItem.scss'; import React from 'react'; import Router from 'react-router'; import classnames from 'classnames'; import moment from 'moment'; let { PropTypes } = React; let { Link } = Router; class ListingItem extends React.Component { getClassName() { return classnames('listing...
Use <Link/> for building anchors
Use <Link/> for building anchors
JSX
mit
badsyntax/echojs-mobile-client,badsyntax/echojs-mobile-client,badsyntax/echojs-mobile-client,badsyntax/echojs-mobile-client
--- +++ @@ -3,37 +3,17 @@ import './_ListingItem.scss'; import React from 'react'; +import Router from 'react-router'; import classnames from 'classnames'; import moment from 'moment'; -import { COMMENTS_CLICK } from '../../constants/AppConstants'; - -var { PropTypes } = React; +let { PropTypes } = React; +le...
655b1f3f346d5b4b3d41f7f98f2126e8af61fb89
test/AppLike.jsx
test/AppLike.jsx
import React from 'react' import { createStore } from 'redux' import CozyClient, { CozyProvider } from 'cozy-client' import { Provider as ReduxProvider } from 'react-redux' import PropTypes from 'prop-types' import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints' import I18n from 'cozy-ui/tr...
import React from 'react' import { createStore } from 'redux' import { CozyProvider } from 'cozy-client' import { createMockClient } from 'cozy-client/dist/mock' import { Provider as ReduxProvider } from 'react-redux' import PropTypes from 'prop-types' import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks...
Use a mock client so that fetchJSON is mocked
test: Use a mock client so that fetchJSON is mocked Prevents "Unhandled rejection errors: fetch is not defined"
JSX
agpl-3.0
cozy/cozy-home,cozy/cozy-home,cozy/cozy-home
--- +++ @@ -1,6 +1,7 @@ import React from 'react' import { createStore } from 'redux' -import CozyClient, { CozyProvider } from 'cozy-client' +import { CozyProvider } from 'cozy-client' +import { createMockClient } from 'cozy-client/dist/mock' import { Provider as ReduxProvider } from 'react-redux' import PropTyp...
6905704f4f13196549ef458817341b27f19eb941
src/containers/monitor-list.jsx
src/containers/monitor-list.jsx
import bindAll from 'lodash.bindall'; import React from 'react'; import PropTypes from 'prop-types'; import {connect} from 'react-redux'; import {moveMonitorRect} from '../reducers/monitor-layout'; import MonitorListComponent from '../components/monitor-list/monitor-list.jsx'; class MonitorList extends React.Compone...
import bindAll from 'lodash.bindall'; import React from 'react'; import PropTypes from 'prop-types'; import {connect} from 'react-redux'; import {moveMonitorRect} from '../reducers/monitor-layout'; import errorBoundaryHOC from '../lib/error-boundary-hoc.jsx'; import MonitorListComponent from '../components/monitor-l...
Add an error boundary for monitors, now that they do a lot.
Add an error boundary for monitors, now that they do a lot.
JSX
bsd-3-clause
LLK/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui
--- +++ @@ -4,6 +4,8 @@ import {connect} from 'react-redux'; import {moveMonitorRect} from '../reducers/monitor-layout'; + +import errorBoundaryHOC from '../lib/error-boundary-hoc.jsx'; import MonitorListComponent from '../components/monitor-list/monitor-list.jsx'; @@ -37,7 +39,9 @@ moveMonitorRect: (id...
9574c9285183f84fd930e8e8ffce32853d371b11
ui/src/components/common/ClipboardInput.jsx
ui/src/components/common/ClipboardInput.jsx
import React, { useState, useCallback, useRef } from 'react'; import { Button, InputGroup, Tooltip } from '@blueprintjs/core'; import { FormattedMessage } from 'react-intl'; export default function ClipboardInput(props) { const inputRef = useRef(null); const titles = [ <FormattedMessage id="clipboard.cop...
import React, { useState, useCallback, useRef } from 'react'; import { Button, InputGroup, Tooltip } from '@blueprintjs/core'; import { FormattedMessage } from 'react-intl'; export default function ClipboardInput(props) { const inputRef = useRef(null); const titles = [ <FormattedMessage id="clipboard.cop...
Remove use of useCallback in clipboard
Remove use of useCallback in clipboard
JSX
mit
pudo/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph
--- +++ @@ -26,14 +26,11 @@ rightElement={( <Tooltip content={titles[title]}> <Button - onClick={useCallback( - () => { + onClick={() => { inputRef.current.select(); document.execCommand('copy'); setTitle(...
9ff495a270b4d0aef058fa4c785fd7ba30017066
src/components/Github/Loading.jsx
src/components/Github/Loading.jsx
import React, { View, Text } from 'react-native'; export default () => { return ( <View> <Text> Loading items... </Text> </View> ); };
import React, { View, Text } from 'react-native'; export default () => { return ( <View style={styles.container}> <Text> Logout ... </Text> </View> ); }; const styles = { container: { flex: 1, justifyContent: 'center', alignIt...
Add logout screen as component
Add logout screen as component
JSX
mit
jseminck/react-native-github-feed,jseminck/react-native-github-feed,jseminck/react-native-github-feed
--- +++ @@ -2,10 +2,18 @@ export default () => { return ( - <View> + <View style={styles.container}> <Text> - Loading items... + Logout ... </Text> </View> ); }; + +const styles = { + container: { + flex: 1, + ...
b85dc80b42a104a9fb15c10f471912556241dfc1
client/src/components/Header.jsx
client/src/components/Header.jsx
import React from 'react'; class Header extends React.Component { constructor (props) { super(props); } render() { return ( <div> <div className="page-header text-center"> <h1>FoodQuest</h1> <small>the go-to app for Adventurous Eaters</small> </div> </div>...
import React from 'react'; class Header extends React.Component { constructor (props) { super(props); } render() { return ( <div> <div className="page-header text-center"> <h1 className='text-shadow'>FoodQuest</h1> <small>the go-to app for Adventurous Eat...
Edit h1 tag to add className text-shadow
Edit h1 tag to add className text-shadow
JSX
mit
Sibilant-Siblings/sibilant-siblings,Sibilant-Siblings/sibilant-siblings
--- +++ @@ -9,8 +9,10 @@ return ( <div> <div className="page-header text-center"> - <h1>FoodQuest</h1> - <small>the go-to app for Adventurous Eaters</small> + + <h1 className='text-shadow'>FoodQuest</h1> + <small>the go-to app for Adventurous Eate...
2ca40fce2d7129673442cba0d7b8f09c59386697
assets-server/components/shared/header.jsx
assets-server/components/shared/header.jsx
import React from 'react/addons'; import InlineStyles from 'react-style'; const inlineStyles = InlineStyles.create({ ISContainer : { padding : '8px 0 0 0', maxWidth : '1218px', margin : '0 auto' } }); export default class Header extends React.Component { constructor(props) { super(props); } ...
import React from 'react/addons'; import InlineStyles from 'react-style'; const inlineStyles = InlineStyles.create({ ISContainer : { padding : '8px 0 0 0', maxWidth : '1218px', margin : '0 auto' } }); export default class Header extends React.Component { constructor(props) { super(props); } ...
Add spaces between methods of Header class
Add spaces between methods of Header class
JSX
mit
renemonroy/es6-scaffold,renemonroy/es6-scaffold
--- +++ @@ -10,9 +10,11 @@ }); export default class Header extends React.Component { + constructor(props) { super(props); } + render() { const { heading } = this.props, { ISContainer } = this.styles; @@ -24,4 +26,5 @@ </header> ); } + }
b9320ee416a723c32a044c94284b6703f3f2ba04
client/components/SpeechView.jsx
client/components/SpeechView.jsx
import React from 'react'; import RecordingView from './RecordingView.jsx'; import SpeechAnalytics from './SpeechAnalytics.jsx'; export default class SpeechView extends React.Component { constructor(props) { super(props); this.state = { visibleAnalytics: false, value: '', }; } analyzeTe...
import React from 'react'; import RecordingView from './RecordingView.jsx'; export default function SpeechView() { return ( <div id="speech-input"> <h1 id="speech-input-title">Speech Analyzer</h1> <RecordingView /> </div> ); }
Address linter errors and clean up unnecessary code
Address linter errors and clean up unnecessary code
JSX
mit
alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor
--- +++ @@ -1,40 +1,11 @@ import React from 'react'; import RecordingView from './RecordingView.jsx'; -import SpeechAnalytics from './SpeechAnalytics.jsx'; -export default class SpeechView extends React.Component { - - constructor(props) { - super(props); - this.state = { - visibleAnalytics: false, - ...
c087d8c4784654e19d35ac7e54ee1bd9881ed488
docs/src/examples/date_range.jsx
docs/src/examples/date_range.jsx
var React = require("react"); var DatePicker = require("react-datepicker"); var moment = require("moment"); var DateRange = React.createClass({ displayName: "DateRange", getInitialState: function() { return { startDate: moment("2014-02-08"), endDate: moment("2014-02-10") }; }, handleChang...
var React = require("react"); var DatePicker = require("react-datepicker"); var moment = require("moment"); var DateRange = React.createClass({ displayName: "DateRange", getInitialState: function() { return { startDate: moment("2014-02-08"), endDate: moment("2014-02-10") }; }, handleChang...
Make date range selection example more realistic
Make date range selection example more realistic
JSX
mit
lmenus/react-datepicker,marketplacer/react-datepicker,mitchrosu/react-datepicker,Hacker0x01/react-datepicker,flexport/react-datepicker,mitchrosu/react-datepicker,bekerov/react-datepicker-roco,lmenus/react-datepicker,sss0791/react-datepicker,BrunoAlcides/react-datepicker,Hacker0x01/react-datepicker,Hacker0x01/react-date...
--- +++ @@ -12,10 +12,25 @@ }; }, - handleChange: function(date) { - this.setState({ - startDate: date - }); + handleChange: function({ startDate, endDate }) { + startDate = startDate || this.state.startDate; + endDate = endDate || this.state.endDate; + + if (startDate.isAfter(endDate)...
475dfcea734ed939225abc864ffc5b97dd2c91e5
app/app/components/Main.jsx
app/app/components/Main.jsx
import React from 'react' import Nav from './navbar/Nav.jsx'; import helpers from '../utils/helpers.jsx' export default class Main extends React.Component { render(){ return ( <div> <Nav /> <div className="container">{this.props.children}</div> </div> ) } }
import React from 'react' import Nav from './navbar/Nav.jsx'; import helpers from '../utils/helpers.jsx' export default class Main extends React.Component { render(){ return ( <div> <Nav /> <div className="container">{this.props.children}</div> </div> ) } }
Add new routes for new task
Add new routes for new task
JSX
mit
taodav/MicroSerfs,taodav/MicroSerfs
e68e43d3b06bb01d07e10b2ceaefb875e89d7505
imports/ui/ShowDID.jsx
imports/ui/ShowDID.jsx
import createReactClass from 'create-react-class' import QRCode from 'qrcode.react' import React from 'react' import {Button, Modal, ModalBody, ModalHeader} from 'reactstrap' const ShowDID = createReactClass({ getInitialState: () => ({modal: false}), toggle: function () { this.setState({ modal: !this.s...
import createReactClass from 'create-react-class' import QRCode from 'qrcode.react' import React from 'react' import {Button, Modal, ModalBody, ModalHeader} from 'reactstrap' import ShowTruncatedText from '/imports/ui/ShowTruncatedText' const ShowDID = createReactClass({ getInitialState: () => ({modal: false}), ...
Use truncated text to show the DID
Use truncated text to show the DID
JSX
mit
SpidChain/spidchain-btcr,SpidChain/spidchain-btcr
--- +++ @@ -2,6 +2,7 @@ import QRCode from 'qrcode.react' import React from 'react' import {Button, Modal, ModalBody, ModalHeader} from 'reactstrap' +import ShowTruncatedText from '/imports/ui/ShowTruncatedText' const ShowDID = createReactClass({ @@ -20,7 +21,7 @@ <Button color='primary' onClick={thi...
a6de62ee42835164a95aded7fe165de393d97657
frontend/src/visualizations/components/LineAreaBarChart.jsx
frontend/src/visualizations/components/LineAreaBarChart.jsx
import React, { Component, PropTypes } from "react"; import CardRenderer from "./CardRenderer.jsx"; import LegendHeader from "./LegendHeader.jsx"; import ChartTooltip from "./ChartTooltip.jsx"; import _ from "underscore"; import cx from "classnames"; export default class LineAreaBarChart extends Component { stat...
import React, { Component, PropTypes } from "react"; import CardRenderer from "./CardRenderer.jsx"; import LegendHeader from "./LegendHeader.jsx"; import ChartTooltip from "./ChartTooltip.jsx"; import _ from "underscore"; import cx from "classnames"; export default class LineAreaBarChart extends Component { stat...
Disable legend header outside of dashboard
Disable legend header outside of dashboard
JSX
agpl-3.0
blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase
--- +++ @@ -11,7 +11,8 @@ static propTypes = { series: PropTypes.array.isRequired, onAddSeries: PropTypes.func, - extraActions: PropTypes.node + extraActions: PropTypes.node, + isDashboard: PropTypes.bool }; getHoverClasses() { @@ -29,10 +30,10 @@ } ...
a8fb56e48aedcee8d7e23a578283da7bb5321455
test/components/settings/admin_user_list.spec.jsx
test/components/settings/admin_user_list.spec.jsx
import React from 'react'; import { shallow } from 'enzyme'; import '../../testHelper'; import AdminUserList from '../../../app/assets/javascripts/components/settings/admin_users_list.jsx'; describe('AdminUserList', () => { it('renders a List component with correct elements', () => { const expectedAdminUsers = ...
import React from 'react'; import { Provider } from 'react-redux'; import { render } from 'enzyme'; import '../../testHelper'; import AdminUserList from '../../../app/assets/javascripts/components/settings/admin_users_list.jsx'; describe('AdminUserList', () => { it('renders a List component with correct elements', ...
Fix jest tests to work with new List component
Fix jest tests to work with new List component This rewrites the first test of the admins list to work with the new List. It removes the second, because it was testing the situation of zero admins... which should never be rendered anyway since the settings view requires (super) admin permissions to view.
JSX
mit
WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducati...
--- +++ @@ -1,5 +1,6 @@ import React from 'react'; -import { shallow } from 'enzyme'; +import { Provider } from 'react-redux'; +import { render } from 'enzyme'; import '../../testHelper'; import AdminUserList from '../../../app/assets/javascripts/components/settings/admin_users_list.jsx'; @@ -7,30 +8,12 @@ desc...
15521d57e3d216190f9152510b656a9fce7bbb69
src/components/templates/DetailsTemplate/DetailsTemplate.jsx
src/components/templates/DetailsTemplate/DetailsTemplate.jsx
/* Copyright (C) 2017 Cloudbase Solutions SRL This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distribute...
/* Copyright (C) 2017 Cloudbase Solutions SRL This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distribute...
Fix missing details pages bottom margin on Safari
Fix missing details pages bottom margin on Safari
JSX
agpl-3.0
aznashwan/coriolis-web,aznashwan/coriolis-web
--- +++ @@ -23,7 +23,7 @@ const PageHeader = styled.div`` const ContentHeader = styled.div`` const Content = styled.div` - margin: 32px 0; + padding: 32px 0; ` type Props = { pageHeaderComponent: React.Node,
b1689a2b20e389e7732eabb539afe5cf00ccc487
client/src/components/UserList.jsx
client/src/components/UserList.jsx
import React from 'react'; import { Link } from 'react-router-dom'; const UserList = (props) => { if (props.clicked) { return ( <div> <div>Continue as: </div> {props.addUser.map((user)=>(<div key={user} onClick={props.passInCooks}><Link to="/inventory">{user}</Link></div>))} <div>or...
import React from 'react'; import { Link } from 'react-router-dom'; const UserList = (props) => { if (props.clicked) { return ( <div> <div>Continue as: </div> {props.addUser.map((user)=>(<div key={user} onClick={props.passInCooks.bind(this)}><Link to="/inventory">{user}</Link></div>))} ...
Add this binding to onClick function passInCooks
Add this binding to onClick function passInCooks
JSX
mit
SentinelsOfMagic/SentinelsOfMagic
--- +++ @@ -6,7 +6,7 @@ return ( <div> <div>Continue as: </div> - {props.addUser.map((user)=>(<div key={user} onClick={props.passInCooks}><Link to="/inventory">{user}</Link></div>))} + {props.addUser.map((user)=>(<div key={user} onClick={props.passInCooks.bind(this)}><Link to="/inve...
d2e63a40d26ede4bfa3f1b51e6d66f0160e106e9
src/app/components/selectable-box/SelectableBoxController.jsx
src/app/components/selectable-box/SelectableBoxController.jsx
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import SelectableBoxItem from './SelectableBoxItem'; const propTypes = { heading: PropTypes.string.isRequired, items: PropTypes.array, activeItem: PropTypes.object, handleItemClick: PropTypes.func, isUpdating: PropTypes....
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import SelectableBoxItem from './SelectableBoxItem'; const propTypes = { heading: PropTypes.string.isRequired, items: PropTypes.array, activeItem: PropTypes.object, handleItemClick: PropTypes.func, isUpdating: PropTypes....
Remove debugger on mount of selectabl box controller
Remove debugger on mount of selectabl box controller
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -16,10 +16,6 @@ super(props); this.bindItemClick = this.bindItemClick.bind(this); - } - - componentDidMount() { - debugger; } bindItemClick(itemProps) {
30efb3f8ad16d41591c722f428ccf8e9c109473a
react-component-template/index.jsx
react-component-template/index.jsx
import React, {PropTypes, Component} from 'react' const namespace = '{{camelName}}' export default class {{PascalName}} extends Component { render () { return (<div className={namespace}> <h1 className={`${namespace}-title`}>{this.props.name} component</h1> <img src={`//${this.props.name}.jpg.to`} />...
import React, {PropTypes, Component} from 'react' import {addons} from 'react/addons' const {shouldComponentUpdate} = addons.PureRenderMixin const namespace = '{{camelName}}' export default class {{PascalName}} extends Component { // use the pure-render mixin without the mixin. This allows us to use es6 // classes...
Add pureRender to react template
Add pureRender to react template
JSX
mit
Techwraith/ribcage-gen,Techwraith/ribcage-gen,cstumph/ribcage-gen,tedbreen/ribcage-gen,cstumph/ribcage-gen
--- +++ @@ -1,7 +1,15 @@ import React, {PropTypes, Component} from 'react' +import {addons} from 'react/addons' +const {shouldComponentUpdate} = addons.PureRenderMixin const namespace = '{{camelName}}' export default class {{PascalName}} extends Component { + // use the pure-render mixin without the mixin. This...
598dd90c5b4f9bcd927c4c535d6f23ed66717f60
app/scripts/components/Editor/FontSize.jsx
app/scripts/components/Editor/FontSize.jsx
import React from 'react' export default class FontSize extends React.Component { render() { <div className="font-size"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600" enable-background="new 0 0 800 600"> <g> <rect x="316" y="240" width="24" height="96...
import React from 'react' export default class FontSize extends React.Component { render() { return ( <div className="font-size"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600" enable-background="new 0 0 800 600"> <g> <rect x="316" y="240...
Fix React component render method.
Fix React component render method.
JSX
agpl-3.0
nossas/bonde-client,nossas/bonde-client,nossas/bonde-client
--- +++ @@ -2,24 +2,26 @@ export default class FontSize extends React.Component { render() { - <div className="font-size"> - <svg version="1.1" xmlns="http://www.w3.org/2000/svg" - viewBox="0 0 800 600" enable-background="new 0 0 800 600"> - <g> - <rect x="316" y="240" width="24" ...
9b0789bf58473fe0f8dbd0dc9d54f4ba44ff8894
client/material/icon-button.jsx
client/material/icon-button.jsx
import React from 'react' import classnames from 'classnames' import Button from './button.jsx' import styles from './button.css' // A button that displays just an SVG icon export default class IconButton extends React.Component { static propTypes = { icon: React.PropTypes.element.isRequired, }; render() { ...
import React from 'react' import classnames from 'classnames' import Button from './button.jsx' import styles from './button.css' // A button that displays just an SVG icon export default class IconButton extends React.Component { static propTypes = { icon: React.PropTypes.element.isRequired, }; render() { ...
Fix props being passed to Button's dom element by IconButton.
Fix props being passed to Button's dom element by IconButton.
JSX
mit
ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery
--- +++ @@ -10,10 +10,10 @@ }; render() { - const { className, icon } = this.props + const { className, icon, ...otherProps } = this.props const classes = classnames(styles.iconButton, className) return ( - <Button {...this.props} className={classes} label={icon} /> + <Button {...oth...
f5207cc0ffa63364eb763aab9d60c3c6431a3904
imports/ui/components/sidebar_menu/PanelProfile.jsx
imports/ui/components/sidebar_menu/PanelProfile.jsx
import React from 'react'; import PanelHeader from '../common/PanelHeader.jsx' import Nestable from '../common/Nestable.jsx' import PanelListItem from '../common/PanelListItem.jsx' import ModulesCardContainer from './ModulesCardContainer.js' import ProfileDetailsContainer from './ProfileDetailsContainer.jsx' import Inl...
import React from 'react'; import PanelHeader from '../common/PanelHeader.jsx' import Nestable from '../common/Nestable.jsx' import PanelListItem from '../common/PanelListItem.jsx' import ModulesCardContainer from './ModulesCardContainer.js' import ProfileDetailsContainer from './ProfileDetailsContainer.jsx' import Inl...
FIX check if user is logged in before displaying email address
FIX check if user is logged in before displaying email address
JSX
mit
nus-mtp/nus-oracle,nus-mtp/nus-oracle
--- +++ @@ -21,8 +21,8 @@ <nav className="side-menu-addl"> <PanelHeader title="User Profile" icon="font-icon font-icon-user" /> <ul className="side-menu-addl-list"> - <PanelListItem type="header" text="Tan Seat Chu" isEditable={false}/> - <PanelListItem type="" text={ Mete...
7248a75f480bb43ebaa8083f730af00cfa915003
src/components/Nav.jsx
src/components/Nav.jsx
import React from 'react' import classNames from 'classnames' import { connect } from 'react-redux' import { onClickMenuButton } from '../actions/NavActions' export const Nav = ({ dispatch, isExpanded, menuItems }) => { return ( <nav className="layout-nav"> <ul className={ classNames( 'menu-list',...
import React from 'react' import classNames from 'classnames' import { connect } from 'react-redux' import { onClickMenuButton } from '../actions/NavActions' export const Nav = ({ dispatch, isExpanded, menuItems }) => { return ( <nav className="layout-nav"> <ul className={ classNames( 'menu-list',...
Set default `actived` to `Home` item
Set default `actived` to `Home` item
JSX
mit
nomkhonwaan/nomkhonwaan.github.io
--- +++ @@ -15,7 +15,7 @@ menuItems.map((item, key) => { return ( <li className="menu-item" key={ key }> - <a href={ item.href }> + <a className={ classNames({ 'actived': (item.title === 'Home') }) } href={ item.href }> <i classNa...
03addfe7913127ea80c1ef314a67c1df2f24926e
client/src/containers/App.jsx
client/src/containers/App.jsx
import React, { PureComponent } from 'react'; import { IndexLink } from 'react-router'; import { LinkContainer } from 'react-router-bootstrap'; import Nav from 'react-bootstrap/lib/Nav'; import Navbar from 'react-bootstrap/lib/Navbar'; import NavItem from 'react-bootstrap/lib/NavItem'; import { Socket } from 'phoeni...
import React, { PureComponent } from 'react'; import { IndexLink } from 'react-router'; import { LinkContainer } from 'react-router-bootstrap'; import Nav from 'react-bootstrap/lib/Nav'; import Navbar from 'react-bootstrap/lib/Navbar'; import NavItem from 'react-bootstrap/lib/NavItem'; import { Socket } from 'phoeni...
Use logger for logging websocket communication
Use logger for logging websocket communication
JSX
mit
korczis/microcrawler-webapp,ApolloCrawler/microcrawler-webapp,korczis/microcrawler-webapp,bossek/microcrawler-webapp,ApolloCrawler/microcrawler-webapp,bossek/microcrawler-webapp,korczis/microcrawler-webapp,ApolloCrawler/microcrawler-webapp,bossek/microcrawler-webapp
--- +++ @@ -12,10 +12,12 @@ export default class App extends PureComponent { componentDidMount() { const socket = new Socket('/socket', { - params: { token: window.userToken || null } + params: { token: window.userToken || null }, + logger: (kind, msg, data) => { + console.log(`${kind}:...
2c9d5b837c3b15a1853f4edfb66d4fe7b1cffaa0
src/app/views/preview/PreviewController.jsx
src/app/views/preview/PreviewController.jsx
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Iframe from '../../components/iframe/Iframe'; const propTypes = {}; export class PreviewController extends Component { constructor(props) { super(props); this.state = {}; } render () { return ( ...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import collections from '../../utilities/api-clients/collections'; import notifications from '../../utilities/notifications'; import { updateSelectedPreviewPage, addPreviewCollection, removeSelectedPrev...
Update to fetch colelction data, and handle page changes
Update to fetch colelction data, and handle page changes
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -1,21 +1,58 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import { connect } from 'react-redux'; + +import collections from '../../utilities/api-clients/collections'; +import notifications from '../../utilities/notifications'; +import { updateSelectedPreviewPage, addPr...
5faea22fa10996b541a785693aacd77394c33ed9
src/app/login/LoginForm.jsx
src/app/login/LoginForm.jsx
import React, { Component } from 'react'; import Input from '../components/Input' export default class LoginForm extends Component { constructor(props) { super(props); } render() { const inputs = this.props.formData.inputs; return ( <div className="grid grid--justif...
import React, { Component } from 'react'; import Input from '../components/Input' export default class LoginForm extends Component { constructor(props) { super(props); } render() { const inputs = this.props.formData.inputs; return ( <div className="grid grid--justif...
Reduce width of login form
Reduce width of login form Former-commit-id: a785c93477d60bcd484b689789e532f8b3a6f271 Former-commit-id: 5a1649b0c7a587d5fed9738bafc0433e2218df89 Former-commit-id: dbcaa743a85a4e2f6208e6295ed5d01a0677807e
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -14,7 +14,7 @@ return ( <div className="grid grid--justify-center"> - <div className="grid__col-4"> + <div className="grid__col-3"> <h1>Login</h1> <form className="form" onSubmit={this.props.formData.onSubmit}...
a667feff14a5177fea3c2daeb3e301520eddcbc3
frontend/components/dashboard/Notification.jsx
frontend/components/dashboard/Notification.jsx
import React from 'react' import PropTypes from 'prop-types' import Card from './Card' class Notification extends React.Component { state = { dismissed: this.props.dismissed } componentDidUpdate(prevProps) { if (prevProps.dismissed !== this.props.dismissed) { this.setState({ dismissed: this.props.dismis...
import React from 'react' import PropTypes from 'prop-types' import Card from './Card' class Notification extends React.Component { state = { dismissed: this.props.dismissed } componentDidUpdate(prevProps) { if (prevProps.dismissed !== this.props.dismissed) { this.setState({ dismissed: this.props.dismis...
Fix close button for dismissable notifications
Fix close button for dismissable notifications
JSX
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
--- +++ @@ -20,9 +20,7 @@ </div> { this.props.dismissable && - <button type="button" className="close" onClick={() => { this.setState({ dismissed: true })}} aria-label="Close"> - <span aria-hidden="true">&times;</span> - </button> + <but...
a9e128d4a60ffc4641f4436a4d5f98a77a191683
src/components/note_edit/section_add_bar.jsx
src/components/note_edit/section_add_bar.jsx
"use strict"; var React = require('react') module.exports = React.createClass({ displayName: 'NoteSectionAddBar', render: function () { var handles = require('./section_handles.jsx') return ( <div id="section-add-bar-container"> <div id="citation-edit-bar" style={{ overflow: "auto" }}> ...
"use strict"; var React = require('react') module.exports = React.createClass({ displayName: 'NoteSectionAddBar', getInitialState: function () { return { sticky: false } }, componentDidMount: function () { window.addEventListener('scroll', this.handleScroll); this.handleScroll(); }, componentD...
Make section add bar sticky
Make section add bar sticky
JSX
agpl-3.0
editorsnotes/editorsnotes-renderer
--- +++ @@ -4,12 +4,35 @@ module.exports = React.createClass({ displayName: 'NoteSectionAddBar', + getInitialState: function () { + return { sticky: false } + }, + componentDidMount: function () { + window.addEventListener('scroll', this.handleScroll); + this.handleScroll(); + }, + componentDidUnm...
e2f94aaad5cdc2257893d341edea9e2d118965e9
client/src/views/HomeView/index.jsx
client/src/views/HomeView/index.jsx
import React, { Component } from 'react'; export default class Home extends Component { render() { return ( <div> <h1>home view</h1> </div> ); } }
import React, { Component } from 'react'; import CustomizationWidget from '../../components/CustomizationWidget'; export default class HomeView extends Component { render() { return ( <div> <h1>home view</h1> <CustomizationWidget /> </div> ); } }
Use CustomizationWidget inside of HomeView
Use CustomizationWidget inside of HomeView
JSX
mit
marlonbernardes/coding-stickers,marlonbernardes/coding-stickers
--- +++ @@ -1,11 +1,13 @@ import React, { Component } from 'react'; +import CustomizationWidget from '../../components/CustomizationWidget'; -export default class Home extends Component { +export default class HomeView extends Component { render() { return ( <div> <h1>home view</h1> + ...
b6d4384a3f3d49079c0c372fcccd67366111f75f
src/components/Experience.jsx
src/components/Experience.jsx
import classNames from 'classnames'; import moment from 'moment'; import PropTypes from 'prop-types'; import React from 'react'; import Company from '../Company'; import bulma from '../bulma.scss'; function formatDate(date) { return moment(date).format('MMM YYYY'); } export default class Experience extends React.Com...
import classNames from 'classnames'; import moment from 'moment'; import PropTypes from 'prop-types'; import React from 'react'; import Company from '../Company'; import bulma from '../bulma.scss'; function formatDate(date) { return moment(date).format('MMM YYYY'); } export default class Experience extends React.Com...
Fix up some PropType errors
Fix up some PropType errors
JSX
mit
VoxelDavid/voxeldavid-website,VoxelDavid/voxeldavid-website,vocksel/my-website,vocksel/my-website
--- +++ @@ -16,14 +16,15 @@ endDate: PropTypes.instanceOf(Date), wasInHouse: PropTypes.bool.isRequired, job: PropTypes.string.isRequired, - url: PropTypes.string.isRequired, company: PropTypes.instanceOf(Company).isRequired, - description: PropTypes.string.isRequired, + description: PropTypes.on...
bb67ab59c21189431b2ca8685c7329bd6cc489ba
src/client/components/Logo/Logo.jsx
src/client/components/Logo/Logo.jsx
import React, { Component } from "react"; import classNames from 'classnames'; import Velocity from 'velocity-animate'; class Logo extends Component { constructor(props) { super(props); this.displayName = 'Logo'; this.scrollUp = this.scrollUp.bind(this) } render() { const ...
import React, { Component } from "react"; import classNames from 'classnames'; import Velocity from 'velocity-animate'; class Logo extends Component { constructor(props) { super(props); this.displayName = 'Logo'; this.scrollUp = this.scrollUp.bind(this) } render() { const ...
Remove status message from logo
Remove status message from logo
JSX
mit
AdamSalma/Lurka,AdamSalma/Lurka
--- +++ @@ -11,23 +11,17 @@ } render() { - const { isFullsize, loadingMessage } = this.props; + const { isFullsize, statusMessage } = this.props; const logoClasses = classNames("logo", {"logo-fullsize": isFullsize}); - const statusClasses = classNames("status", { - ...
92634c70da31701e4af08dd149ba267af6162e84
src/components/Text.jsx
src/components/Text.jsx
import React from "react"; import ReactCSS from "reactcss"; export default class Text extends ReactCSS.Component { displayName = "Text"; static propTypes = { children: React.PropTypes.node, color: React.PropTypes.string, fontSize: React.PropTypes.number }; classes () { return { "default...
import React from "react"; import ReactCSS from "reactcss"; export default class Text extends ReactCSS.Component { displayName = "Text"; static propTypes = { children: React.PropTypes.node, color: React.PropTypes.string, fontSize: React.PropTypes.number }; classes () { return { "default...
Rename style for text span
Rename style for text span
JSX
mit
signal/sprinkles-ui,signal/sprinkles-ui
--- +++ @@ -13,17 +13,17 @@ classes () { return { "default": { - span: { + Text: { fontSize: 12 } }, "color": { - span: { + Text: { color: this.props.color } }, "fontSize": { - span: { + Text: ...
19afaad06ca29b2bd9aeb632a789711ab0e5c053
src/SidebarMenuHeader.jsx
src/SidebarMenuHeader.jsx
import React from 'react'; const propTypes = { title: React.PropTypes.string, }; const SidebarMenuHeader = ({ title }) => ( <li className="header"> {title} </li> ); SidebarMenuHeader.propTypes = propTypes; export default SidebarMenuHeader;
import React from 'react'; import classNames from 'classnames'; const propTypes = { children: React.PropTypes.node, className: React.PropTypes.string, }; const SidebarMenuHeader = ({ children, className, }) => { const classes = { header: true, }; return ( <li className={classNames(className, cl...
Remove title prop in favor of children
Remove title prop in favor of children
JSX
mit
react-admin-lte/react-admin-lte,react-admin-lte/react-admin-lte,jonmpqts/reactjs-admin-lte
--- +++ @@ -1,14 +1,25 @@ import React from 'react'; +import classNames from 'classnames'; const propTypes = { - title: React.PropTypes.string, + children: React.PropTypes.node, + className: React.PropTypes.string, }; -const SidebarMenuHeader = ({ title }) => ( - <li className="header"> - {title} - </l...
d0f7537137a2360ba494c0c902b1f35fd636b9cd
src/client/components/Logo/Logo.jsx
src/client/components/Logo/Logo.jsx
import React, { Component } from "react"; import classNames from 'classnames'; import Velocity from 'velocity-animate'; class Logo extends Component { constructor(props) { super(props); this.displayName = 'Logo'; } componentDidMount() { this.triggerLogoDropdownAnimation(this.r...
import React, { Component } from "react"; import classNames from 'classnames'; import Velocity from 'velocity-animate'; class Logo extends Component { constructor(props) { super(props); this.displayName = 'Logo'; this.onHeaderExpand = this.onHeaderExpand.bind(this) } component...
Fix logo click expanding when on main page
Fix logo click expanding when on main page
JSX
mit
AdamSalma/Lurka,AdamSalma/Lurka
--- +++ @@ -7,6 +7,7 @@ constructor(props) { super(props); this.displayName = 'Logo'; + this.onHeaderExpand = this.onHeaderExpand.bind(this) } componentDidMount() { @@ -14,17 +15,24 @@ } render() { - const { isFullsize, loadingText, expandHeader} = this.pr...
5ddcc0e9557fe2e27867a4f642f5c1cd93487f19
client/src/components/Event/EventDetails.jsx
client/src/components/Event/EventDetails.jsx
import React from 'react'; import ReactDOM from 'react-dom'; class EventDetails extends React.Component { constructor(props) { super(props); this.state = {} } componentWillMount() { } render () { return ( <div> <h1> {this.props.eventTitle} </h1> <h3> {this.props.eventDate...
import React from 'react'; import ReactDOM from 'react-dom'; class EventDetails extends React.Component { constructor(props) { super(props); this.state = {} } render () { const days = { 0: 'Sunday', 1: 'Monday', 2: 'Tuesday', 3: 'Wednesday', 4: 'Thursday', 5: 'Fri...
Refactor date in event label
Refactor date in event label
JSX
mit
Teertoday/teer
--- +++ @@ -7,15 +7,36 @@ this.state = {} } - componentWillMount() { + render () { + const days = { + 0: 'Sunday', + 1: 'Monday', + 2: 'Tuesday', + 3: 'Wednesday', + 4: 'Thursday', + 5: 'Friday', + 6: 'Saturday', + }; + const months = { + 0: 'January', + ...
16564ce7c114265ac88b9254529bb4411818dc83
app/assets/javascripts/components/LayoutComponents/Sidebar.js.jsx
app/assets/javascripts/components/LayoutComponents/Sidebar.js.jsx
var Sidebar = React.createClass({ render: function(){ return ( <div id="m_menu" className="ui floating sidebar vertical menu inverted"> <a href="/issues/new" className="item m_item"> <i className="plus icon"></i> Submit an Issue </a> <a href="/dashboard" className="item m_it...
var Sidebar = React.createClass({ render: function(){ return ( <div id="m_menu" className="ui floating sidebar vertical menu inverted"> <a href="/issues/new" className="item m_item"> <i className="plus icon"></i> Submit an Issue </a> <a href="/dashboard" className="item m_it...
Fix bug on the sidebar logout bug
Fix bug on the sidebar logout bug
JSX
mit
TimCannady/fixstarter,ShadyLogic/fixstarter,TimCannady/fixstarter,ShadyLogic/fixstarter,TimCannady/fixstarter,ShadyLogic/fixstarter
--- +++ @@ -28,7 +28,7 @@ About Us </a> - <a href="/users/sign_out" className="item m_item"> + <a href="/users/sign_out" data-method="delete" className="item m_item"> <i className="sign out icon"></i> Logout </a>
1305c813759af89087223961643dc987f33991aa
app/scripts/components/home/home.jsx
app/scripts/components/home/home.jsx
import React from 'react'; import { Link } from 'react-router-dom'; import Countdown from './countdown.jsx'; import State from './state.jsx'; import Quote from './quote.jsx'; export default function Home() { return ( <> <div className="wrapper text"> <h2 className="home-title c...
import React from 'react'; import { Link } from 'react-router-dom'; import Countdown from './countdown.jsx'; import State from './state.jsx'; import Quote from './quote.jsx'; export default function Home() { return ( <> <div className="wrapper text"> <h2 className="home-title c...
Add margin under welcome text
Add margin under welcome text
JSX
mit
benct/tomlin-web,benct/tomlin-web
--- +++ @@ -9,7 +9,7 @@ return ( <> <div className="wrapper text"> - <h2 className="home-title color-primary">Welcome</h2> + <h2 className="home-title color-primary mbm">Welcome</h2> This site was developed a while back using React, for the pur...
adba2cb7b7bbc8fa7341a01419f7fc808b272da6
src/js/components/next-up/index.jsx
src/js/components/next-up/index.jsx
import debug from "debug"; import React, { Component } from "react"; import Session from "../session"; const log = debug("schedule:components:next-up"); export class NextUp extends Component { render() { const { getState } = this.props; const { days, time: { today, now } } = getState(); l...
import debug from "debug"; import React, { Component } from "react"; import Session from "../session"; const log = debug("schedule:components:next-up"); export class NextUp extends Component { render() { const { getState } = this.props; const { days, time: { today, now } } = getState(); l...
Fix sort upcoming on start time
Fix sort upcoming on start time
JSX
mit
nikcorg/schedule,orangecms/schedule,orangecms/schedule,nikcorg/schedule,orangecms/schedule,nikcorg/schedule
--- +++ @@ -15,8 +15,11 @@ let nextSessions = tracks.map(t => { return { ...t, - next: t.sessions.filter(s => now <= s.start).shift() + sessions: [t.sessions.filter(s => now <= s.start).shift()] }; + }). + sort((a, b) => {...
a5ee1ea5d2fa3a6eb54a45b505adfc7ca25494f9
src/pages/home.jsx
src/pages/home.jsx
import React from 'react'; import Header from '../components/header.jsx'; export default class Home extends React.Component { constructor(props) { super(props); this.onClickButton = this.onClickButton.bind(this); this.state = { name: props.name, counter: 0 }; } onClickButton () { ...
import React from 'react'; import Header from '../components/header.jsx'; export default class Home extends React.Component { constructor(props) { super(props); this.onClickButton = this.onClickButton.bind(this); this.state = { name: props.name, counter: 0 }; } onClickButton () { ...
Set state in HTML body instead of head
Set state in HTML body instead of head
JSX
mit
Juan1ll0/es6-react-server-side-render,Juan1ll0/es6-react-server-side-render
--- +++ @@ -22,11 +22,6 @@ <html> <head> <title>Example of isomorphic App in ES6.</title> - { - React.DOM.script({dangerouslySetInnerHTML: { - __html: 'var APP_PROPS = ' + JSON.stringify(this.state) + ';' - }}) - ...
21b44ac9f00d58c07a0134448bf7defd6b58f90b
React-Weather/app/components/Nav.jsx
React-Weather/app/components/Nav.jsx
var React = require('react'); var {Link} = require('react-router'); var Nav = React.createClass({ render: function () { return ( <div> <h2>Nav Component</h2> <Link to="/">Get Weather</Link> <Link to="/about">About</Link> <Link to="/examples">Examples</Link> </di...
var React = require('react'); var {Link, IndexLink} = require('react-router'); var Nav = React.createClass({ render: function () { return ( <div> <h2>Nav Component</h2> <IndexLink to="/" activeClassName="active" activeStyle={{fontWeight: 'bold'}}>Get Weather</IndexLink> <Link t...
Add active class to active link.
Add active class to active link. Fix active setting with IndexLink
JSX
mit
JulianNicholls/Complete-React-Web-App,JulianNicholls/Complete-React-Web-App
--- +++ @@ -1,15 +1,15 @@ var React = require('react'); -var {Link} = require('react-router'); +var {Link, IndexLink} = require('react-router'); var Nav = React.createClass({ render: function () { return ( <div> <h2>Nav Component</h2> - <Link to="/">Get Weather</Link> - ...
f8aff4672f97934689e99f35a9ba3f9bbcc39fd6
installer/frontend/components/reset-button.jsx
installer/frontend/components/reset-button.jsx
import React from 'react'; export const ResetButton = () => <button onClick={() => { // eslint-disable-next-line no-alert (window.config.devMode || window.confirm('Do you really want to start over?')) && window.reset(); }} className="btn btn-link"> Start Over </button>;
import React from 'react'; export const ResetButton = () => <button onClick={() => { // eslint-disable-next-line no-alert (window.config.devMode || window.confirm('Do you really want to start over?')) && window.reset(); }} className="btn btn-link"> <i className="fa fa-refresh"></i>&nbsp;&nbsp;Start Over </butto...
Add refresh icon to "start over" link.
frontend: Add refresh icon to "start over" link.
JSX
apache-2.0
yifan-gu/tectonic-installer,estroz/tectonic-installer,rithujohn191/tectonic-installer,metral/tectonic-installer,kans/tectonic-installer,hhoover/tectonic-installer,joshix/tectonic-installer,rithujohn191/tectonic-installer,ggreer/tectonic-installer,cpanato/tectonic-installer,everett-toews/tectonic-installer,colemickens/t...
--- +++ @@ -4,5 +4,5 @@ // eslint-disable-next-line no-alert (window.config.devMode || window.confirm('Do you really want to start over?')) && window.reset(); }} className="btn btn-link"> - Start Over + <i className="fa fa-refresh"></i>&nbsp;&nbsp;Start Over </button>;
d8d4cec87a1dd3f3e0edc25a80bf63f74c7a4c15
app/assets/javascripts/components/Stock.es6.jsx
app/assets/javascripts/components/Stock.es6.jsx
class Stock extends React.Component { constructor() { super() } render() { return( <li> <h2>{this.props.symbol}</h2> <h3>{this.props.name}</h3> <span>{this.props.change} | </span> <span>{this.props.high} | </span> <span>{this.props.low} | </span> <sp...
class Stock extends React.Component { constructor() { super() } render() { let showStock='stocks/'+ this.props.symbol return( <li> <h2>{this.props.symbol}</h2> <span><h3>{this.props.name}</h3></span> <span>{this.props.change} | </span> <span>{this.props.high} | ...
Add link to page to buy shares
Add link to page to buy shares
JSX
mit
nyc-otters-2017/MapYourStocks,nyc-otters-2017/MapYourStocks,nyc-otters-2017/MapYourStocks
--- +++ @@ -5,16 +5,16 @@ render() { + let showStock='stocks/'+ this.props.symbol return( <li> <h2>{this.props.symbol}</h2> - <h3>{this.props.name}</h3> + <span><h3>{this.props.name}</h3></span> <span>{this.props.change} | </span> <span>{this.props.high} ...
89a3a73ed692c459ce3c593e92e5a86cf71d8999
client/app/bundles/HelloWorld/containers/__tests__/LandingPageContainer.test.jsx
client/app/bundles/HelloWorld/containers/__tests__/LandingPageContainer.test.jsx
import React from 'react'; import { shallow } from 'enzyme'; import LandingPageContainer from '../LandingPageContainer.jsx'; import $ from 'jquery' import LandingPage from '../../components/progress_reports/landing_page.jsx' import LoadingIndicator from '../../components/shared/loading_indicator.jsx' jest.mock('jque...
import React from 'react'; import { shallow } from 'enzyme'; import LandingPageContainer from '../LandingPageContainer.jsx'; import $ from 'jquery' import LandingPage from '../../components/progress_reports/landing_page.jsx' import LoadingIndicator from '../../components/shared/loading_indicator.jsx' // This is a mo...
Fix a Jest suite for LandingPageContainer
Fix a Jest suite for LandingPageContainer
JSX
agpl-3.0
empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core
--- +++ @@ -7,6 +7,9 @@ import LandingPage from '../../components/progress_reports/landing_page.jsx' import LoadingIndicator from '../../components/shared/loading_indicator.jsx' +// This is a mock. We want to simulate a flag we set elsewhere. +document.getElementById = () => { return { getAttribute: () => 'beta' ...
fab7e2e67a5591c298db7a0290cc5dc16999a8dc
app/assets/javascripts/lesson_planner/unit_templates_manager/unit_template_profile/unit_template_profile_assign_button.jsx
app/assets/javascripts/lesson_planner/unit_templates_manager/unit_template_profile/unit_template_profile_assign_button.jsx
EC.UnitTemplateProfileAssignButton = React.createClass({ propTypes: { data: React.PropTypes.object.isRequired, actions: React.PropTypes.object.isRequired }, propsSpecificComponent: function () { if (this.props.data.non_authenticated) { return <button className='button-green full-width' onClick=...
EC.UnitTemplateProfileAssignButton = React.createClass({ propTypes: { data: React.PropTypes.object.isRequired, actions: React.PropTypes.object.isRequired }, propsSpecificComponent: function () { if (this.props.data.non_authenticated) { return <button className='button-green full-width' onClick=...
Change the copy on the assign all button.
Change the copy on the assign all button.
JSX
agpl-3.0
empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core
--- +++ @@ -11,8 +11,8 @@ return <button className='button-green full-width' onClick={this.props.actions.clickAssignButton}>Assign to Your Class</button> } else { return (<span> - <button className='button-green full-width' onClick={this.props.actions.fastAssign}>Assign to everyone, with no ...
7ae4280d266fa551b6f7003d3790f709b7cdc0aa
app/components/pages/Resume.jsx
app/components/pages/Resume.jsx
import React from 'react'; import HeaderSection from '../organisms/HeaderSection'; export default React.createClass({ render() { return ( <div> <HeaderSection/> (Resumé page) </div> ); }, });
import React from 'react'; import HeaderSection from '../organisms/HeaderSection'; export default React.createClass({ render() { return ( <div> <HeaderSection/> Coming soon... </div> ); }, });
Change resumé page to show "Coming soon..."
Change resumé page to show "Coming soon..."
JSX
mit
amcsi/szeremi,amcsi/szeremi
--- +++ @@ -7,7 +7,8 @@ return ( <div> <HeaderSection/> - (Resumé page) + + Coming soon... </div> ); },
9c38ddcc626e9f6ffe0cdba44d74e2fb212bf325
client/src/index.jsx
client/src/index.jsx
import 'aframe'; import 'babel-polyfill'; import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, browserHistory } from 'react-router'; import App from './components/App.js'; import Home from './components/Home.js'; ReactDOM.render(( <Router history={browserHistory}> <Route path="/"...
import 'aframe'; import 'babel-polyfill'; import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, browserHistory } from 'react-router'; import App from './components/App.js'; import Home from './components/Home.js'; import Main from './components/Main.js'; ReactDOM.render(( <Router hist...
Add new route for main component
Add new route for main component
JSX
mit
francoabaroa/happi,francoabaroa/happi
--- +++ @@ -6,10 +6,13 @@ import App from './components/App.js'; import Home from './components/Home.js'; +import Main from './components/Main.js'; ReactDOM.render(( <Router history={browserHistory}> <Route path="/" component={App} > </Route> + <Route path="/main" component={Main} > + </Rout...
a853a4602a9f4e29751edb293288f0c1cfb48c89
app/react/components/profile-card/profile-card.jsx
app/react/components/profile-card/profile-card.jsx
import React from 'react'; var profileCard = React.createClass({ propTypes: { name: React.PropTypes.string.isRequired, title: React.PropTypes.string, links: React.PropTypes.array, image: React.PropTypes.string }, getDefaultProps() { return { name: ``, title: ``, image: `/ass...
import React from 'react'; export default class ProfileCard extends React.Component { render() { return ( <div className="profile-card row flex-items-xs-center" id={this.props.name.replace(/\W/g, `-`)}> <div className="col-xs-6 col-xs-push-3 col-sm-3 col-sm-push-0 col-xl-2"> <div classN...
Make changes for es6 migrations
ProfileCard: Make changes for es6 migrations See #613
JSX
mpl-2.0
mozilla/science.mozilla.org,mozilla/science.mozilla.org
--- +++ @@ -1,21 +1,9 @@ import React from 'react'; -var profileCard = React.createClass({ - propTypes: { - name: React.PropTypes.string.isRequired, - title: React.PropTypes.string, - links: React.PropTypes.array, - image: React.PropTypes.string - }, - getDefaultProps() { - return { - name: ...
a60f2221f04fd46de36bd7a8397deb54e66940a3
app/scripts/views/about.jsx
app/scripts/views/about.jsx
import React from 'react'; export default function About() { return ( <div className="text">There's really not that much interesting here...<br/>This site is developed using <a href="https://facebook.github.io/react/" target="_blank">React</a> in conjunction with <a href="https://webpack.github.io/" target...
import React from 'react'; export default function About() { return ( <div className="text"> There's really not that much interesting here...<br/>This site is developed using <a href="https://facebook.github.io/react/" target="_blank">React</a> in conjunction with <a hre...
Add copyright notice and refactor text slightly
Add copyright notice and refactor text slightly
JSX
mit
benct/tomlin-web,benct/tomlin-web
--- +++ @@ -2,6 +2,13 @@ export default function About() { return ( - <div className="text">There's really not that much interesting here...<br/>This site is developed using <a href="https://facebook.github.io/react/" target="_blank">React</a> in conjunction with <a href="https://webpack.github.io/" ta...
0733a5dde44e5b0c87ae2d65a6afe2eacfa848be
src/views/preview/extension-chip.jsx
src/views/preview/extension-chip.jsx
const classNames = require('classnames'); const React = require('react'); const PropTypes = require('prop-types'); require('./extension-chip.scss'); const ExtensionChip = props => ( <div className={classNames('extension-chip', {'has-status': props.hasStatus})}> <img className="extension-title" ...
const classNames = require('classnames'); const React = require('react'); const PropTypes = require('prop-types'); require('./extension-chip.scss'); const ExtensionChip = props => ( <div className={classNames('extension-chip', {'has-status': props.hasStatus})}> <img className="extension-icon" ...
Fix class name for extension icon
Fix class name for extension icon
JSX
bsd-3-clause
LLK/scratch-www,LLK/scratch-www
--- +++ @@ -6,7 +6,7 @@ const ExtensionChip = props => ( <div className={classNames('extension-chip', {'has-status': props.hasStatus})}> <img - className="extension-title" + className="extension-icon" src={props.iconSrc} /> <div className="extension-...
47e53a6590391642be7dfef266771f096971c6d8
client/app/js/task_card.jsx
client/app/js/task_card.jsx
import React from 'react'; import ReactDOM from 'react-dom'; import {Card, CardTitle, CardText} from 'material-ui/Card'; export default class Column extends React.Component { constructor(props) { super(props); this.state={}; } render () { return <Card className="task"> <CardTitle title={this.p...
import React from 'react'; import ReactDOM from 'react-dom'; import {Card, CardTitle, CardActions, CardText} from 'material-ui/Card'; import IconButton from 'material-ui/IconButton'; import EditIcon from 'material-ui/svg-icons/editor/mode-edit'; import PrevIcon from 'material-ui/svg-icons/navigation/chevron-left'; impo...
Add edit and nav buttons on task card
Add edit and nav buttons on task card
JSX
mit
mafigit/Komorebi,mafigit/Komorebi,mafigit/Komorebi,mbbh/Komorebi,kmerz/Komorebi,kmerz/Komorebi,mbbh/Komorebi,mbbh/Komorebi,kmerz/Komorebi,mafigit/Komorebi,mbbh/Komorebi,kmerz/Komorebi
--- +++ @@ -1,6 +1,23 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import {Card, CardTitle, CardText} from 'material-ui/Card'; +import {Card, CardTitle, CardActions, CardText} from 'material-ui/Card'; +import IconButton from 'material-ui/IconButton'; +import EditIcon from 'material-ui/svg-icons/...
961dcc0bd1b2a434439a98bba7e2ab6175c9951f
index.jsx
index.jsx
'use strict' let ReactDOM = require('react-dom'); let React = require('react'); let FlightTable = require('./flight-table'); let data = [ { icao: "471f7f", flight: "WZZ7HP", squawk: "6212", altitude: "3200", speed: "175", distance: "11.6", track: "48", ...
'use strict' let wsUrl = 'ws://192.168.0.12:8888'; let webSocket = new WebSocket(wsUrl, ['binary', 'base64']); let translateMessage = message => { return { icao: message.hex_ident, flight: message.callsign, squawk: message.squawk, altitude: message.altitude, speed: message...
Implement a prototype loading data from websocket and rendering it in a table
Implement a prototype loading data from websocket and rendering it in a table
JSX
mit
Mchl/dump1090-react-client,Mchl/dump1090-react-client
--- +++ @@ -1,36 +1,44 @@ 'use strict' + +let wsUrl = 'ws://192.168.0.12:8888'; + +let webSocket = new WebSocket(wsUrl, ['binary', 'base64']); + +let translateMessage = message => { + return { + icao: message.hex_ident, + flight: message.callsign, + squawk: message.squawk, + altitude: ...
a19b2efc9d418557892c3bb018a4d7b11230cb72
docs/src/Demo/Examples/BasicUsage.jsx
docs/src/Demo/Examples/BasicUsage.jsx
import React, { Fragment, Component } from 'react'; import moment from 'moment'; import { Typography } from 'material-ui'; import { TimePicker, DatePicker } from 'material-ui-pickers'; export default class BasicUsage extends Component { state = { selectedDate: moment(), } handleDateChange = (date) => { ...
import React, { Fragment, Component } from 'react'; import moment from 'moment'; import { Typography } from 'material-ui'; import { TimePicker, DatePicker } from 'material-ui-pickers'; export default class BasicUsage extends Component { state = { selectedDate: moment(), } handleDateChange = (date) => { ...
Add label to date picker in basic usage
Add label to date picker in basic usage
JSX
mit
mbrookes/material-ui,rscnt/material-ui,callemall/material-ui,oliviertassinari/material-ui,mui-org/material-ui,dmtrKovalenko/material-ui-pickers,callemall/material-ui,mui-org/material-ui,mbrookes/material-ui,rscnt/material-ui,mui-org/material-ui,callemall/material-ui,mbrookes/material-ui,oliviertassinari/material-ui,cal...
--- +++ @@ -25,6 +25,8 @@ <DatePicker keyboard clearable + label="Choose a date" + helperText="Possible manual entry via keyboard" maxDateMessage="Date must be less than today" value={selectedDate} onChange={this.handleD...