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
be3514cf63d5aeb734eee71f3d11aa59b8a26101
src/components/Main.jsx
src/components/Main.jsx
import React from 'react'; import { Switch, Route } from 'react-router-dom'; import NewSnippet from './NewSnippet'; import RecentSnippets from './RecentSnippets'; import Snippet from './Snippet'; import About from './About'; import SignIn from './SignIn'; import '../styles/Main.styl'; const Main = () => ( <main cl...
import React from 'react'; import { Switch, Route } from 'react-router-dom'; import NewSnippet from './NewSnippet'; import RecentSnippets from './RecentSnippets'; import Snippet from './Snippet'; import About from './About'; import SignIn from './SignIn'; import '../styles/Main.styl'; const Main = () => ( <main cl...
Use exact routes to pages
Use exact routes to pages By default, react route matches a URI (let's say) greedy which means the following route: <Route path="/about" ... /> will match the following URIs: /about /about/ /about/foo /about/foo/bar Well, that's not what would we expect. That's why we want to set 'exact' option on routes, so ...
JSX
mit
xsnippet/xsnippet-web,xsnippet/xsnippet-web
--- +++ @@ -13,10 +13,10 @@ <main className="main"> <Switch> <Route exact path="/" component={NewSnippet} /> - <Route path="/recent" component={RecentSnippets} /> - <Route path="/about" component={About} /> - <Route path="/sign-in" component={SignIn} /> - <Route path="/:id" componen...
545b21ce3de1c50aac0d3c4f2b47b3f38e38e1d0
client/js/app/src/app/pages/querybuilder/query-derived/query-derived.jsx
client/js/app/src/app/pages/querybuilder/query-derived/query-derived.jsx
import React from 'react'; import { Badge, Group, JsonInput, Stack, Button } from '@mantine/core'; import { useQueryBuilderContext } from 'app/pages/querybuilder/context/query-builder-provider'; import { Icon } from 'app/components'; export function QueryDerived() { const query = useQueryBuilderContext((ctx) => ctx....
import React from 'react'; import { Badge, Group, JsonInput, Stack, Button, CopyButton, } from '@mantine/core'; import { useQueryBuilderContext } from 'app/pages/querybuilder/context/query-builder-provider'; import { Icon } from 'app/components'; export function QueryDerived() { const query = useQueryBui...
Add copy button to Query
Add copy button to Query
JSX
apache-2.0
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
--- +++ @@ -1,5 +1,12 @@ import React from 'react'; -import { Badge, Group, JsonInput, Stack, Button } from '@mantine/core'; +import { + Badge, + Group, + JsonInput, + Stack, + Button, + CopyButton, +} from '@mantine/core'; import { useQueryBuilderContext } from 'app/pages/querybuilder/context/query-builder-p...
6e4a3543d933beb7a94ad6d318c997953059d159
client/javascript/components/EditorOverlay.jsx
client/javascript/components/EditorOverlay.jsx
import React from 'react'; import { DOC_INITIAL, DOC_OPENING, DOC_FAILED } from './SyncedEditor'; function EditorOverlay(state) { let overlay; switch (state) { case DOC_INITIAL: overlay = (<div className="overlay" />); break; case DOC_OPENING: overlay = ( <div className="overlay">...
import React from 'react'; import { DOC_INITIAL, DOC_OPENING, DOC_FAILED } from './SyncedEditor'; function EditorOverlay(props) { let overlay; switch (props.state) { case DOC_INITIAL: overlay = (<div className="overlay" />); break; case DOC_OPENING: overlay = ( <div className="ove...
Fix incorrect argument of function component
Fix incorrect argument of function component
JSX
bsd-3-clause
zesik/insnota,zesik/insnota
--- +++ @@ -1,9 +1,9 @@ import React from 'react'; import { DOC_INITIAL, DOC_OPENING, DOC_FAILED } from './SyncedEditor'; -function EditorOverlay(state) { +function EditorOverlay(props) { let overlay; - switch (state) { + switch (props.state) { case DOC_INITIAL: overlay = (<div className="overlay...
92d375e7fdb589789783aa64c807c8e1879e1046
app/components/month.jsx
app/components/month.jsx
import '../styles/month' import React, { Component, PropTypes } from 'react' import { Map } from 'immutable' import moment from 'moment' import range from 'lodash/utility/range' import Day from './day' export default class Month extends Component { static propTypes = { date: PropTypes.any.isRequired, even...
import '../styles/month' import React, { Component, PropTypes } from 'react' import { Map } from 'immutable' import moment from 'moment' import range from 'lodash/utility/range' import Day from './day' export default class Month extends Component { static propTypes = { date: PropTypes.any.isRequired, even...
Add key to Day components
Add key to Day components
JSX
mit
lmtm/bc-planner,byteclubfr/bc-planner,lmtm/bc-planner,byteclubfr/bc-planner
--- +++ @@ -29,9 +29,9 @@ <div className="month"> <header className="month-title">{date.format('MMMM YYYY')}</header> - {daysInMonth.map(day => ( - <Day date={moment(date).date(day + 1)} events={events} /> - ))} + {daysInMonth.map(day => moment(date).date(day + 1)).map(...
ebb0d3f5d116f81bdbaf7647765ed787b49ff677
imports/ui/builder/element-name.jsx
imports/ui/builder/element-name.jsx
import React from 'react'; import Elements from '../../api/elements.js'; export default class ElementName extends React.Component { constructor(props) { super(props); this.state = { editing: false, }; } editName() { this.setState({ editing: true }, () => { this.refs.nameInput.focus()...
import React from 'react'; import Elements from '../../api/elements.js'; export default class ElementName extends React.Component { constructor(props) { super(props); this.state = { editing: false, }; this.setName = this.setName.bind(this); this.editName = this.editName.bind(this); } s...
Add placeholder if name is not specified and enforce coding style
Add placeholder if name is not specified and enforce coding style
JSX
mit
minden/data-furnace,minden/data-furnace
--- +++ @@ -7,6 +7,13 @@ this.state = { editing: false, }; + this.setName = this.setName.bind(this); + this.editName = this.editName.bind(this); + } + + setName() { + Elements.setName(this.props.elementId, this.refs.nameInput.value); + this.setState({ editing: false }); } editNa...
bafb698e210a0f78e522dbc2599aac719f2e7ddc
kanban_app/app/components/Notes.jsx
kanban_app/app/components/Notes.jsx
import React from 'react'; import Editable from './Editable.jsx'; import Note from './Note.jsx'; export default class Notes extends React.Component { constructor(props) { super(props); this.renderNote = this.renderNote.bind(this); } render() { const notes = this.props.items; return <ul classNam...
import React from 'react'; import Editable from './Editable.jsx'; import Note from './Note.jsx'; export default class Notes extends React.Component { constructor(props) { super(props); this.renderNote = this.renderNote.bind(this); } render() { // XXX const notes = this.props.items || []; re...
Check against possibly missing notes
Check against possibly missing notes Ideally this would be on proptype level but this will do for now. I'll get rid of this check later.
JSX
mit
deden/redux-demo,Live4Code/react-codemirror,survivejs-demos/redux-demo,survivejs/redux-demo
--- +++ @@ -9,7 +9,8 @@ this.renderNote = this.renderNote.bind(this); } render() { - const notes = this.props.items; + // XXX + const notes = this.props.items || []; return <ul className='notes'>{notes.map(this.renderNote)}</ul>; }
68670d8b0a791a5ae807b8a222ba342c4b0f08d3
client/components/game/home/MainHeaderBar.jsx
client/components/game/home/MainHeaderBar.jsx
import React from 'react'; export default React.createClass({ render() { return ( <div> <div style={{display: "inline-block", marginRight: "30px"}}> Capital: {this.props.capital} </div> <div style={{display: "inline-block", marginRight: "30px"}}> Cash Flow: {this...
import React from 'react'; export default React.createClass({ render() { return ( <div> <div style={{display: 'inline-block', marginRight: '30px'}}> Capital: {this.props.capital} </div> <div style={{display: 'inline-block', marginRight: '30px'}}> Cash Flow: {this...
Replace double quotes with single quotes
Replace double quotes with single quotes
JSX
mit
gios-asu/sustainability-game,gios-asu/dont-get-fired-game,gios-asu/dont-get-fired-game,gios-asu/sustainability-game
--- +++ @@ -4,13 +4,13 @@ render() { return ( <div> - <div style={{display: "inline-block", marginRight: "30px"}}> + <div style={{display: 'inline-block', marginRight: '30px'}}> Capital: {this.props.capital} </div> - <div style={{display: "inline-block", marginR...
d33f2b4ffdc752594b7decbf275658e93823aaf8
client/source/components/Recipe/RecipeIngredientsBS.jsx
client/source/components/Recipe/RecipeIngredientsBS.jsx
import React, {Component} from 'react'; import { Grid, Row, Col, Table } from 'react-bootstrap'; // TODO: Confirm ingredient object structure, ensure that key refers to the proper value // TODO: Add headers for the 'Ingredient', 'Quantity', 'Unit' and other fields. export default ({ingredientList}) => { return (...
import React, {Component} from 'react'; import { Grid, Row, Col, Table } from 'react-bootstrap'; // TODO: Confirm ingredient object structure, ensure that key refers to the proper value // TODO: Add headers for the 'Ingredient', 'Quantity', 'Unit' and other fields. class RecipeIngredients extends React.Component { ...
Implement optional render method that displays a given preparation value along with ingredient name.
Implement optional render method that displays a given preparation value along with ingredient name.
JSX
mit
JAC-Labs/SkilletHub,JAC-Labs/SkilletHub
--- +++ @@ -1,35 +1,57 @@ import React, {Component} from 'react'; import { Grid, Row, Col, Table } from 'react-bootstrap'; - // TODO: Confirm ingredient object structure, ensure that key refers to the proper value // TODO: Add headers for the 'Ingredient', 'Quantity', 'Unit' and other fields. -export defaul...
291e91e24b0494ce61c101b68271cfabefeb39a6
app/components/Statements/SpeakerComments.jsx
app/components/Statements/SpeakerComments.jsx
import React from 'react' import { translate } from 'react-i18next' import VerificationsOriginHeader from './VerificationsOriginHeader' import { SpeakerPreview } from '../Speakers/SpeakerPreview' import { CommentsList } from '../Comments/CommentsList' export default translate('videoDebate')(({t, speaker, comments}) ...
import React from 'react' import { translate } from 'react-i18next' import VerificationsOriginHeader from './VerificationsOriginHeader' import { SpeakerPreview } from '../Speakers/SpeakerPreview' import { CommentsList } from '../Comments/CommentsList' export default translate('videoDebate')(({t, speaker, comments}) ...
Fix a crash that was occuring when deleting speaker with self-comments
Fix a crash that was occuring when deleting speaker with self-comments
JSX
agpl-3.0
CaptainFact/captain-fact-frontend,CaptainFact/captain-fact-frontend,CaptainFact/captain-fact-frontend
--- +++ @@ -11,7 +11,7 @@ <div className="self-comments columns is-gapless"> <div className="column is-narrow"> <VerificationsOriginHeader iconName="user" label={t('speaker.one')} /> - <SpeakerPreview speaker={speaker} withoutActions/> + {speaker && <SpeakerPreview speaker={speaker}...
3702462f173208da75f36dd2eefb8d2910e24ee2
app/assets/javascripts/components/upvote.js.jsx
app/assets/javascripts/components/upvote.js.jsx
var Upvote = React.createClass({ propTypes: { game: React.PropTypes.shape({ votes_up: React.PropTypes.number.isRequired }), hasCurrentUserVotedForGame: React.PropTypes.bool.isRequired }, render: function() { var game = this.props.game if (this.props.hasCurrentUserVotedForGame) { ...
var Upvote = React.createClass({ propTypes: { game: React.PropTypes.shape({ votes_up: React.PropTypes.number.isRequired }), hasCurrentUserVotedForGame: React.PropTypes.bool.isRequired }, render: function() { var game = this.props.game if (this.props.hasCurrentUserVotedForGame) { ...
Swap colors on voting module.
Swap colors on voting module. Blue = link, gray = disabled. Got!
JSX
agpl-3.0
asm-products/gamamia,asm-products/gamamia,asm-products/gamamia,asm-products/gamamia
--- +++ @@ -12,14 +12,14 @@ if (this.props.hasCurrentUserVotedForGame) { return ( - <a className="upvote-block -voted block px2 py1" href={game.url + '/unupvote'} data-method="post"> + <a className="upvote-block block px2 py1" href={game.url + '/unupvote'} data-method="post"> <p...
d86051cd0cda28a5d0b59312a4401953cdf7831e
ui/src/components/Footer/Footer.jsx
ui/src/components/Footer/Footer.jsx
import React from 'react'; import { FormattedMessage } from 'react-intl'; import { Icon } from '@blueprintjs/core'; import './Footer.scss'; export default function Footer(props) { const { metadata } = props; return ( <footer id="Footer" className="Footer"> <div className="info"> <FormattedMessa...
import React, { PureComponent } from 'react'; import { FormattedMessage } from 'react-intl'; import './Footer.scss'; export default class Footer extends PureComponent { render() { const { metadata } = this.props; return ( <footer id="Footer" className="Footer"> <div className="info"> ...
Make footer immutable, remove icons
Make footer immutable, remove icons
JSX
mit
alephdata/aleph,alephdata/aleph,alephdata/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,pudo/aleph
--- +++ @@ -1,49 +1,42 @@ -import React from 'react'; +import React, { PureComponent } from 'react'; import { FormattedMessage } from 'react-intl'; -import { Icon } from '@blueprintjs/core'; import './Footer.scss'; -export default function Footer(props) { - const { metadata } = props; - return ( - <foote...
2c65a0c6b11338730b5f922b6ae2732f728c2a9b
src/components/PostCover/PostCover.jsx
src/components/PostCover/PostCover.jsx
import React, { Component } from "react"; import Img from "gatsby-image"; import path from "path"; import "./PostCover.scss"; class PostCover extends Component { render() { const { fileEdges, postNode, coverHeight, coverClassName } = this.props; const post = postNode.frontmatter ? postNode.frontmatter : post...
import React, { Component } from "react"; import Img from "gatsby-image"; import path from "path"; import "./PostCover.scss"; class PostCover extends Component { render() { const { fileEdges, postNode, coverHeight, coverClassName } = this.props; const post = postNode.frontmatter ? postNode.frontmatter : post...
Fix cover images not being loaded due to path changes.
Fix cover images not being loaded due to path changes.
JSX
mit
Vagr9K/gatsby-material-starter,Vagr9K/gatsby-material-starter
--- +++ @@ -12,7 +12,7 @@ if ( fileNode.node.absolutePath.indexOf( - path.join("/static/", post.cover) + path.join("/static/assets/", post.cover) ) !== -1 ) return true;
17d4c4badb74a37ac2cec2fc952ed13976c6472f
example/example/static/example/HelloWorld.jsx
example/example/static/example/HelloWorld.jsx
var React = require('react'); if (typeof window !== 'undefined') { window.React = React; } var HelloWorld = React.createClass({ render: function() { return <span>Hello, {this.props.name}!</span>; } }); module.exports = HelloWorld;
/** * Begin by naming your bridge module the same as the component name * in your `ReactComponent` subclass. * * Then, require React itself. * * When mounting a React component into a Django page using django-react, * the component and its module act as a "bridge" * between rendering of the component on the ser...
Add some explanatory text about "bridge" components
Add some explanatory text about "bridge" components
JSX
mit
HorizonXP/python-react-router,abdelouahabb/python-react,markfinger/python-react,acrispin/python-react,markfinger/python-react,HorizonXP/python-react-router,acrispin/python-react,abdelouahabb/python-react,arceduardvincent/python-react,mic159/react-render,mic159/react-render,arceduardvincent/python-react,HorizonXP/python...
--- +++ @@ -1,11 +1,56 @@ +/** + * Begin by naming your bridge module the same as the component name + * in your `ReactComponent` subclass. + * + * Then, require React itself. + * + * When mounting a React component into a Django page using django-react, + * the component and its module act as a "bridge" + * between ...
33c8ede50fa9b853caec7ef9dafa35d4126db660
imports/ui/components/common/ModalContainer.jsx
imports/ui/components/common/ModalContainer.jsx
import React from 'react' import { Modal } from 'react-bootstrap' /** * Modal window with animations resembling Bootstrap modal windows * Animations for the window are applied once this component is mounted. */ export default class ModalContainer extends React.Component { constructor(props) { super(props); ...
import React from 'react' import { Modal } from 'react-bootstrap' /** * Modal window with animations resembling Bootstrap modal windows * Animations for the window are applied once this component is mounted. */ export default class ModalContainer extends React.Component { constructor(props) { super(props); ...
ADD comments for modal container
ADD comments for modal container
JSX
mit
nus-mtp/nus-oracle,nus-mtp/nus-oracle
--- +++ @@ -13,6 +13,9 @@ } } +/** + * Show component when successfully mounted + */ componentDidMount() { this.setState({ show: true }); }
3224dbeb5b51a8f8ab3ee2f3256267e831bea756
app/assets/javascripts/components/static_map.es6.jsx
app/assets/javascripts/components/static_map.es6.jsx
class StaticMap extends React.Component { componentDidMount() { this.createGmapsIntegration(); } componentDidUpdate() { this.createGmapsIntegration(); } createGmapsIntegration() { GoogleMapsAPI.then((google) => { let centerLocation = { lat : this.props.latitude, lng: this.p...
class StaticMap extends React.Component { componentDidMount() { this.createGmapsIntegration(); } componentDidUpdate() { this.createGmapsIntegration(); } createGmapsIntegration() { GoogleMapsAPI.then((google) => { let centerLocation = { lat : this.props.latitude, lng: this.p...
Fix static map component when onInit is undefined
Fix static map component when onInit is undefined
JSX
agpl-3.0
AjuntamentdeBarcelona/decidim.barcelona-legacy,AjuntamentdeBarcelona/barcelona-participa,AjuntamentdeBarcelona/decidimbcn,AjuntamentdeBarcelona/decidim.barcelona,AjuntamentdeBarcelona/decidim.barcelona-legacy,AjuntamentdeBarcelona/decidim.barcelona-legacy,AjuntamentdeBarcelona/decidimbcn,AjuntamentdeBarcelona/decidim.b...
--- +++ @@ -27,7 +27,9 @@ } ); - this.props.onMapInit(this.map); + if(this.props.onMapInit) { + this.props.onMapInit(this.map); + } } this.map.panTo(centerLocation);
d0379710e24a58a52567783c1b26dc6498ad3428
packages/richtext/src/components/StyleButton.jsx
packages/richtext/src/components/StyleButton.jsx
import React from 'react' import IconButton from 'material-ui/IconButton' import compose from 'recompose/compose' import { injectButtonStyles } from './EditorStyles' const preventDefault = event => event.preventDefault() const wrapPrevent = callback => (event) => { event.preventDefault() callback() } co...
import React from 'react' import IconButton from 'material-ui/IconButton' import compose from 'recompose/compose' import mapProps from 'recompose/mapProps' import { injectButtonStyles } from './EditorStyles' const preventDefault = event => event.preventDefault() const wrapPrevent = callback => (event) => { even...
Refactor DraftEditor to use JSS
Refactor DraftEditor to use JSS
JSX
mit
mindhivenz/packages,mindhivenz/packages
--- +++ @@ -1,6 +1,7 @@ import React from 'react' import IconButton from 'material-ui/IconButton' import compose from 'recompose/compose' +import mapProps from 'recompose/mapProps' import { injectButtonStyles } from './EditorStyles' const preventDefault = event => event.preventDefault() @@ -13,23 +14,15 @@ ...
9da6e3d801c963de0ed4b8b320ea1f6302cd0006
src/Button.jsx
src/Button.jsx
/** * Created by Suhair Zain on 11/6/16. */ import React, {Component} from 'react'; import { COLOR_ACCENT, COLOR_TEXT } from './utils/colors'; const styles = { root: { background: COLOR_ACCENT, borderRadius: 2, MozBorderRadius: 2, WebkitBorderRadius: 2, color: CO...
/** * Created by Suhair Zain on 11/6/16. */ import React, {Component} from 'react'; import { COLOR_ACCENT, COLOR_TEXT } from './utils/colors'; const styles = { root: { borderRadius: 2, MozBorderRadius: 2, WebkitBorderRadius: 2, color: COLOR_TEXT, display: 'flex',...
Fix for disabled style overwrite
Fix for disabled style overwrite
JSX
mit
SuhairZain/google-suggestion-maker,SuhairZain/google-suggestion-maker
--- +++ @@ -11,12 +11,10 @@ const styles = { root: { - background: COLOR_ACCENT, borderRadius: 2, MozBorderRadius: 2, WebkitBorderRadius: 2, color: COLOR_TEXT, - cursor: 'pointer', display: 'flex', justifyContent: 'center', margin: '...
96f34ba90b4d3f3c1d051c5c21e9ef48a357943e
src/swx/fs/github.jsx
src/swx/fs/github.jsx
/* * Pseudo-HTTP github project access. */ import { Base } from './base.jsx' export class Filesystem extends Base { constructor(path, options) { super(path, options) if(options.repo) { this.repo = options.repo } else { throw new Error("[github] repo option requir...
/* * HTTP GitHub project access. */ import { Base } from './base.jsx' export class Filesystem extends Base { constructor(path, options) { super(path, options) if(options.repo) { this.repo = options.repo } else { throw new Error("[github] repo option required") ...
Fix Github file system status code handling
Fix Github file system status code handling
JSX
mit
LivelyKernel/lively4-core,LivelyKernel/lively4-core
--- +++ @@ -1,5 +1,5 @@ /* - * Pseudo-HTTP github project access. + * HTTP GitHub project access. */ import { Base } from './base.jsx' @@ -17,7 +17,13 @@ read(path) { return self.fetch('https://api.github.com/repos/' + this.repo + '/contents/' + path) - .then(Response.ok) + ...
dc1d40d90f604eefbee96835ed1d04224d094722
client/app/views/App.jsx
client/app/views/App.jsx
import React from 'react'; import axios from 'axios'; import lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import injectTapEventPlugin from 'react-tap-event-plugin'; import...
import React from 'react'; import axios from 'axios'; import lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import injectTapEventPlugin from 'react-tap-event-plugin'; import...
Refactor set state in app parent component
Refactor set state in app parent component
JSX
mit
AlbertoALopez/polling,AlbertoALopez/polling
--- +++ @@ -11,24 +11,27 @@ class App extends React.Component { constructor() { super(); + this.state = { + loggedIn: false, + userName: '', + }; + } + componentDidMount() { axios.get('/login') .then((response) => { if (!response....
c7b4fffa556794c4416605f01e9f5ea5a7799317
client/src/app/PageComponents/HouseHoldList.jsx
client/src/app/PageComponents/HouseHoldList.jsx
import React from 'react'; import HouseHoldCard from '../Components/HouseHoldCard.jsx'; /* HouseHoldList Component Props: { userid: INT } */ const HouseHoldList = React.createClass({ render: function() { return (); }, }); module.exports = { HouseHoldList: HouseHoldList, };
Add some structure to householdlist
Add some structure to householdlist
JSX
mit
Squarific/SmartHome,Squarific/SmartHome,Squarific/SmartHome
--- +++ @@ -0,0 +1,20 @@ +import React from 'react'; +import HouseHoldCard from '../Components/HouseHoldCard.jsx'; + +/* + HouseHoldList Component + + Props: { + userid: INT + } +*/ + +const HouseHoldList = React.createClass({ + render: function() { + return (); + }, +}); + +module.exports = { + HouseHoldList: Hous...
8ff84e46c886b89991044ed72411064d62bef530
lib/search-bar.jsx
lib/search-bar.jsx
var React = require('react'); var debounce = require('debounce'); var noop = require('./noop.js'); var SearchBar = React.createClass({ getDefaultProps: function() { return { timeout: 20, onChange: noop }; }, render: function() { return <input cla...
var React = require('react'); var debounce = require('debounce'); var noop = require('./noop.js'); var SearchBar = React.createClass({ getDefaultProps: function() { return { timeout: 100, onChange: noop }; }, render: function() { return <input cl...
Increase default timeout to 100ms
Increase default timeout to 100ms
JSX
mit
meirwah/react-json-inspector,meirwah/react-json-inspector
--- +++ @@ -6,7 +6,7 @@ var SearchBar = React.createClass({ getDefaultProps: function() { return { - timeout: 20, + timeout: 100, onChange: noop }; },
3c68aa706d8c7dca0ee3f6caaaeff3b7f62ac95b
packages/lesswrong/components/posts/BookmarksList.jsx
packages/lesswrong/components/posts/BookmarksList.jsx
import { registerComponent, Components, useSingle } from 'meteor/vulcan:core'; import React from 'react'; import withUser from '../common/withUser'; import Users from 'meteor/vulcan:users'; import withErrorBoundary from '../common/withErrorBoundary'; const BookmarksList = ({currentUser, limit=50 }) => { const { Post...
import { registerComponent, Components, useSingle } from 'meteor/vulcan:core'; import React from 'react'; import withUser from '../common/withUser'; import Users from 'meteor/vulcan:users'; import withErrorBoundary from '../common/withErrorBoundary'; const BookmarksList = ({currentUser, limit=50 }) => { const { Post...
Change so most recently added bookmarks display first.
Change so most recently added bookmarks display first.
JSX
mit
Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2
--- +++ @@ -16,7 +16,7 @@ }); let bookmarkedPosts = user?.bookmarkedPosts || [] - bookmarkedPosts = bookmarkedPosts.slice(0, limit) + bookmarkedPosts = bookmarkedPosts.reverse().slice(0, limit) if (loading) return <Loading/>
d8b8133ecca835abb65e5c2ba08e1356d96e7d6e
src/renderer/component/video/internal/play-button.jsx
src/renderer/component/video/internal/play-button.jsx
import React from 'react'; import Link from 'component/link'; class VideoPlayButton extends React.PureComponent { componentDidMount() { this.keyDownListener = this.onKeyDown.bind(this); document.addEventListener('keydown', this.keyDownListener); } componentWillUnmount() { document.removeEventListene...
import React from 'react'; import Link from 'component/link'; class VideoPlayButton extends React.PureComponent { componentDidMount() { this.keyDownListener = this.onKeyDown.bind(this); document.addEventListener('keydown', this.keyDownListener); } componentWillUnmount() { document.removeEventListene...
Enable play button after clicking download
Enable play button after clicking download
JSX
mit
lbryio/lbry-electron,lbryio/lbry-app,lbryio/lbry-electron,lbryio/lbry-electron,lbryio/lbry-app
--- +++ @@ -23,7 +23,7 @@ } render() { - const { button, label, isLoading, fileInfo, mediaType } = this.props; + const { button, label, fileInfo, mediaType } = this.props; /* title={ @@ -33,13 +33,12 @@ } */ - const disabled = isLoading || fileInfo === undefined; const...
7f73546f40614ec8ae676cd5e0047feba8955f21
src/Highcharts.jsx
src/Highcharts.jsx
global.HighchartsAdapter = require('exports?HighchartsAdapter!highcharts-standalone-adapter'); var Highcharts = require("exports?Highcharts!highcharts"); var React = require('react'); module.exports = React.createClass({ displayName: 'Highcharts', renderChart: function () { if (!this.props.config) { th...
global.HighchartsAdapter = require('exports?HighchartsAdapter!highcharts-standalone-adapter'); var Highcharts = require("exports?Highcharts!highcharts"); var React = require('react'); module.exports = React.createClass({ displayName: 'Highcharts', propTypes: { config: React.PropTypes.object.isRequired, i...
Add `isPureConfig` prop making it easy to avoid unecessary graph rerenders, since re-rendering a highcharts graph is expensive.
Add `isPureConfig` prop making it easy to avoid unecessary graph rerenders, since re-rendering a highcharts graph is expensive.
JSX
mit
kirjs/react-highcharts,kirjs/react-highcharts
--- +++ @@ -6,11 +6,16 @@ module.exports = React.createClass({ displayName: 'Highcharts', + propTypes: { + config: React.PropTypes.object.isRequired, + isPureConfig: React.PropTypes.boolean + }, + renderChart: function () { if (!this.props.config) { throw new Error('Config must be specifi...
20a656dafbd89b407f53ac4f3b5500f0ebe10562
src/presentations/reactDay/reactRouter/reactRouter.jsx
src/presentations/reactDay/reactRouter/reactRouter.jsx
import React, { Component } from 'react'; // import { // Appear, BlockQuote, Cite, CodePane, Code, Deck, Fill, Fit, // Heading, Image, Layout, ListItem, List, Quote, Slide, Text, // } from 'spectacle'; import { Deck, Slide, Text, BlockQuote, Quote } from 'spectacle'; import { theme } from "../common/themes/darkT...
import React, { Component } from 'react'; // import { // Appear, BlockQuote, Cite, CodePane, Code, Deck, Fill, Fit, // Heading, Image, Layout, ListItem, List, Quote, Slide, Text, // } from 'spectacle'; import { Deck, Slide, Text, Appear, List, ListItem, Heading } from 'spectacle'; import { theme } from '../commo...
Add presentation slide and its contents
Add presentation slide and its contents
JSX
mit
react-skg/meetup,react-skg/meetup
--- +++ @@ -5,18 +5,33 @@ // Heading, Image, Layout, ListItem, List, Quote, Slide, Text, // } from 'spectacle'; -import { Deck, Slide, Text, BlockQuote, Quote } from 'spectacle'; +import { Deck, Slide, Text, Appear, List, ListItem, Heading } from 'spectacle'; -import { theme } from "../common/themes/darkTheme...
f35f976e81ca910ec677c64c5b10e9451ed1e4f3
src/react-chayns-contextmenu/component/ContextMenu.jsx
src/react-chayns-contextmenu/component/ContextMenu.jsx
import React from 'react'; import PropTypes from 'prop-types'; import ContextMenuItem from './ContextMenuItem'; const ContextMenu = ({hide, onLayerClick, x, y, items}) => { const contextMenuClass = hide ? "context-menu" : "context-menu context-menu--active"; return ( <div className={contextMenuClass}>...
import React from 'react'; import PropTypes from 'prop-types'; import ContextMenuItem from './ContextMenuItem'; const ContextMenu = ({hide, onLayerClick, x, y, items}) => { const contextMenuClass = hide ? "context-menu" : "context-menu context-menu--active"; return ( <div className={contextMenuClass}>...
Change context menu position props (remove require, add default value)
Change context menu position props (remove require, add default value)
JSX
mit
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
--- +++ @@ -33,13 +33,15 @@ ContextMenu.defaultProps = { hide: true, onLayerClick: () => {}, + x: undefined, + y: undefined }; ContextMenu.propTypes = { hide: PropTypes.bool, onLayerClick: PropTypes.func, - x: PropTypes.number.isRequired, - y: PropTypes.number.isRequired, + x: ...
89cfe760ae62378ca5cb94b380f35f51cad2ff44
web/static/js/components/action_item_toggle.jsx
web/static/js/components/action_item_toggle.jsx
import React, { Component } from "react" class ActionItemToggle extends Component { constructor(props) { super(props) this.handleToggleChange = this.handleToggleChange.bind(this) } handleToggleChange() { this.props.onToggleActionItem() } render() { return ( <div className="ui toggle c...
import React, { Component } from "react" class ActionItemToggle extends Component { constructor(props) { super(props) this.handleToggleChange = this.handleToggleChange.bind(this) } handleToggleChange() { this.props.onToggleActionItem() } render() { return ( <input type="checkbox" on...
Remove now unused field class on input
Remove now unused field class on input
JSX
mit
stride-nyc/remote_retro,tnewell5/remote_retro,samdec11/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro,stride-nyc/remote_retro
--- +++ @@ -12,7 +12,6 @@ render() { return ( - <div className="ui toggle checkbox field"> <input type="checkbox" onChange={this.handleToggleChange} id="action-item-toggle" /> <label htmlFor="action-item-toggle">Toggle Action Items</label> </div>
bc9c3d525d0941fac618f8fe3211def338f3116c
src/server/static-app.jsx
src/server/static-app.jsx
import React from 'react' import ReactDOMServer from 'react-dom/server' import { StaticRouter } from 'react-router' import { Provider } from 'react-redux' import App from './../shared/app' export default (location: string, store: Object) => ReactDOMServer.renderToString( <Provider store={store}> <StaticRo...
import React from 'react' import ReactDOMServer from 'react-dom/server' import { StaticRouter } from 'react-router' import { Provider } from 'react-redux' import App from './../shared/app' export default (location: string, store: Object) => ReactDOMServer.renderToString( <Provider store={store}> <StaticRo...
Add temporary fix for react-router double-slash issue
Add temporary fix for react-router double-slash issue
JSX
mit
verekia/js-stack-boilerplate,verekia/js-stack-boilerplate
--- +++ @@ -11,4 +11,6 @@ <StaticRouter location={location} context={{}}> <App /> </StaticRouter> - </Provider>) + </Provider>, +// Temporary fix until react-router/pull/4484 is released +).replace(/<a href="\/\//g, '<a href="/')
4c0099ee3b8ef6a23c6b74968cfb2fa63a75af3f
src/components/Markets.jsx
src/components/Markets.jsx
const React = window.React = require('react'); import AssetCard from './AssetCard.jsx'; import AssetPair from './AssetPair.jsx'; import AssetList from './AssetList.jsx'; import CustomMarketPicker from './CustomMarketPicker.jsx'; import Stellarify from '../lib/Stellarify'; import ErrorBoundary from './ErrorBoundary.jsx'...
const React = window.React = require('react'); import AssetCard from './AssetCard.jsx'; import AssetPair from './AssetPair.jsx'; import AssetList from './AssetList.jsx'; import CustomMarketPicker from './CustomMarketPicker.jsx'; import Stellarify from '../lib/Stellarify'; import ErrorBoundary from './ErrorBoundary.jsx'...
Remove header from markets page
Remove header from markets page
JSX
apache-2.0
irisli/stellarterm,irisli/stellarterm,irisli/stellarterm
--- +++ @@ -17,9 +17,6 @@ <div> <div className="so-back islandBack islandBack--t"> <div className="island"> - <div className="island__header"> - Stellar Asset Directory - </div> <AssetList d={this.props.d}></AssetList> <div classN...
c47da17764b350b931856f456938b9bb9029874f
src/colorPalette/containers/colorPalette.container.jsx
src/colorPalette/containers/colorPalette.container.jsx
import React, {Component} from 'react'; // import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; class ColorPalette extends Component { buildPalette() { let roomSelected = this.props.roomSelected; let colors; if (this.props.rooms[roomSelected]) { colors = this.props.roo...
import React, {Component} from 'react'; // import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; class ColorPalette extends Component { buildPalette() { let roomSelected = this.props.roomSelected; const color = this.props.rooms[roomSelected].color && this.props.rooms[roomSelected...
Make ColorPalette display the room's current color
feat: Make ColorPalette display the room's current color ColorPalette used to display each room's color array. Now that we're storing only one color per room, it wasn't working. This commit rewrites ColorPalette to display each room's color.
JSX
mit
Nailed-it/Designify,Nailed-it/Designify
--- +++ @@ -5,23 +5,9 @@ class ColorPalette extends Component { buildPalette() { let roomSelected = this.props.roomSelected; - let colors; - if (this.props.rooms[roomSelected]) { - colors = this.props.rooms[roomSelected].colors; - }; + const color = this.props.rooms[roomSelected].color && th...
b562d8a35ed75afe982b8d366d9632f9fa60e93b
app/Routes.jsx
app/Routes.jsx
import React from 'react'; import { HashRouter as Router, Route, Switch } from 'react-router-dom'; import NavBar from './components/NavBar'; import Home from './containers/Home'; import Forecast from './containers/Forecast'; import Detail from './containers/Detail'; import NotFound from './containers/NotFound'; ...
import React from 'react'; import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import NavBar from './components/NavBar'; import Home from './containers/Home'; import Forecast from './containers/Forecast'; import Detail from './containers/Detail'; import NotFound from './containers/NotFound...
Use BrowserRouter because HashRouter can't push state
Use BrowserRouter because HashRouter can't push state
JSX
mit
FalloutX/50-degrees,FalloutX/50-degrees
--- +++ @@ -1,6 +1,6 @@ import React from 'react'; import { - HashRouter as Router, + BrowserRouter as Router, Route, Switch } from 'react-router-dom';
70b20fb76f034bacdcb9e91d8a2208d7054f3bff
app/javascript/app/pages/country-compare/country-compare-component.jsx
app/javascript/app/pages/country-compare/country-compare-component.jsx
import React from 'react'; import PropTypes from 'prop-types'; import Sticky from 'react-stickynode'; import Header from 'components/header'; import Intro from 'components/intro'; import AnchorNav from 'components/anchor-nav'; import CountryCompareSelector from 'components/country-compare/country-compare-selector'; i...
import React from 'react'; import PropTypes from 'prop-types'; import Sticky from 'react-stickynode'; import Header from 'components/header'; import Intro from 'components/intro'; import AnchorNav from 'components/anchor-nav'; import CountryCompareSelector from 'components/country-compare/country-compare-selector'; im...
Add modalMetadata to country compare
Add modalMetadata to country compare
JSX
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
--- +++ @@ -6,6 +6,7 @@ import Intro from 'components/intro'; import AnchorNav from 'components/anchor-nav'; import CountryCompareSelector from 'components/country-compare/country-compare-selector'; +import ModalMetadata from 'components/modal-metadata'; import layout from 'styles/layout.scss'; import anchorNa...
124ea02d601a2c007722f79d34c8f3e5d613bb27
packages/lesswrong/components/common/Error404.jsx
packages/lesswrong/components/common/Error404.jsx
import { registerComponent } from 'meteor/vulcan:lib'; import React from 'react'; import { FormattedMessage } from 'meteor/vulcan:i18n'; import { useServerRequestStatus } from '../../lib/routeUtil' const Error404 = () => { const serverRequestStatus = useServerRequestStatus() if (serverRequestStatus) serverRequestS...
import { Components, registerComponent } from 'meteor/vulcan:lib'; import React from 'react'; import { FormattedMessage } from 'meteor/vulcan:i18n'; import { useServerRequestStatus } from '../../lib/routeUtil' const Error404 = () => { const { SingleColumnSection } = Components; const serverRequestStatus = useServe...
Make 404 page not completely terrible
Make 404 page not completely terrible
JSX
mit
Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2
--- +++ @@ -1,15 +1,18 @@ -import { registerComponent } from 'meteor/vulcan:lib'; +import { Components, registerComponent } from 'meteor/vulcan:lib'; import React from 'react'; import { FormattedMessage } from 'meteor/vulcan:i18n'; import { useServerRequestStatus } from '../../lib/routeUtil' const Error404 = ()...
03feeba4b1aa70633e08681547e3ef4df983c6b1
src/components/FullsizePicture.jsx
src/components/FullsizePicture.jsx
import React from "react"; import Radium from "radium"; import Picture from "./Picture"; class FullSizePicture extends React.PureComponent { getStyles() { const styles = { overflow: "hidden", width: "100%", position: "relative", }; return [ s...
import React from "react"; import Radium from "radium"; import Picture from "./Picture"; class FullSizePicture extends React.PureComponent { getStyles() { const styles = { overflow: "hidden", width: "100%", position: "relative", }; return [ s...
Fix the propTypes becasue style can be either array or object
Fix the propTypes becasue style can be either array or object
JSX
mit
EDITD/react-responsive-picture
--- +++ @@ -60,7 +60,10 @@ FullSizePicture.propTypes = { sources: React.PropTypes.array, src: React.PropTypes.string, - style: React.PropTypes.array, + style: React.PropTypes.oneOfType([ + React.PropTypes.array, + React.PropTypes.object, + ]), }; export default Radium(FullSizePic...
7bf603a86f82e105ff148d3e6c5221468d81cd94
src/components/controls/Textly.jsx
src/components/controls/Textly.jsx
// @flow import React from "react"; import s from "./styles.scss"; const Textly = (props: { name: string, value: string, onSetFilterOption: (string, any) => {} }) => ( <div> <div className={s.label}>{props.name}</div> <textarea type="text" value={props.value} wrap="off" onChan...
// @flow import React from "react"; import s from "./styles.scss"; const Textly = (props: { name: string, value: string, onSetFilterOption: (string, any) => {} }) => ( <div> <div className={s.label}>{props.name}</div> <textarea type="text" value={props.value} wrap="off" spellc...
Disable spellcheck on textarea controls
Disable spellcheck on textarea controls
JSX
mit
gyng/ditherer,gyng/ditherer,gyng/ditherer
--- +++ @@ -15,6 +15,7 @@ type="text" value={props.value} wrap="off" + spellcheck="false" onChange={e => props.onSetFilterOption(props.name, e.target.value)} /> </div>
f5a79b1ceb1efda37a9f174a6c8dd09e914406f4
themes/janeswalk/js/views/FacebookShareDialog.jsx
themes/janeswalk/js/views/FacebookShareDialog.jsx
'use strict'; /** * The dialogue to share on facebook * * @public * @param Object shareObj * @return void */ var FacebookShareDialog = function(shareObj) { this._shareObj = shareObj; this._shareObj.method = 'feed'; }; FacebookShareDialog.prototype = { /** * _shareObj * * @protected * @var Obj...
'use strict'; /** * The dialogue to share on facebook * * @public * @param Object shareObj * @return void */ var FacebookShareDialog = function(shareObj) { this._shareObj = shareObj; this._shareObj.method = 'feed'; }; Object.defineProperties(FacebookShareDialog.prototype, { /** * _shareObj * * @protec...
Use defineproperties to set facebook share prototype
Use defineproperties to set facebook share prototype
JSX
mit
jkoudys/janeswalk-web,jkoudys/janeswalk-web,jkoudys/janeswalk-web
--- +++ @@ -10,14 +10,14 @@ this._shareObj = shareObj; this._shareObj.method = 'feed'; }; -FacebookShareDialog.prototype = { +Object.defineProperties(FacebookShareDialog.prototype, { /** * _shareObj * * @protected * @var Object (default: null) */ - _shareObj: null, + _shareObj: ...
bcd312638dd8317e5574d1c2130b59fe921b8a67
app/assets/javascripts/components/bible_autocomplete.jsx
app/assets/javascripts/components/bible_autocomplete.jsx
var BibleAutocomplete = React.createClass({ getDefaultProps() { return { name: "query_string", } }, getInitialState() { return { value: "", } }, render() { return ( <div> <input ref="input" autoFocus autoComplete="off" val...
var BibleAutocomplete = React.createClass({ getDefaultProps() { return { name: "query_string", } }, getInitialState() { return { value: "", } }, render() { return ( <div> <input ref="input" autoFocus autoComplete="off" aut...
Disable autocomplete, autocorrect, and autocapitalize
Disable autocomplete, autocorrect, and autocapitalize
JSX
mit
danott/scabbard,danott/scabbard,danott/scabbard
--- +++ @@ -18,6 +18,8 @@ ref="input" autoFocus autoComplete="off" + autoCorrect="off" + autoCapitalize="off" value={this.state.value} onChange={this.handleChange} name={this.props.name}
8165ee936b6aeae0643650c2bb2cf5686a8db908
app/components/navbar/navbar.jsx
app/components/navbar/navbar.jsx
import React from 'react' import { Link } from 'react-router' export default React.createClass({ render: function () { return ( <header className="header"> <div className="container"> <div className="header-left"> <Link to={'/'} className="header-item">Quill Connect</Link> ...
import React from 'react' import { Link } from 'react-router' export default React.createClass({ render: function () { return ( <header className="header"> <div className="container"> <div className="header-left"> <Link to={'/'} className="header-item">Quill Connect</Link> ...
Tidy up the nav bar for now
Tidy up the nav bar for now
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
--- +++ @@ -9,28 +9,28 @@ <div className="header-left"> <Link to={'/'} className="header-item">Quill Connect</Link> <Link to={'/play'} className="header-tab" activeClassName="is-active">Play</Link> - <Link to={'/results'} className="header-tab" activeClassName="is-activ...
dee49e14ee47ca265a3faeb9ffb0dd0d204f67ec
app/assets/javascripts/components/LayoutComponents/Header.js.jsx
app/assets/javascripts/components/LayoutComponents/Header.js.jsx
var Header = React.createClass({ render: function(){ return ( <div id="header"> <Sidebar /> <div id="mainHead"> <FixedMenuTemplate /> <MobileMenu /> <div className="ui huge icon header inverted"> <a href="/dashboard"> <i className="circular ...
var Header = React.createClass({ render: function(){ return ( <div id="header"> <Sidebar /> <div id="mainHead"> <FixedMenuTemplate /> <MobileMenu /> <div className="ui huge icon header inverted"> <a href="/dashboard"> <i className="circular ...
Update header image to person on city street
Update header image to person on city street
JSX
mit
acoravos/metoo,acoravos/metoo,acoravos/metoo
--- +++ @@ -20,7 +20,7 @@ </h2> </div> - <img id="mainImage" src="http://i.imgur.com/LnTYPZ2.jpg" /> + <img id="mainImage" src="http://i.imgur.com/VYcXx10.jpg" /> </div> )
bebc0834c7c8def73ab7bfcf72aad97b55d570c3
src/react-chayns-tapp_portal/component/TappPortal.jsx
src/react-chayns-tapp_portal/component/TappPortal.jsx
import { createPortal } from 'react-dom'; import PropTypes from 'prop-types'; let wasRendered = false; let isDestroyed = false; let lastParent = null; const TappPortal = ({ children, parent }) => { let parentToUse = document.getElementsByClassName('tapp')[0] || document.body; if (!parent && wasRendered && p...
import { createPortal } from 'react-dom'; import PropTypes from 'prop-types'; let wasRendered = false; let isDestroyed = false; let lastParent = null; const TappPortal = ({ children, parent }) => { let parentToUse = document.getElementsByClassName('tapp')[0] || document.body; if (!parent && wasRendered && p...
Document tapp portal source code
:bulb: Document tapp portal source code
JSX
mit
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
--- +++ @@ -10,6 +10,7 @@ let parentToUse = document.getElementsByClassName('tapp')[0] || document.body; if (!parent && wasRendered && parentToUse !== lastParent) { + // destroy old tapp portals in tapp DIVs to prevent duplicates after switching tapp isDestroyed = true; }
d2d43cc1bc437a3ccae77bf534a4c3d4c2a54382
src/react-chayns-tapp_portal/component/TappPortal.jsx
src/react-chayns-tapp_portal/component/TappPortal.jsx
import { createPortal } from 'react-dom'; import PropTypes from 'prop-types'; let wasRendered = false; let isDestroyed = false; let lastParent = null; const TappPortal = ({ children, parent }) => { let parentToUse = document.getElementsByClassName('tapp')[0] || document.body; if (!parent && wasRendered && p...
import { useState } from 'react'; import { createPortal } from 'react-dom'; import PropTypes from 'prop-types'; const TappPortal = ({ children, parent }) => { let parentToUse = document.getElementsByClassName('tapp')[0] || document.body; const [wasRendered, setWasRendered] = useState(false); const [lastPa...
Use state instead of global variable
:bug: Use state instead of global variable
JSX
mit
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
--- +++ @@ -1,20 +1,15 @@ +import { useState } from 'react'; import { createPortal } from 'react-dom'; import PropTypes from 'prop-types'; - -let wasRendered = false; -let isDestroyed = false; - -let lastParent = null; const TappPortal = ({ children, parent }) => { let parentToUse = document.getElementsByCl...
6cbfa2772b068318af6dd5a0efc03f62ee686400
javascript/main.jsx
javascript/main.jsx
require('./styles/main'); require('./components/Routes.react');
require('./styles/main'); require('./components/Routes.react'); document.body.addEventListener('contextmenu', e => e.preventDefault(), false);
Disable right click on webview
Disable right click on webview
JSX
mit
wfalkwallace/GithubPulse,rafaelstz/GithubPulse,rafaelstz/GithubPulse,rafaell-lycan/GithubPulse,rafaelstz/GithubPulse,rafaell-lycan/GithubPulse,rafaell-lycan/GithubPulse,wfalkwallace/GithubPulse,tadeuzagallo/GithubPulse,tadeuzagallo/GithubPulse,DarthMike/GithubPulse,tadeuzagallo/GithubPulse,tadeuzagallo/GithubPulse,Dart...
--- +++ @@ -1,2 +1,4 @@ require('./styles/main'); require('./components/Routes.react'); + +document.body.addEventListener('contextmenu', e => e.preventDefault(), false);
f34b512b84c22a16183aeb89dc56f2426ea12191
src/app/global/Layout.jsx
src/app/global/Layout.jsx
import React, { Component } from 'react'; import { connect } from 'react-redux' import NavBar from './NavBar'; class Layout extends Component { constructor(props) { super(props) } render() { return ( <div> <NavBar /> {this.props.children} ...
import React, { Component } from 'react'; import NavBar from './NavBar'; export default class Layout extends Component { constructor(props) { super(props) } render() { return ( <div> <NavBar /> {this.props.children} </div> ) ...
Remove connect and export component instead
Remove connect and export component instead
JSX
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -1,9 +1,8 @@ import React, { Component } from 'react'; -import { connect } from 'react-redux' import NavBar from './NavBar'; -class Layout extends Component { +export default class Layout extends Component { constructor(props) { super(props) } @@ -17,5 +16,3 @@ ) } }...
4a275d159be9ad2fc03864769ba8bbd742c53fbc
public/app/screens/main/sections/devices/room/room.jsx
public/app/screens/main/sections/devices/room/room.jsx
var React = require('react'); var Reflux = require('reflux'); var styleMixin = require('mixins/style-mixin'); var _ = require('lodash'); var deviceListStore = require('stores/device-list'); var deviceActions = require('actions/device'); var Device = require('./device'); var Gateway = require('./gateway'); var Room =...
var React = require('react'); var Reflux = require('reflux'); var styleMixin = require('mixins/style-mixin'); var _ = require('lodash'); var deviceListStore = require('stores/device-list'); var deviceActions = require('actions/device'); var Device = require('./device'); var Gateway = require('./gateway'); var Room =...
Increase fetching interval to apprx. match gateway's response time
Increase fetching interval to apprx. match gateway's response time
JSX
mit
yetu/controlcenter,yetu/controlcenter,yetu/controlcenter
--- +++ @@ -17,7 +17,7 @@ ], componentDidMount: function componentDidMount () { - var REFETCH_INTERVAL = 1000; + var REFETCH_INTERVAL = 2000; // Refetch devices every some seconds as long as we have no push messages this.refetchIntervalId = window.setInterval(() => {
1ab8633c22e2636284c62363512db2e10b71f8c3
src/sentry/static/sentry/app/components/events/interfaces/contexts/contextBlock.jsx
src/sentry/static/sentry/app/components/events/interfaces/contexts/contextBlock.jsx
import React from 'react'; import _ from 'underscore'; import {defined} from '../../../../utils'; import KeyValueList from '../keyValueList'; const ContextBlock = React.createClass({ propTypes: { alias: React.PropTypes.string.isRequired, title: React.PropTypes.string, data: React.PropTypes.object.isReq...
import React from 'react'; import _ from 'underscore'; import {defined} from '../../../../utils'; import KeyValueList from '../keyValueList'; const ContextBlock = React.createClass({ propTypes: { alias: React.PropTypes.string.isRequired, title: React.PropTypes.string, data: React.PropTypes.object.isReq...
Remove title from data block
Remove title from data block
JSX
bsd-3-clause
BuildingLink/sentry,zenefits/sentry,ifduyue/sentry,looker/sentry,JamesMura/sentry,alexm92/sentry,mvaled/sentry,JamesMura/sentry,JackDanger/sentry,beeftornado/sentry,mitsuhiko/sentry,gencer/sentry,fotinakis/sentry,BuildingLink/sentry,jean/sentry,JamesMura/sentry,ifduyue/sentry,alexm92/sentry,mvaled/sentry,fotinakis/sent...
--- +++ @@ -35,7 +35,7 @@ let extraData = []; for (let key in this.props.data) { - if (key !== 'type') { + if (key !== 'type' && key !== 'title') { extraData.push([key, this.props.data[key]]); } }
de09f9054d2af6fc070d1ce66bb1918314867641
services/QuillLMS/client/app/bundles/Teacher/components/dashboard/dashboard_footer.jsx
services/QuillLMS/client/app/bundles/Teacher/components/dashboard/dashboard_footer.jsx
'use strict' import React from 'react' export default React.createClass({ render: function() { return( <div className='footer-row row'> <div className='review-request col-md-1 col-sm-12'> <i className="fa fa-heart"></i> Love Quill? <a href='https://www.graphite.org/website/quill'>Ple...
import React from 'react'; export default () => ( <div className="footer-row row"> <div className="review-request col-md-1 col-sm-12"> <i className="fa fa-heart" /> Love Quill? <a href="https://www.commonsense.org/education/website/quill">Please write a review.</a> </div> <div className="footer-im...
Update dashboard footer review link, and make into a dumb component
Update dashboard footer review link, and make into a dumb component
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
--- +++ @@ -1,21 +1,15 @@ -'use strict' +import React from 'react'; - import React from 'react' +export default () => ( + <div className="footer-row row"> + <div className="review-request col-md-1 col-sm-12"> + <i className="fa fa-heart" /> Love Quill? <a href="https://www.commonsense.org/education/websit...
a9ba4995caaedd1292b821e821235139b095090a
src/index.jsx
src/index.jsx
/* eslint no-underscore-dangle: "off" */ import React from 'react' import ReactDom from 'react-dom' import { Provider } from 'react-redux' import { createStore, compose } from 'redux' import App from './components/App' import reducer from './reducers/reducer' import { remote } from 'electron' import { persistStore, au...
/* eslint no-underscore-dangle: "off" */ import React from 'react' import ReactDom from 'react-dom' import { Provider } from 'react-redux' import { createStore, compose } from 'redux' import App from './components/App' import reducer from './reducers/reducer' import { remote } from 'electron' import { persistStore, au...
Use different redux store in dev mode
Use different redux store in dev mode
JSX
mit
cheshire137/gh-notifications-snoozer,cheshire137/gh-notifications-snoozer
--- +++ @@ -31,7 +31,12 @@ const reduxDevTools = window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() const enhancers = compose(autoRehydrate(), reduxDevTools) const store = createStore(reducer, undefined, enhancers) - const persistDir = remote.app.getPath('desktop') + + let persist...
52cf2209b1022d14db9b7ab892ccc3ca158110b5
src/js/components/addData/AddDataPage.jsx
src/js/components/addData/AddDataPage.jsx
/** * AddDataPage.jsx * Created by Katie Rose 12/7/15 **/ import React from 'react'; import Navbar from '../SharedComponents/NavigationComponent.jsx'; import SubmissionPageHeader from 'SubmissionPageHeader.jsx'; import SubmissionContent from 'SubmissionContent.jsx'; export default class SubmissionPage extends React.C...
/** * AddDataPage.jsx * Created by Katie Rose 12/7/15 **/ import React from 'react'; import Navbar from '../SharedComponents/NavigationComponent.jsx'; import SubmissionPageHeader from './SubmissionPageHeader.jsx'; import SubmissionContent from './SubmissionContent.jsx'; export default class SubmissionPage extends Rea...
Fix paths for Submission components
Fix paths for Submission components
JSX
cc0-1.0
fedspendingtransparency/data-act-broker-web-app,fedspendingtransparency/data-act-broker-web-app
--- +++ @@ -5,8 +5,8 @@ import React from 'react'; import Navbar from '../SharedComponents/NavigationComponent.jsx'; -import SubmissionPageHeader from 'SubmissionPageHeader.jsx'; -import SubmissionContent from 'SubmissionContent.jsx'; +import SubmissionPageHeader from './SubmissionPageHeader.jsx'; +import Submiss...
7af6c1588e78761efebdf2c0507887020be4e8fa
src/graph-table.jsx
src/graph-table.jsx
import React from 'react'; var _ = require('lodash'); var classNames = require('classnames'); //import WayPoint from 'react-waypoint'; var randomId = function() { return "MY" + (Math.random() * 1e32).toString(12); }; //**************************************** // // Common graph containers // //*****************...
import React from 'react'; var _ = require('lodash'); var classNames = require('classnames'); //import WayPoint from 'react-waypoint'; var randomId = function() { return "MY" + (Math.random() * 1e32).toString(12); }; //**************************************** // // Common graph containers // //*****************...
Update graph data table to use unified data format.
Update graph data table to use unified data format.
JSX
mit
fengxia41103/worldsnapshot,fengxia41103/worldsnapshot
--- +++ @@ -16,16 +16,26 @@ var GraphDatatable = React.createClass({ render: function() { - const fields = this.props.data.map((d) => { + const headers = this.props.unifiedData.categories.map((h) => { + return ( + <th key={randomId()}> + {h} + </th> + ) + }); + const...
0226f4e9d5fae99aaf69fcf359ff65f34aab6880
assets/scripts/components/musters/district-group.jsx
assets/scripts/components/musters/district-group.jsx
'use strict'; import React from 'react'; import DistrictCard from './district-card.jsx'; const BlockGroup = React.createClass({ filterCards: function(event){ var updatedList = this.props.data.cards; updatedList = updatedList.filter(function(item){ return item.name.toLowerCase().searc...
'use strict'; import React from 'react'; import DistrictCard from './district-card.jsx'; const BlockGroup = React.createClass({ filterCards: function(event){ var updatedList = this.props.data.cards; updatedList = updatedList.filter(function(item){ return item.block_name.toLowerCase()...
Apply search for district musters
Apply search for district musters
JSX
mit
hks-epod/paydash
--- +++ @@ -8,7 +8,7 @@ filterCards: function(event){ var updatedList = this.props.data.cards; updatedList = updatedList.filter(function(item){ - return item.name.toLowerCase().search(event.target.value.toLowerCase()) !== -1; + return item.block_name.toLowerCase().search(e...
5fc6364a1b8bac29fe10c6acc3d69138125d9028
packages/vulcan-ui-material/lib/components/forms/FormNestedArrayLayout.jsx
packages/vulcan-ui-material/lib/components/forms/FormNestedArrayLayout.jsx
import React from 'react'; import PropTypes from 'prop-types'; import { replaceComponent } from 'meteor/vulcan:core'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; const FormNestedArrayLayout = ({ hasErrors, label, content }) => ( <div> <Typography component="...
import React from 'react'; import PropTypes from 'prop-types'; import { replaceComponent } from 'meteor/vulcan:core'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; const FormNestedArrayLayout = ({ hasErrors, label, content }) => ( <div> <Typography component="...
Change hasErrors propTypes to "oneOfType"
Change hasErrors propTypes to "oneOfType"
JSX
mit
VulcanJS/Vulcan,VulcanJS/Vulcan
--- +++ @@ -14,7 +14,7 @@ </div> ); FormNestedArrayLayout.propTypes = { - hasErrors: PropTypes.number, + hasErrors: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]), label: PropTypes.node, content: PropTypes.node, };
d30d6c32e41ac42d6f90daab1e0ab1323c16ae30
imports/ui/ReceivePayment.jsx
imports/ui/ReceivePayment.jsx
import QRCode from 'qrcode.react' import React from 'react' import createReactClass from 'create-react-class' import {Button, Modal, ModalBody, ModalHeader} from 'reactstrap' const ReceivePayment = createReactClass({ getInitialState: () => ({modal: false}), toggle: function () { this.setState({ modal: ...
import QRCode from 'qrcode.react' import React from 'react' import createReactClass from 'create-react-class' import {Button, Modal, ModalBody, ModalHeader} from 'reactstrap' const ReceivePayment = createReactClass({ getInitialState: () => ({modal: false}), toggle: function () { this.setState({ modal: ...
Rename the button to fund the wallet
Rename the button to fund the wallet
JSX
mit
SpidChain/spidchain-btcr,SpidChain/spidchain-btcr
--- +++ @@ -16,7 +16,7 @@ render: function () { return ( <div> - <Button color='primary' onClick={this.toggle} block> Receive </Button> + <Button color='primary' onClick={this.toggle} block> Fund Wallet </Button> <Modal isOpen={this.state.modal} toggle={this.toggle}> <...
7137b83be48cf0ded8fd0462721cae05231009db
src/containers/SingleSignOn/SingleSignOnRedirectCallback.jsx
src/containers/SingleSignOn/SingleSignOnRedirectCallback.jsx
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { replace } from 'react-router-redux'; import userManager from './userManager'; class SingleSignOnRedirectCallback extends Component { componentDidMount() { userManager.signinRedirectCallback() // TODO What if it fails? ...
import { Component } from 'react'; import userManager from './userManager'; class SingleSignOnRedirectCallback extends Component { componentDidMount() { userManager.signinRedirectCallback(); } render() { return null; } } export default SingleSignOnRedirectCallback;
Revert "Added the redirection back to the app after successful login"
Revert "Added the redirection back to the app after successful login" This reverts commit c2ecd0c222d182a019fde099aaf2525b8cb9b251.
JSX
mit
e1-bsd/omni-common-ui,e1-bsd/omni-common-ui
--- +++ @@ -1,14 +1,9 @@ -import React, { Component } from 'react'; -import { connect } from 'react-redux'; -import { replace } from 'react-router-redux'; +import { Component } from 'react'; import userManager from './userManager'; class SingleSignOnRedirectCallback extends Component { componentDidMount() { - ...
19ad34312e42392c5eacbe02c0a3e69eeda5b06e
packages/vulcan-ui-bootstrap/lib/components/forms/FormItem.jsx
packages/vulcan-ui-bootstrap/lib/components/forms/FormItem.jsx
/* Layout for a single form item */ import React from 'react'; import Form from 'react-bootstrap/Form'; import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; import { registerComponent } from 'meteor/vulcan:core'; const FormItem = ({ path, label, children, beforeInput, afterInput, ...rest })...
/* Layout for a single form item */ import React from 'react'; import Form from 'react-bootstrap/Form'; import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; import { registerComponent } from 'meteor/vulcan:core'; const FormItem = ({ path, label, children, beforeInput, afterInput, layout = '...
Add layout prop for Formitem
Add layout prop for Formitem
JSX
mit
VulcanJS/Vulcan,VulcanJS/Vulcan
--- +++ @@ -10,8 +10,18 @@ import Col from 'react-bootstrap/Col'; import { registerComponent } from 'meteor/vulcan:core'; -const FormItem = ({ path, label, children, beforeInput, afterInput, ...rest }) => { - if (label) { +const FormItem = ({ path, label, children, beforeInput, afterInput, layout = 'horizontal',...
88360acc80d75f44fd1aa202c18e747eaba0e016
src/screens/rename/views/browse/components/folder.jsx
src/screens/rename/views/browse/components/folder.jsx
//React modules import PropTypes from 'prop-types'; import React from 'react'; const Folder = ({ position, extention, match }) => { return ( <div class={`folder ${match ? 'active' : 'inactive'}`} style={position}> <svg version='1.1' x='0px' y='0px' viewBox='0 0 55 75' enableBackground='new 0 0 55 75'> <path ...
//React modules import PropTypes from 'prop-types'; import React from 'react'; const Folder = ({ extention, match }) => { return ( <div class={`folder ${match ? 'active' : 'inactive'}`}> <svg version='1.1' x='0px' y='0px' viewBox='0 0 55 75' enableBackground='new 0 0 55 75'> <path class='folder-edge' ...
Remove positioning object in place of css
Remove positioning object in place of css
JSX
mit
radencode/reflow,radencode/reflow-client,radencode/reflow,radencode/reflow-client
--- +++ @@ -2,9 +2,9 @@ import PropTypes from 'prop-types'; import React from 'react'; -const Folder = ({ position, extention, match }) => { +const Folder = ({ extention, match }) => { return ( - <div class={`folder ${match ? 'active' : 'inactive'}`} style={position}> + <div class={`folder ${match ? 'active' ...
8b9069e505125467283960c54d7960392da642d9
app/jsx/external_apps/components/ConfigOptionField.jsx
app/jsx/external_apps/components/ConfigOptionField.jsx
/** @jsx React.DOM */ define([ 'react' ], function (React) { return React.createClass({ displayName: 'ConfigOptionField', propTypes: { handleChange: React.PropTypes.func.isRequired, name: React.PropTypes.string.isRequired, type: React.PropTypes.string.isRequired, value: React.Prop...
/** @jsx React.DOM */ define([ 'react' ], function (React) { return React.createClass({ displayName: 'ConfigOptionField', propTypes: { handleChange: React.PropTypes.func.isRequired, name: React.PropTypes.string.isRequired, type: React.PropTypes.string.isRequired, value: React.Prop...
Fix style on add app form in app center
Fix style on add app form in app center fixes PLAT-834 Test steps: - The best app to test the form (has the most fields) is Blackboard Collaborate Change-Id: I28ea6866fea7af357aac2958ec44f74f93f0eeb4 Reviewed-on: https://gerrit.instructure.com/47312 Tested-by: Jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@inst...
JSX
agpl-3.0
roxolan/canvas-lms,Jyaasa/canvas-lms,greyhwndz/canvas-lms,kyroskoh/canvas-lms,utkarshx/canvas-lms,kyroskoh/canvas-lms,juoni/canvas-lms,greyhwndz/canvas-lms,SwinburneOnline/canvas-lms,fronteerio/canvas-lms,HotChalk/canvas-lms,juoni/canvas-lms,redconfetti/canvas-lms,djbender/canvas-lms,dgynn/canvas-lms,snehakachroo1/LSI_...
--- +++ @@ -20,7 +20,7 @@ return ( <div className="grid-row"> <div className="col-xs-12"> - <label className="checkbox text-left"> + <label className="checkbox"> <input type="checkbox" data-rel={this.props.name} onChange={this.props.handleChange} /> {thi...
84ea6d878971eded95f81afa36fb867fb1dbf94f
packages/vulcan-ui-bootstrap/lib/components/forms/StaticText.jsx
packages/vulcan-ui-bootstrap/lib/components/forms/StaticText.jsx
import React from 'react'; import { registerComponent } from 'meteor/vulcan:core'; const parseUrl = value => { return value.slice(0,4) === 'http' ? <a href={value} target="_blank">{value}</a> : value; } const StaticComponent = ({ value, label }) => ( <div className="form-group row"> <label className="control-...
import React from 'react'; import { registerComponent } from 'meteor/vulcan:core'; const parseUrl = value => { return value && value.toString().slice(0,4) === 'http' ? <a href={value} target="_blank">{value}</a> : value; } const StaticComponent = ({ value, label }) => ( <div className="form-group row"> <label...
Make static text work for empty values and numbers
Make static text work for empty values and numbers
JSX
mit
VulcanJS/Vulcan,VulcanJS/Vulcan
--- +++ @@ -2,7 +2,7 @@ import { registerComponent } from 'meteor/vulcan:core'; const parseUrl = value => { - return value.slice(0,4) === 'http' ? <a href={value} target="_blank">{value}</a> : value; + return value && value.toString().slice(0,4) === 'http' ? <a href={value} target="_blank">{value}</a> : value; ...
ea681ccea249ff90f6972a24d33f010ec9721718
src/section.jsx
src/section.jsx
import React from "react" import Prism from "prismjs" import "prismjs/components/prism-javascript.js" class Section extends React.Component { componentDidMount() { Prism.highlightAll() } componentDidUpdate() { Prism.highlightAll() } render() { let example = this.props.component.example exampl...
import React from "react" import Prism from "prismjs" import "prismjs/components/prism-javascript.js" class Section extends React.Component { componentDidMount() { Prism.highlightAll() } componentDidUpdate() { Prism.highlightAll() } render() { let example = this.props.component.example exampl...
Fix div cannot appear as child of p tag warning.
Fix div cannot appear as child of p tag warning.
JSX
mit
mavenlink/mavenlink-ui-concept
--- +++ @@ -16,11 +16,11 @@ <li> <h2 className="section-description">{this.props.component.description}</h2> <span className="section-path">{this.props.component.path}</span> - <p className="section-example"> + <div className="section-example"> <code style={{whiteSpac...
dea6a7a207157a1d4fe85c29a66d8254e604a21a
packages/lesswrong/components/shortform/ShortformThreadList.jsx
packages/lesswrong/components/shortform/ShortformThreadList.jsx
import React from 'react'; import { Components, registerComponent, withList } from 'meteor/vulcan:core'; import { Comments } from '../../lib/collections/comments'; import withUser from '../common/withUser'; const ShortformThreadList = ({ results, loading, loadMore, networkStatus, data: {refetch} }) => { const { Loa...
import React from 'react'; import { Components, registerComponent, withList } from 'meteor/vulcan:core'; import { Comments } from '../../lib/collections/comments'; import withUser from '../common/withUser'; const ShortformThreadList = ({ results, loading, loadMore, networkStatus, data: {refetch} }) => { const { Loa...
Change shortform page fetch policy
Change shortform page fetch policy
JSX
mit
Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope
--- +++ @@ -31,6 +31,7 @@ collection: Comments, queryName: 'ShortformThreadListQuery', fragmentName: 'ShortformCommentsList', + fetchPolicy: 'cache-and-network', enableTotal: false, pollInterval: 0, enableCache: true,
ec31899a961a7b25b7d86b73b6e787a2b1ece15f
app/Resources/client/jsx/helpers/traitEntryfilters.jsx
app/Resources/client/jsx/helpers/traitEntryfilters.jsx
export class TraitEntryFilter { fullData _filter constructor(fullData) { this.fullData = fullData this.filter = { providerBlacklist: [], userBlacklist: [] } } get filter(){ return this._filter } set filter(filter){ this._filt...
export class TraitEntryFilter { fullData _filter constructor(fullData) { this.fullData = fullData this.filter = { providerBlacklist: [], userBlacklist: [] } } get filter(){ return this._filter } set filter(filter){ if(typeof(...
Fix initialization of filter setter
Fix initialization of filter setter
JSX
mit
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
--- +++ @@ -15,7 +15,11 @@ } set filter(filter){ - this._filter = filter + if(typeof(this.filter) === 'undefined'){ + this._filter = filter; + return; + } + Object.assign(this.filter, filter) } applyFilter(){
e68fd048262a6267921fd31a17f12c4a710929dc
src/frontend/components/admin/DeleteGroupButton.jsx
src/frontend/components/admin/DeleteGroupButton.jsx
'use strict'; import React from 'react'; export default ({ onDelete, group }) => { var deleteGroup = () => { onDelete(group); }; return (<button onClick={deleteGroup} className="deleteGroup" title="Delete group"><span>Delete group</span></button>) }
'use strict'; import React from 'react'; export default ({ onDelete, group }) => { var deleteGroup = () => { if(confirm('Are you sure you want to delete the current group?')){ onDelete(group); } }; return (<button onClick={deleteGroup} className="deleteGroup" title="Delete...
Add confirm prompt for delete. Should be fancied if an opportunity presents
Add confirm prompt for delete. Should be fancied if an opportunity presents
JSX
agpl-3.0
rabblerouser/core,rabblerouser/core,rabblerouser/core
--- +++ @@ -4,7 +4,10 @@ export default ({ onDelete, group }) => { var deleteGroup = () => { - onDelete(group); + if(confirm('Are you sure you want to delete the current group?')){ + onDelete(group); + } }; + return (<button onClick={deleteGroup} className="delete...
9dddd44dbd72e332917dfd9989c679271624176a
src/components/list.jsx
src/components/list.jsx
import React from 'react'; const style = { width: '30%', margin: '2px', display: 'inline-block', textDecoration: 'none', color: 'white' } export default class ListColors extends React.Component { render () { return ( <ul> { this.props.colors.map((color, index) => { ...
import React from 'react'; const style = { width: '50%', margin: '4px', textDecoration: 'none', color: 'white' } export default class ListColors extends React.Component { render () { return ( <section> <ul> { this.props.colors.map((color, index) => { ret...
Change style and adds section tag
Change style and adds section tag
JSX
mit
Juan1ll0/es6-react-server-side-render,Juan1ll0/es6-react-server-side-render
--- +++ @@ -1,9 +1,8 @@ import React from 'react'; const style = { - width: '30%', - margin: '2px', - display: 'inline-block', + width: '50%', + margin: '4px', textDecoration: 'none', color: 'white' } @@ -11,13 +10,15 @@ export default class ListColors extends React.Component { render () { re...
3bf7f7b011be7a9cdb352c20ce5927338ae0931c
src/index.jsx
src/index.jsx
import React from 'react'; import ReactDOM from 'react-dom'; import * as commutable from 'commutable'; import Notebook from './components/Notebook'; require.extensions['.ipynb'] = require.extensions['.json']; const notebook = require('../test-notebooks/multiples.ipynb'); const immutableNotebook = commutable.fromJS(n...
import React from 'react'; import ReactDOM from 'react-dom'; import fs from 'fs'; import * as commutable from 'commutable'; import Notebook from './components/Notebook'; function readJSON(filepath) { return new Promise((resolve, reject) => { return fs.readFile(filepath, {}, (err, data) => { if(err) { ...
Read the notebook then render.
Read the notebook then render. I should have done this a while ago.
JSX
bsd-3-clause
rgbkrk/nteract,captainsafia/nteract,captainsafia/nteract,jdfreder/nteract,jdetle/nteract,nteract/nteract,nteract/nteract,0u812/nteract,jdfreder/nteract,temogen/nteract,temogen/nteract,nteract/composition,jdfreder/nteract,captainsafia/nteract,temogen/nteract,rgbkrk/nteract,nteract/nteract,jdetle/nteract,nteract/composit...
--- +++ @@ -1,15 +1,40 @@ import React from 'react'; import ReactDOM from 'react-dom'; + +import fs from 'fs'; import * as commutable from 'commutable'; import Notebook from './components/Notebook'; -require.extensions['.ipynb'] = require.extensions['.json']; -const notebook = require('../test-notebooks/mul...
fac501d6b7277937806a84b25a6ab79d0d3e50a1
src/js/components/session-list/index.jsx
src/js/components/session-list/index.jsx
import debug from "debug"; import React, { Component, PropTypes } from "react"; import Session from "../session"; const log = debug("schedule:components:session-list"); const MARGIN = 60 * 5 * 1000; // Display started events for 5 mins export class SessionList extends Component { render() { const { sessi...
import debug from "debug"; import React, { Component, PropTypes } from "react"; import Session from "../session"; const log = debug("schedule:components:session-list"); const MARGIN = 60 * 5 * 1000; // Display started events for 5 mins export class SessionList extends Component { render() { const { sessi...
Fix proptypes had incorrect propnames
Fix proptypes had incorrect propnames
JSX
mit
orangecms/schedule,nikcorg/schedule,orangecms/schedule,nikcorg/schedule,orangecms/schedule,nikcorg/schedule
--- +++ @@ -30,7 +30,7 @@ } SessionList.propTypes = { - getState: PropTypes.func.isRequired + sessions: PropTypes.array.isRequired }; export default SessionList;
1d7bc7d8c26e0ad1cb60735281ab78f7ea4da824
src/request/components/request-detail-panel-messages.jsx
src/request/components/request-detail-panel-messages.jsx
'use strict'; var _ = require('lodash'); var React = require('react'); var PanelGeneric = require('./request-detail-panel-generic'); module.exports = React.createClass({ render: function () { return ( <table> <thead> <th>Type</th> <th>Ind...
'use strict'; var _ = require('lodash'); var React = require('react'); var PanelGeneric = require('./request-detail-panel-generic'); module.exports = React.createClass({ render: function () { return ( <table> <thead> <th>Type</th> <th>Det...
Update layout of message tab
Update layout of message tab
JSX
unknown
avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype
--- +++ @@ -10,9 +10,7 @@ <table> <thead> <th>Type</th> - <th>Index</th> - <th>Abstract</th> - <th>Payload</th> + <th>Details</th> </thead> {_.map(this.props...
c2d655db800bf57c97d10dcf609b118098d8f886
app/components/Quiz.jsx
app/components/Quiz.jsx
import React from 'react' import { Field, reduxForm } from 'redux-form' const renderError = ({ meta: { touched, error } }) => touched && error ? <span>{error}</span> : false const required = value => (value || value === 0) ? undefined : 'Required' const Quiz = ({ handleSubmit, quiz, gradeQuiz, quizForm }) => { ...
import React from 'react' import { Field, reduxForm } from 'redux-form' const renderError = ({ meta: { touched, error } }) => touched && error ? <span>{error}</span> : false const required = value => (value || value === 0) ? undefined : 'Required' const Quiz = ({ handleSubmit, quiz, gradeQuiz, quizForm }) => { ...
Add description to quiz page
Add description to quiz page
JSX
mit
galxzx/pegma,galxzx/pegma,galxzx/pegma
--- +++ @@ -9,9 +9,9 @@ const Quiz = ({ handleSubmit, quiz, gradeQuiz, quizForm }) => { - console.log('form data', quizForm) return ( <form className="quiz" onSubmit={handleSubmit(gradeQuiz)}> + <p>{ quiz.description }</p> {quiz.questions.map((question, indexNum) => { let questionNu...
4eb08806383e14a7f7715d7f464c8271e6e2d73e
app/assets/javascripts/components/CommentsSection.jsx
app/assets/javascripts/components/CommentsSection.jsx
class CommentsSection extends React.Component { constructor(props) { super(props); this.state = { comments: this.props.current_comments }; } saveNewComment(e) { e.preventDefault(); let $form = $(e.target); $.post(`/grants/${this.props.grant.id}/add_comment`, { body: $form.find("#gc-text").val(...
class CommentsSection extends React.Component { constructor(props) { super(props); this.state = { comments: this.props.current_comments }; } saveNewComment(e) { e.preventDefault(); let $form = $(e.target); let $gcText = $form.find("#gc-text"); $.post(`/grants/${this.props.grant.id}/add_com...
Clear comment textarea after saving
Clear comment textarea after saving
JSX
mit
samerbuna/Grantzilla,samerbuna/Grantzilla,on-site/Grantzilla,on-site/Grantzilla,on-site/Grantzilla,samerbuna/Grantzilla
--- +++ @@ -6,11 +6,13 @@ saveNewComment(e) { e.preventDefault(); let $form = $(e.target); - $.post(`/grants/${this.props.grant.id}/add_comment`, { body: $form.find("#gc-text").val() }) + let $gcText = $form.find("#gc-text"); + $.post(`/grants/${this.props.grant.id}/add_comment`, { body: $gcText...
478c92671329d9acb912497d605799799a76174f
app/components/Error404.jsx
app/components/Error404.jsx
'use strict'; import React from 'react'; const Error404 = () => ( <div className="error-wrapper"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQAQMAAADdiHD7AAAABlBMVEUAAABTU1OoaSf/AAAAAXRSTlMAQObYZgAAAFJJREFUeF7t0cENgDAMQ9FwYgxG6WjpaIzCCAxQxVggFuDiCvlLOeRdHR9yzjncHVoq3npu+wQUrUuJHylSTmBa...
'use strict'; import React from 'react'; import { Link } from 'react-router'; import ErrorFace from '../../public/images/error_face.svg'; const Error404 = () => ( <div className="error-wrapper"> <img src={ ErrorFace } alt="Error 404 Frowny Face Image Blob (Gray)." /> <div> <h3>404 Error.....
Build out helpful support content for 404 errors
feat: Build out helpful support content for 404 errors
JSX
mit
IsenrichO/DaviePoplarCapital,IsenrichO/DaviePoplarCapital
--- +++ @@ -1,18 +1,21 @@ 'use strict'; import React from 'react'; +import { Link } from 'react-router'; + +import ErrorFace from '../../public/images/error_face.svg'; const Error404 = () => ( <div className="error-wrapper"> <img - src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQAQMAAAD...
a3fa65f76c32ec53ba857c0f1e5de674d8e32a3c
app/javascript/app/components/my-climate-watch/viz-creator/components/charts/line/line-component.jsx
app/javascript/app/components/my-climate-watch/viz-creator/components/charts/line/line-component.jsx
import React from 'react'; import PropTypes from 'prop-types'; import { LineChart, Line, XAxis, YAxis, CartesianGrid, ResponsiveContainer } from 'recharts'; const ChartLine = ({ width, height, className, config }) => ( <ResponsiveContainer className={className} width={width} height={height}> <LineCh...
import React from 'react'; import PropTypes from 'prop-types'; import { LineChart, Line, XAxis, YAxis, CartesianGrid, ResponsiveContainer, Tooltip } from 'recharts'; import CustomTooltip from '../tooltip'; const ChartLine = ({ width, height, className, config }) => ( <ResponsiveContainer className={c...
Add tooltip to line chart
Add tooltip to line chart
JSX
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
--- +++ @@ -7,8 +7,11 @@ XAxis, YAxis, CartesianGrid, - ResponsiveContainer + ResponsiveContainer, + Tooltip } from 'recharts'; + +import CustomTooltip from '../tooltip'; const ChartLine = ({ width, height, className, config }) => ( <ResponsiveContainer className={className} width={width} height={h...
78d2bef38d109329ddd772d9b84fea7e5a3c8c6f
packages/lesswrong/components/recommendations/RecommendationsList.jsx
packages/lesswrong/components/recommendations/RecommendationsList.jsx
import React from 'react'; import { Components, registerComponent } from 'meteor/vulcan:core'; import { getFragment } from 'meteor/vulcan:core'; import gql from 'graphql-tag'; import { graphql } from 'react-apollo'; import withUser from '../common/withUser'; const withRecommendations = component => { const recommend...
import React from 'react'; import { Components, registerComponent } from 'meteor/vulcan:core'; import { getFragment } from 'meteor/vulcan:core'; import gql from 'graphql-tag'; import { graphql } from 'react-apollo'; import withUser from '../common/withUser'; const withRecommendations = component => { const recommend...
Add message when there are no more recommendations
Add message when there are no more recommendations
JSX
mit
Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope
--- +++ @@ -39,7 +39,10 @@ if (recommendationsLoading || !recommendations) return <Components.PostsLoading/> - return <div>{recommendations.map(post => <PostsItem2 post={post} key={post._id} currentUser={currentUser}/>)}</div> + return <div> + {recommendations.map(post => <PostsItem2 post={post} key=...
085ee8c27f61ee8af6a68bb4c6567cf1eea5ffe9
__tests__/MenuItem.test.jsx
__tests__/MenuItem.test.jsx
// don"t mock our CUT or components it depends on jest.dontMock("../src/components/MenuItem"); import React from "react"; import ReactDOM from "react-dom"; import TestUtils from "react-addons-test-utils"; // TODO: move this to es6 style import when its implemented in jest const MenuItem = require("../src/components/M...
// don"t mock our CUT or components it depends on jest.dontMock("../src/components/MenuItem"); import React from "react"; import ReactDOM from "react-dom"; import TestUtils from "react-addons-test-utils"; // TODO: move this to es6 style import when its implemented in jest const MenuItem = require("../src/components/M...
Test to ensure that click events are fired for Menu items
Test to ensure that click events are fired for Menu items
JSX
mit
signal/sprinkles-ui,signal/sprinkles-ui
--- +++ @@ -10,7 +10,7 @@ describe("MenuItem", () => { - it("Renders a MenuItem", () => { + it("Does render a MenuItem", () => { const text = "howdy"; // Render a MenuItem with no style @@ -25,4 +25,18 @@ }); + it("Does trigger an event when clicked", (done) => { + function clickEvent() ...
093a5d0517ddd480efa456f9726f6fb17099e885
app/components/LoggedInUser/UserLanguageSelector.jsx
app/components/LoggedInUser/UserLanguageSelector.jsx
import React from 'react' import LanguageSelector from '../App/LanguageSelector' import i18n from '../../i18n/i18n' import { withLoggedInUser } from './UserProvider' import { updateUserInfo } from '../../API/http_api/current_user' /** * Updates the locale for loggedInUser, notify i18n to refresh the * interface. */...
import React from 'react' import LanguageSelector from '../App/LanguageSelector' import i18n from '../../i18n/i18n' import { withLoggedInUser } from './UserProvider' import { updateUserInfo } from '../../API/http_api/current_user' /** * Updates the locale for loggedInUser, notify i18n to refresh the * interface. */...
Save locale in API when changing it
fix(LanguageSelector): Save locale in API when changing it
JSX
agpl-3.0
CaptainFact/captain-fact-frontend,CaptainFact/captain-fact-frontend,CaptainFact/captain-fact-frontend
--- +++ @@ -23,7 +23,7 @@ handleChange={locale => { i18n.changeLanguage(locale) if (isAuthenticated) { - updateUserInfo.then(user => { + return updateUserInfo({ locale }).then(user => { updateLoggedInUser(user) }) }
076f6a061316bafbc5795882cf9ce04034cc2530
client/src/components/Nav.jsx
client/src/components/Nav.jsx
import React from 'react'; import { Link } from 'react-router-dom'; import { Tabs, Tab } from 'material-ui/Tabs'; class Nav extends React.Component { constructor(props) { super(props); this.state = { open: false, page: this.props.page, value: 0 }; } componentDidMount() { if (t...
import React from 'react'; import { Link } from 'react-router-dom'; import { Tabs, Tab } from 'material-ui/Tabs'; class Nav extends React.Component { constructor(props) { super(props); this.state = { open: false, page: this.props.page, value: 0 }; } componentDidMount() { if (t...
Change to initialize without selected tab for rendering on the HomePage
Change to initialize without selected tab for rendering on the HomePage
JSX
mit
SentinelsOfMagic/SentinelsOfMagic
--- +++ @@ -21,6 +21,10 @@ } else if (this.state.page === 'shop') { this.setState({ value: 1 + }); + } else if (this.state.page === 'home') { + this.setState({ + value: -1 }); } }
75252422a6a1a70d596422bd2d253b4b7234169a
client/components/index.jsx
client/components/index.jsx
var React = require('react'); var ReactDOM = require('react-dom'); var sharedb = require('sharedb/lib/client'); var App = require('./App.jsx'); var Init = require('./initdoc'); /* global window, document; */ // Open WebSocket connection to ShareDB server // let connection = new sharedb.Connection( // new WebSocket(...
var React = require('react'); var ReactDOM = require('react-dom'); var sharedb = require('sharedb/lib/client'); var App = require('./App.jsx'); var Init = require('./initdoc'); /* global window, document; */ // Open WebSocket connection to ShareDB server let connection = new sharedb.Connection( new WebSocket('ws://...
Revert WSS change from the last successful Heroku commit
Revert WSS change from the last successful Heroku commit
JSX
mit
venugos/sharegeom,venugos/sharegeom
--- +++ @@ -7,12 +7,12 @@ /* global window, document; */ // Open WebSocket connection to ShareDB server -// let connection = new sharedb.Connection( -// new WebSocket('ws://' + window.location.host)); +let connection = new sharedb.Connection( + new WebSocket('ws://' + window.location.host)); // Use this whe...
ee72c4623a1cd8148d9445d5bda833e45f0bb122
manoseimas/compatibility_test/client/app/TestView/Topic/Arguments/index.jsx
manoseimas/compatibility_test/client/app/TestView/Topic/Arguments/index.jsx
import React from 'react' import styles from './styles.css' const Arguments = (props) => <div className={styles.arguments}> <div className={styles.box}> <div className={styles['positive-head']}>Už</div> {props.arguments.map(argument => { if (argument.supporting) ...
import React from 'react' import styles from './styles.css' const Arguments = (props) => <div className={styles.arguments}> <div className={styles.box}> <div className={styles['positive-head']}>Už</div> {props.arguments.map(argument => { if (argument.supporting) ...
Add key for iterator items
Add key for iterator items
JSX
agpl-3.0
ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt
--- +++ @@ -7,7 +7,7 @@ <div className={styles['positive-head']}>Už</div> {props.arguments.map(argument => { if (argument.supporting) - return <div className={styles.argument}> + return <div className={styles.argument} key={argument.id}>...
9cf27c966b3aecb251149c71a26eadc58f0d7dca
client/app/bundles/RentersRights/components/ResourceIndexItem.jsx
client/app/bundles/RentersRights/components/ResourceIndexItem.jsx
import React from 'react'; export default class ResourceIndexItem extends React.Component { constructor(props) { super(props); } render() { const { organization, phone, email, website, region, description, address, } = this.props.resource; return ( ...
import React from 'react'; export default class ResourceIndexItem extends React.Component { constructor(props) { super(props); } render() { const { organization, phone, email, website, region, description, address, } = this.props.resource; return ( ...
Add target=_blank to a tags to open link in new window
Add target=_blank to a tags to open link in new window
JSX
mit
codeforsanjose/renters-rights,codeforsanjose/renters-rights,codeforsanjose/renters-rights
--- +++ @@ -18,7 +18,7 @@ return ( <div> - <a href={website}><h3>{organization}</h3></a> + <a href={website} target="_blank"><h3>{organization}</h3></a> <p>{description}</p> <p>Contact: </p> <p><span className="glyphicon glyphicon-earphone"></span> Phone: {phon...
3690fff3f528cd6e28a2f6eaf19a893ccb2f79db
html.jsx
html.jsx
import React from 'react' import DocumentTitle from 'react-document-title' import { link } from 'gatsby-helpers' import { TypographyStyle } from 'utils/typography' module.exports = React.createClass({ propTypes () { return { title: React.PropTypes.string, } }, render () { let title = Document...
import React from 'react' import DocumentTitle from 'react-document-title' import { link } from 'gatsby-helpers' import { TypographyStyle } from 'utils/typography' module.exports = React.createClass({ propTypes () { return { title: React.PropTypes.string, } }, render () { let title = Document...
Add link to styles.css on production builds
Add link to styles.css on production builds
JSX
mit
ni-tta/irc,dearwish/gatsby-starter-clean,kepatopoc/gatsby-starter-clean,TasGuerciMaia/tasguercimaia.github.io,MeganKeesee/personal-site,peterqiu1997/irc,InnoD-WebTier/irc,roslaneshellanoo/gatsby-starter-clean,jmcorona/jmcorona-netlify,jmcorona/jmcorona-netlify,benruehl/gatsby-kruemelkiste,sarahxy/irc,MeganKeesee/person...
--- +++ @@ -17,6 +17,11 @@ title = this.props.title } + let cssLink + if (process.env.NODE_ENV === 'production') { + cssLink = <link rel="stylesheet" href={link('/styles.css')} /> + } + return ( <html lang="en"> <head> @@ -29,6 +34,7 @@ <title>{title}</title...
35b2d2d3ecf1a0e764c070335f6af743c66afae8
client/components/App.jsx
client/components/App.jsx
import React from 'react'; import ReactDom from 'react-dom'; import { Router, Route, IndexRoute, browserHistory } from 'react-router'; import MainLayout from './main-layout/Mainlayout.jsx'; import HomeView from './home-view/HomeView.jsx'; import RecordView from './record-view/RecordView.jsx'; import SessionsView from ...
import React from 'react'; import ReactDom from 'react-dom'; import { Router, Route, IndexRoute, browserHistory } from 'react-router'; import MainLayout from './main-layout/MainLayout.jsx'; import HomeView from './home-view/HomeView.jsx'; import RecordView from './record-view/RecordView.jsx'; import SessionsView from ...
Correct case sensitivity on Main Layout component import
Correct case sensitivity on Main Layout component import
JSX
mit
chkakaja/sentimize,chkakaja/sentimize,formidable-coffee/masterfully,formidable-coffee/masterfully
--- +++ @@ -2,7 +2,7 @@ import ReactDom from 'react-dom'; import { Router, Route, IndexRoute, browserHistory } from 'react-router'; -import MainLayout from './main-layout/Mainlayout.jsx'; +import MainLayout from './main-layout/MainLayout.jsx'; import HomeView from './home-view/HomeView.jsx'; import RecordView f...
43e058602454ffdc2838e4bb8866a9a908a372eb
app/components/date-list/index.jsx
app/components/date-list/index.jsx
require("./date-list.styl") import React from "react" import {COMMON_DATE} from "../../resources/date-formats" function renderDayListItem (day, i) { return <li key={i}> {this.formatDate(day)} </li> } export default class DateList extends React.Component { formatDate(date) { return date.format(COMMON_DA...
require("./date-list.styl") import React from "react" import {COMMON_DATE} from "../../resources/date-formats" function renderDayListItem (day, i) { return <li className="day-list-item" key={i}> {this.formatDate(day)} </li> } export default React.createClass({ formatDate(date) { return date.date.format...
Replace hide and reveal buttons with a single toggle button.
Replace hide and reveal buttons with a single toggle button. Debug add-item to cycle properly through the current day index.
JSX
unlicense
babadoozep/ema,babadoozep/ema
--- +++ @@ -4,25 +4,27 @@ import {COMMON_DATE} from "../../resources/date-formats" function renderDayListItem (day, i) { - return <li key={i}> + return <li className="day-list-item" key={i}> {this.formatDate(day)} </li> } -export default class DateList extends React.Component { +export default React....
d1229c841fc129b568b2cb20e16d9d684a950103
app/assets/javascripts/scorebook/progress_reports/export_csv_modal.jsx
app/assets/javascripts/scorebook/progress_reports/export_csv_modal.jsx
"use strict"; EC.ExportCsvModal = React.createClass({ propTypes: { email: React.PropTypes.string.isRequired }, render: function() { return ( <div className="modal fade"> <div className="modal-dialog"> <div className="modal-content"> <div className="modal-header"> ...
"use strict"; EC.ExportCsvModal = React.createClass({ propTypes: { email: React.PropTypes.string }, render: function() { return ( <div className="modal fade"> <div className="modal-dialog"> <div className="modal-content"> <div className="modal-header"> <...
Fix React JS console warning for missing email prop
Fix React JS console warning for missing email prop
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
--- +++ @@ -2,7 +2,7 @@ EC.ExportCsvModal = React.createClass({ propTypes: { - email: React.PropTypes.string.isRequired + email: React.PropTypes.string }, render: function() {
3de87d726efd4a735201eb3e1ec0705550cc21df
webapp/index.jsx
webapp/index.jsx
import React from 'react'; import {Router, browserHistory} from 'react-router'; import {render} from 'react-dom'; import {Provider} from 'react-redux'; import {setAuth} from './actions/auth'; import routes from './routes'; import store from './store'; import 'react-select/dist/react-select.css'; import './index.css...
import React from 'react'; import {Router, browserHistory} from 'react-router'; import {render} from 'react-dom'; import {Provider} from 'react-redux'; import {setAuth} from './actions/auth'; import routes from './routes'; import store from './store'; import 'react-select/dist/react-select.css'; import './index.css...
Remove unused light build of syntax highlighter
fix: Remove unused light build of syntax highlighter
JSX
apache-2.0
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
--- +++ @@ -24,10 +24,9 @@ } } -import {registerLanguage} from 'react-syntax-highlighter/dist/light'; -import diff from 'react-syntax-highlighter/dist/languages/diff'; - -registerLanguage('diff', diff); +// import {registerLanguage} from 'react-syntax-highlighter/dist/light'; +// import diff from 'react-syntax-...
088f55774042fdce45d69ad563b5609d2c9ca0ab
zucchini-ui-frontend-react/src/scenario/components/StepAttachments.jsx
zucchini-ui-frontend-react/src/scenario/components/StepAttachments.jsx
import PropTypes from 'prop-types'; import React from 'react'; import ListGroup from 'react-bootstrap/lib/ListGroup'; import ListGroupItem from 'react-bootstrap/lib/ListGroupItem'; import PanelWithTitle from '../../ui/components/PanelWithTitle'; export default class StepAttachments extends React.PureComponent { b...
import PropTypes from 'prop-types'; import React from 'react'; import ListGroup from 'react-bootstrap/lib/ListGroup'; import ListGroupItem from 'react-bootstrap/lib/ListGroupItem'; import PanelWithTitle from '../../ui/components/PanelWithTitle'; export default class StepAttachments extends React.PureComponent { b...
Fix backend URI on attachments
Fix backend URI on attachments
JSX
mit
pgentile/tests-cucumber,pgentile/tests-cucumber,pgentile/zucchini-ui,pgentile/tests-cucumber,pgentile/zucchini-ui,pgentile/tests-cucumber,pgentile/zucchini-ui,pgentile/zucchini-ui,pgentile/zucchini-ui,jeremiemarc/zucchini-ui,jeremiemarc/zucchini-ui,jeremiemarc/zucchini-ui,jeremiemarc/zucchini-ui
--- +++ @@ -11,7 +11,7 @@ buildUrlForAttachment = (attachmentId) => { const { scenarioId } = this.props; // TODO Find a better way to build the URL - return `${configuration.ui.backendBaseUri}/api/scenarii/${scenarioId}/attachments/${attachmentId}`; + return `${configuration.backendBaseUri}/api/sce...
f9210012377e5ec21d06abb2d7ae3a6637b6b1d6
src/main.jsx
src/main.jsx
import 'babel-polyfill' import './styles/main' import React from 'react' import { render } from 'react-dom' import { I18n } from './lib/I18n' import App from './components/App' const context = window.context const lang = document.documentElement.getAttribute('lang') || 'en' document.addEventListener('DOMContentLoa...
import 'babel-polyfill' import './styles/main' import React from 'react' import { render } from 'react-dom' import { I18n } from './lib/I18n' import App from './components/App' const context = window.context const lang = document.documentElement.getAttribute('lang') || 'en' document.addEventListener('DOMContentLoa...
Add cozy bar and cozy client
Add cozy bar and cozy client
JSX
agpl-3.0
Gara64/Sharotronic,Gara64/Sharotronic
--- +++ @@ -12,29 +12,20 @@ const lang = document.documentElement.getAttribute('lang') || 'en' document.addEventListener('DOMContentLoaded', () => { - const context = window.context - const root = document.querySelector('[role=application]') - const data = root.dataset - + const data = document.queryS...
a226dbf81adf06134e3404a3f9d6ce3ffac089ac
BlazarUI/app/scripts/components/shared/ModuleSelectWrapper.jsx
BlazarUI/app/scripts/components/shared/ModuleSelectWrapper.jsx
import React, {Component, PropTypes} from 'react'; import Select from 'react-select'; class ModuleSelectWrapper extends Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); } handleChange(value) { // react-select returns an empty string if nothing is sele...
import React, {Component, PropTypes} from 'react'; import Select from 'react-select'; class ModuleSelectWrapper extends Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); } handleChange(value) { // react-select returns an empty string if nothing is sele...
Fix resetting of build now module select when branch status gets polled
Fix resetting of build now module select when branch status gets polled
JSX
apache-2.0
HubSpot/Blazar,HubSpot/Blazar,HubSpot/Blazar,HubSpot/Blazar
--- +++ @@ -33,7 +33,7 @@ clearAllText="None" noResultsText="All modules have been selected." multi={true} - value={this.props.selectedModuleIds} + value={this.props.selectedModuleIds.join(',')} options={this.createModuleSelectOptions(this.props.modules)} ...
34e1c121c4d6348b08352624e42cd16db3020d83
test/specs/StarterComponent.jsx
test/specs/StarterComponent.jsx
import {StarterComponent} from '../src'; import React from 'react'; import ReactTestUtils from 'react-addons-test-utils'; describe('StarterComponent', function() { it('should be a function', function() { expect(StarterComponent).to.be.a('function'); }); it('should be a React component', function() ...
import {StarterComponent} from '../../src'; import React from 'react'; import ReactTestUtils from 'react-addons-test-utils'; describe('StarterComponent', function() { it('should be a function', function() { expect(StarterComponent).to.be.a('function'); }); it('should be a React component', function...
Fix import path in test
Fix import path in test
JSX
mit
motiz88/react-dygraphs,motiz88/yet-another-react-component-starter
--- +++ @@ -1,4 +1,4 @@ -import {StarterComponent} from '../src'; +import {StarterComponent} from '../../src'; import React from 'react'; import ReactTestUtils from 'react-addons-test-utils';
936786f816e16d00a2a251a780bd2c6cafbae3af
src/components/Windspeed.jsx
src/components/Windspeed.jsx
import React from 'react'; import { connect } from 'react-redux'; import LineChart from 'LineChart'; import { selectConditions } from 'selectConditionsActions'; class Windspeed extends React.Component { constructor(props) { super(props); this.state = {selectedInfo: {}}; this.displayConditions = this.dis...
import React from 'react'; import { connect } from 'react-redux'; import LineChart from 'LineChart'; import { selectConditions } from 'selectConditionsActions'; class Windspeed extends React.Component { constructor(props) { super(props); this.state = {selectedInfo: {}}; this.displayConditions = this.dis...
Fix mouse events for windspeeds
Fix mouse events for windspeeds
JSX
mit
JavierPDev/Weather-D3,JavierPDev/Weather-D3
--- +++ @@ -32,8 +32,8 @@ <h1>5 Day Windspeed</h1> <LineChart data={barData} - onBarClick={this.displayConditions} - onBarMouseenter={this.displayConditions} + onDotClick={this.displayConditions} + onDotMouseenter={this.displayConditions} yAx...
da4d325a6ee95a694acfa45fa5d3e11ad2428ece
app/javascript/app/components/ndcs/ndcs-search-map/ndcs-search-map-component.jsx
app/javascript/app/components/ndcs/ndcs-search-map/ndcs-search-map-component.jsx
import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import Map from 'components/map'; import styles from './ndcs-search-map-styles.scss'; const NDCSearchMap = props => ( <div className={styles.mapWrapper}> {!props.loading && ( <div className={styles.countriesCount}> {props....
import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import Map from 'components/map'; import newMapTheme from 'styles/themes/map/map-new-zoom-controls.scss'; import styles from './ndcs-search-map-styles.scss'; const NDCSearchMap = props => ( <div className={styles.mapWrapper}> {!props.lo...
Use new buttons on NDC search map
Use new buttons on NDC search map
JSX
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
--- +++ @@ -1,6 +1,7 @@ import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import Map from 'components/map'; +import newMapTheme from 'styles/themes/map/map-new-zoom-controls.scss'; import styles from './ndcs-search-map-styles.scss'; const NDCSearchMap = props => ( @@ -27,6 +28,7 @@ ...
bb244714de1892ae67b991ca5f2b742eab262362
_health-care/_js/components/personal-information/VAInformationSection.jsx
_health-care/_js/components/personal-information/VAInformationSection.jsx
import React from 'react'; import ErrorableCheckbox from '../form-elements/ErrorableCheckbox'; class VaInformationSection extends React.Component { render() { return ( <div className="row"> <div className="small-12 columns"> <h4>Veteran</h4> <p> Please review the fo...
import React from 'react'; import ErrorableCheckbox from '../form-elements/ErrorableCheckbox'; class VaInformationSection extends React.Component { render() { return ( <div className="row"> <div className="small-12 columns"> <h4>Veteran</h4> <p> Please review the fo...
Make VA information checkboxes display conditionally
Make VA information checkboxes display conditionally Fixed based on PR comments.
JSX
cc0-1.0
department-of-veterans-affairs/vets-website,department-of-veterans-affairs/vets-website
--- +++ @@ -18,16 +18,23 @@ label="Are you VA Service Connected 50% to 100% Disabled?" checked={this.props.data.isVaServiceConnected} onValueChange={(update) => {this.props.onStateChange('isVaServiceConnected', update);}}/> - - <ErrorableCheckbox - la...
96d51e11c5ba0e0ae36451af7bfab339551f1a93
client/auth/containers/AuthMenu.jsx
client/auth/containers/AuthMenu.jsx
import React, { Component, PropTypes } from "react"; import { connect } from "react-redux"; import { Link } from "react-router"; import { logout } from "techbikers/auth/actions"; import { getCurrentPathname } from "techbikers/app/selectors"; import { getAuthenticatedUserId } from "techbikers/auth/selectors"; const ma...
import React, { Component, PropTypes } from "react"; import { connect } from "react-redux"; import { Link } from "react-router"; import styled from "styled-components"; import { logout } from "techbikers/auth/actions"; import { getCurrentPathname } from "techbikers/app/selectors"; import { getAuthenticatedUserId } fro...
Introduce margin between Log out and Profile links
Introduce margin between Log out and Profile links
JSX
mit
Techbikers/techbikers,mwillmott/techbikers,mwillmott/techbikers,Techbikers/techbikers,mwillmott/techbikers,Techbikers/techbikers,mwillmott/techbikers,Techbikers/techbikers
--- +++ @@ -1,6 +1,7 @@ import React, { Component, PropTypes } from "react"; import { connect } from "react-redux"; import { Link } from "react-router"; +import styled from "styled-components"; import { logout } from "techbikers/auth/actions"; import { getCurrentPathname } from "techbikers/app/selectors"; @@ -...
19c5132ac5409a25cf7112d25227e01f080f3c97
ui/component/common/status-bar.jsx
ui/component/common/status-bar.jsx
// @flow import React from 'react'; import { ipcRenderer } from 'electron'; import classnames from 'classnames'; type Props = {}; type State = { hoverUrl: string, show: boolean, }; class StatusBar extends React.PureComponent<Props, State> { constructor() { super(); this.state = { hoverUrl: '', ...
// @flow import React from 'react'; import { ipcRenderer } from 'electron'; import classnames from 'classnames'; type Props = {}; type State = { hoverUrl: string, show: boolean, }; class StatusBar extends React.PureComponent<Props, State> { constructor() { super(); this.state = { hoverUrl: '', ...
Fix unencoded StatusBar on Desktop
Fix unencoded StatusBar on Desktop
JSX
mit
lbryio/lbry-app,lbryio/lbry-app
--- +++ @@ -41,7 +41,7 @@ render() { const { hoverUrl, show } = this.state; - return <div className={classnames('status-bar', { visible: show })}>{hoverUrl}</div>; + return <div className={classnames('status-bar', { visible: show })}>{decodeURI(hoverUrl)}</div>; } }
fefbfc4a425fa9feeeab23d9c0b8151224e875b8
app/assets/javascripts/components/UserShowComponents/UserWatchingItem.js.jsx
app/assets/javascripts/components/UserShowComponents/UserWatchingItem.js.jsx
var UserWatchingItem = React.createClass({ render: function(){ return ( <div className="event"> <div className="label"> <a href={"/issues/"+this.props.id} > <img src={this.props.image_url} /> </a> </div> <div className="content"> <div className="summary"> ...
var UserWatchingItem = React.createClass({ render: function(){ return ( <div className="event"> <div className="label"> <a href={"/issues/"+this.props.id} > <img src={this.props.image_url} /> </a> </div> <div className="content"> <div className="summary"> ...
Fix bug on user watch feed that now will properly route to the issue in link
Fix bug on user watch feed that now will properly route to the issue in link
JSX
mit
TimCannady/fixstarter,ShadyLogic/fixstarter,TimCannady/fixstarter,ShadyLogic/fixstarter,ShadyLogic/fixstarter,TimCannady/fixstarter
--- +++ @@ -9,7 +9,7 @@ <div className="content"> <div className="summary"> - <a href={"/issues/"+this.props.id} > {this.props.title} </a> + <a href={"/issues/"+this.props.issue_id} > {this.props.title} </a> <div className="date"> <b>Stat...
2c615a9106a056446f6332ce920e9592487ea50a
app/javascript/app/components/my-climate-watch/viz-creator/components/charts/tooltip/tooltip-component.jsx
app/javascript/app/components/my-climate-watch/viz-creator/components/charts/tooltip/tooltip-component.jsx
import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { themr } from 'react-css-themr'; import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss'; const Tooltip = ({ label, tooltip }) => ( <div className={theme.tooltip}> <div className={theme.tooltipHeader}>...
import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { themr } from 'react-css-themr'; import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss'; const Tooltip = ({ label, tooltip, payload }) => ( <div className={theme.tooltip}> <div className={theme.toolti...
Add payload to render values
Add payload to render values
JSX
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
--- +++ @@ -5,13 +5,13 @@ import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss'; -const Tooltip = ({ label, tooltip }) => ( +const Tooltip = ({ label, tooltip, payload }) => ( <div className={theme.tooltip}> <div className={theme.tooltipHeader}> <span className={cx(theme.labelName, th...
2a4fe9fdc22ad1ad6b87055db1e67f0add1bc985
app/javascript/app/components/my-climate-watch/my-account/my-account-component.jsx
app/javascript/app/components/my-climate-watch/my-account/my-account-component.jsx
import React from 'react'; import PropTypes from 'prop-types'; const MyAccount = ({ user }) => ( <div> <h1>User details</h1> <span>Email:</span> <span>{user.email}</span> </div> ); MyAccount.propTypes = { user: PropTypes.object.isRequired }; export default MyAccount;
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import TextInput from 'components/text-input'; import Button from 'components/button'; import theme from 'styles/themes/input/text-input-theme.scss'; import styles from './my-account-styles.scss'; class MyAccount extends Component { const...
Add new fields to account view
Add new fields to account view
JSX
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
--- +++ @@ -1,16 +1,86 @@ -import React from 'react'; +import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import TextInput from 'components/text-input'; +import Button from 'components/button'; -const MyAccount = ({ user }) => ( - <div> - <h1>User details</h1> - <span>Email:</spa...
1764c5022736565ce0c5998022556d069f3ad513
client/components/Article.jsx
client/components/Article.jsx
import React, { Component } from 'react'; import { Row, Col, Jumbotron } from 'react-bootstrap'; const Article = ({link, description, title, display_date}) => { description = description && description.replace(/<\/?[^>]+(>|$)/g, ""); return( <article> <h4> <a href={link} target="_blank">{title...
import React, { Component } from 'react'; const scrubText = (text) => text && text.replace(/(<\/?[^>]+(>|$))|(&(.*?);)/g, ""); const Article = ({link, description, title, display_date}) => { return( <article> <h4> <a href={link} target="_blank">{scrubText(title)}</a> &nbsp; <small>{displa...
Scrub article title and description Remove tags and character codes
Scrub article title and description Remove tags and character codes
JSX
mit
andy-j-d/simply-news-ui,andy-j-d/simply-news-ui
--- +++ @@ -1,18 +1,16 @@ import React, { Component } from 'react'; -import { Row, Col, Jumbotron } from 'react-bootstrap'; +const scrubText = (text) => text && text.replace(/(<\/?[^>]+(>|$))|(&(.*?);)/g, ""); const Article = ({link, description, title, display_date}) => { - - description = description && desc...
6bc463c83ee211ff00b3ad253cb77d6010ffbcb5
app/Routes.jsx
app/Routes.jsx
import React from 'react' import {Route, Redirect, IndexRoute} from 'react-router' import Layout from './layout/Layout.jsx' import Home from './pages/Home.jsx' import Login from './pages/Login.jsx' const Routes = ( <Route> <Route path="/" component={Layout}> <Redirect from="/" to="/home"/> ...
import React from 'react' import {Route, Redirect, IndexRoute} from 'react-router' import Layout from './layout/Layout.jsx' import Home from './pages/Home.jsx' import Counter from './pages/Counter.jsx' import Login from './pages/Login.jsx' const Routes = ( <Route> <Route path="/" component={Layout}> ...
Update routes for new component
Update routes for new component
JSX
agpl-3.0
mbrossard/go-experiments,mbrossard/go-experiments,mbrossard/go-experiments
--- +++ @@ -3,6 +3,7 @@ import Layout from './layout/Layout.jsx' import Home from './pages/Home.jsx' +import Counter from './pages/Counter.jsx' import Login from './pages/Login.jsx' const Routes = ( @@ -12,6 +13,9 @@ <IndexRoute component={Home}/> <Route path="home" component={Home}/...
7f1b4d7d70cf364448ea2e829a7ad8c48080a692
src/js/components/Tasks.jsx
src/js/components/Tasks.jsx
import React, { PropTypes } from 'react'; import Task from './Task.jsx'; const propTypes = { label: PropTypes.string.isRequired, tasks: PropTypes.array, }; export default class Tasks extends React.Component { render() { const tasks = this.props.tasks.map(task => <Task key={task.id} task={task} />); re...
import React, { PropTypes } from 'react'; import Task from './Task.jsx'; const propTypes = { label: PropTypes.string.isRequired, tasks: PropTypes.array, }; export default class Tasks extends React.Component { render() { const tasks = this.props.tasks.map(task => <Task key={task.id} task={task} />); co...
Change tasks div color by status
Change tasks div color by status
JSX
mit
tanaka0325/nippo-web,tanaka0325/nippo-web
--- +++ @@ -11,15 +11,38 @@ render() { const tasks = this.props.tasks.map(task => <Task key={task.id} task={task} />); + const clx = () => { + switch (this.props.label) { + case 'TODO': + return 'is-danger'; + case 'DOING': + return 'is-warning'; + case 'DONE':...
849663207caf4b55f8c54f0fa2b01f05952d54dd
client/components/NoteList.jsx
client/components/NoteList.jsx
import React from 'react'; // import SearchBar from './SearchBar.jsx'; // Eventually use searchbar inside browse notes? // Is styling better that way? import NoteItem from './NoteItem.jsx'; const NoteList = props => ( <div className="notes-list"> <ul> {props.notes.map(element => <NoteItem ...
import React from 'react'; // import SearchBar from './SearchBar.jsx'; // Eventually use searchbar inside browse notes? // Is styling better that way? import NoteItem from './NoteItem.jsx'; const NoteList = props => ( <div className="notes-list"> <ul> {props.notes.map(element => <NoteItem ...
Fix some linting errors with React proptypes
Fix some linting errors with React proptypes
JSX
mit
enchanted-spotlight/Plato,enchanted-spotlight/Plato
--- +++ @@ -25,7 +25,7 @@ NoteList.propTypes = { notes: React.PropTypes.arrayOf(React.PropTypes.object), - username: React.PropTypes.string + username: React.PropTypes.string, }; export default NoteList;
23eaf628e42251cc158d7591058d3ce5112d215c
client/src/HouseInventoryListItem.jsx
client/src/HouseInventoryListItem.jsx
import React from 'react'; class HouseInventoryListItem extends React.Component { constructor(props) { super(props); this.state = { item: this.props.item }; } render() { return ( <div> </div> ); } } export default HouseInventoryListItem;
import React from 'react'; class HouseInventoryListItem extends React.Component { constructor(props) { super(props); this.state = { item: this.props.item, needToRestock: this.props.item.need_to_restock, userId: this.props.item.user_id, username: '' }; } clickRestock(event) {...
Add basic conditional rendering for button clicks using dummy data
Add basic conditional rendering for button clicks using dummy data
JSX
mit
SentinelsOfMagic/SentinelsOfMagic
--- +++ @@ -5,15 +5,61 @@ super(props); this.state = { - item: this.props.item + item: this.props.item, + needToRestock: this.props.item.need_to_restock, + userId: this.props.item.user_id, + username: '' }; } + clickRestock(event) { + // post request to the db + t...
2d9281c9fa73231fb1c55d981bd2251c9ee2b669
client/src/houseInventory.jsx
client/src/houseInventory.jsx
import React from 'react'; import ReactDOM from 'react-dom'; import $ from 'jquery'; import HouseInventoryList from './HouseInventoryList.jsx'; class HouseInventory extends React.Component { constructor(props) { super(props); this.state({ items: [] }); } componentDidMount() { this.getItem...
import React from 'react'; import ReactDOM from 'react-dom'; import $ from 'jquery'; import HouseInventoryList from './HouseInventoryList.jsx'; import Nav from './Nav.jsx'; class HouseInventory extends React.Component { constructor(props) { super(props); this.state({ items: [] }); } component...
Change to import Nav component
Change to import Nav component
JSX
mit
SentinelsOfMagic/SentinelsOfMagic
--- +++ @@ -2,6 +2,7 @@ import ReactDOM from 'react-dom'; import $ from 'jquery'; import HouseInventoryList from './HouseInventoryList.jsx'; +import Nav from './Nav.jsx'; class HouseInventory extends React.Component { constructor(props) {
9693cbb26c6a94b6210267efe2a5dece9ad36f2b
js/Landing.jsx
js/Landing.jsx
const React = require('react') const { Link } = require('react-router') // stateless component // </> slash is necessary because it says don'tlook for closing tag // Lowercase says you want to use something native from React // Caps state a component you made // class is reserved in js, so we need to use className f...
const React = require('react') const { Link } = require('react-router') // stateless component // </> slash is necessary because it says don'tlook for closing tag // Lowercase says you want to use something native from React // Caps state a component you made // class is reserved in js, so we need to use className f...
Remove app container from landing
Remove app container from landing
JSX
mit
teatreelee/complete-react,teatreelee/complete-react
--- +++ @@ -9,13 +9,11 @@ // class is reserved in js, so we need to use className for css const Landing = () => ( - <div className='app-container'> <div className='home-info'> <h1 className='title'>svideo</h1> <input className='search' type='text' placeholder='Search' /> <Link to='/sear...