Merge pull request #3547 from LLK/smoke

Bring in hotfix changes from smoke
This commit is contained in:
Paul Kaplan authored and GitHub committed 2018-10-29 11:49:38 -04:00
commit 2c970fe366
3 files changed
+21 -2

No files matched your search

+16 -1
View File
@@ -35,6 +35,19 @@ class TipsLibrary extends React.PureComponent {
]);
}
handleItemSelect (item) {
/*
Support tutorials that require specific starter projects.
If a tutorial declares "requiredProjectId", check that the URL contains
it. If it is not, open a new page with this tutorial and project id.
TODO remove this at first opportunity. If this is still here after HOC2018,
blame Eric R. Andrew is also on record saying "this is temporary".
*/
if (item.requiredProjectId && window.location.href.indexOf(item.requiredProjectId) === -1) {
const urlParams = `?tutorial=${item.urlId}#${item.requiredProjectId}`;
return window.open(window.location.pathname + urlParams, '_blank');
}
this.props.onActivateDeck(item.id);
analytics.event({
category: 'library',
@@ -48,7 +61,9 @@ class TipsLibrary extends React.PureComponent {
id: id,
name: decksLibraryContent[id].name,
featured: true,
tags: decksLibraryContent[id].tags
tags: decksLibraryContent[id].tags,
urlId: decksLibraryContent[id].urlId,
requiredProjectId: decksLibraryContent[id].requiredProjectId
}));
if (!this.props.visible) return null;
+4 -1
View File
@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import {Provider} from 'react-redux';
import {createStore, combineReducers, compose} from 'redux';
import ConnectedIntlProvider from './connected-intl-provider.jsx';
import localesReducer, {initLocale, localesInitialState} from '../reducers/locales';
@@ -107,7 +108,9 @@ const AppStateHOC = function (WrappedComponent, localesOnly) {
} = this.props;
return (
<Provider store={this.store}>
<WrappedComponent {...componentProps} />
<ConnectedIntlProvider>
<WrappedComponent {...componentProps} />
</ConnectedIntlProvider>
</Provider>
);
}
+1
View File
@@ -248,6 +248,7 @@ export default {
id="gui.howtos.cartoon-network"
/>
),
requiredProjectId: '249143200',
img: libraryCartoonNetwork,
steps: [{
video: 'uz5oz5h9yg'