code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/userscript.user.js b/userscript.user.js @@ -17305,7 +17305,7 @@ var $$IMU_EXPORT$$;
if (domain === "live.staticflickr.com") {
// https://live.staticflickr.com/4741/buddyicons/70777296@N08_l.jpg
// https://live.staticflickr.com/4741/buddyicons/70777296@N08_r.jpg
- newsrc = src.replace(/(\/buddyicons\/+[0-9]+@N[0-9]+)(?:_l)?(\.[^/.]*)(?:[?#].*)$/, "$1_r$2");
+ newsrc = src.replace(/(\/buddyicons\/+[0-9]+@N[0-9]+)(?:_[slm])?(\.[^/.]*)(?:[?#].*)?$/, "$1_r$2");
if (newsrc !== src)
return newsrc;
}
| 7 |
diff --git a/src/components/contained-items-list/index.js b/src/components/contained-items-list/index.js @@ -13,7 +13,7 @@ import categoryData from '../../data/category-data.json';
const ContainedItemsList = ({item}) => {
const items = useSelector(selectAllItems);
- if(!item.canHoldItems){
+ if(!item.canHoldItems || (item.canHoldItems.length === 1 && item.canHoldItems[0] === '54009119af1c881c07000029')){
return null;
}
| 9 |
diff --git a/assets/src/utils/toggles.js b/assets/src/utils/toggles.js import parse from 'url-parse';
-// eslint-disable-next-line import/prefer-default-export
export const isWaitlistFeatureActive = () => {
const { query } = parse(window.location.href, true);
return 'waitlist' in query && query.waitlist === 'active';
};
+
+export default {
+ isWaitlistFeatureActive,
+};
| 0 |
diff --git a/src/lib/gundb/UserStorage.js b/src/lib/gundb/UserStorage.js @@ -50,8 +50,9 @@ class UserStorage {
async init() {
logger.debug('Initializing GunDB UserStorage')
- const username = await this.wallet.sign('GoodDollarUser')
- const password = await this.wallet.sign('GoodDollarPass')
+ //sign with different address so its not connected to main user address and there's no 1-1 link
+ const username = await this.wallet.sign('GoodDollarUser', 'gundb')
+ const password = await this.wallet.sign('GoodDollarPass', 'gundb')
const gunuser = global.gun.user()
return new Promise((res, rej) => {
gunuser.create(username, password, async userCreated => {
| 0 |
diff --git a/plugins/ColorFilters.js b/plugins/ColorFilters.js @@ -23,25 +23,19 @@ Phaser.Filter.ColorFilters = function (game) {
"void main(void) {",
"gl_FragColor = texture2D(uSampler, vTextureCoord);",
+ "if (gray != 0.0) {",
"gl_FragColor.rgb = mix(gl_FragColor.rgb, vec3(0.2126 * gl_FragColor.r + 0.7152 * gl_FragColor.g + 0.0722 * gl_FragColor.b), gray);",
+ "}",
+
+ "if (r_colorize != 1.0 || g_colorize != 1.0 || b_colorize != 1.0) {",
"gl_FragColor.rgb = vec3(r_colorize * gl_FragColor.r, g_colorize * gl_FragColor.g, b_colorize * gl_FragColor.b);",
+ "}",
- "const vec3 kRGBToYPrime = vec3 (0.299, 0.587, 0.114);",
- "const vec3 kRGBToI = vec3 (0.596, -0.275, -0.321);",
- "const vec3 kRGBToQ = vec3 (0.212, -0.523, 0.311);",
- "const vec3 kYIQToR = vec3 (1.0, 0.956, 0.621);",
- "const vec3 kYIQToG = vec3 (1.0, -0.272, -0.647);",
- "const vec3 kYIQToB = vec3 (1.0, -1.107, 1.704);",
- "float YPrime = dot (gl_FragColor.rgb, kRGBToYPrime);",
- "float I = dot (gl_FragColor.rgb, kRGBToI);",
- "float Q = dot (gl_FragColor.rgb, kRGBToQ);",
- "float hue = atan (Q, I);",
- "float chroma = sqrt (I * I + Q * Q);",
- "hue += hue_adjust;",
- "Q = chroma * sin (hue);",
- "I = chroma * cos (hue);",
- "vec3 yIQ = vec3 (YPrime, I, Q);",
- "gl_FragColor.rgb = vec3( dot (yIQ, kYIQToR), dot (yIQ, kYIQToG), dot (yIQ, kYIQToB) );",
+ "if (hue_adjust != 0.0) {",
+ "const vec3 k = vec3(0.57735, 0.57735, 0.57735);",
+ "float cosAngle = cos(hue_adjust);",
+ "gl_FragColor.rgb = vec3(gl_FragColor.rgb * cosAngle + cross(k, gl_FragColor.rgb) * sin(hue_adjust) + k * dot(k, gl_FragColor.rgb) * (1.0 - cosAngle));",
+ "}",
"}"
];
};
| 7 |
diff --git a/js/views/search/Search.js b/js/views/search/Search.js @@ -450,14 +450,14 @@ export default class extends baseVw {
}
clickSearchBtn() {
- this.setSearch({ q: this.getCachedEl('.js-searchInput').val(), p: 0 });
+ this.setSearch({ q: this.getCachedEl('.js-searchInput').val(), p: 0 }, { force: true });
recordEvent('Discover_ClickSearch');
recordEvent('Discover_Search', { type: 'click' });
}
onKeyupSearchInput(e) {
if (e.which === 13) {
- this.setSearch({ q: this.getCachedEl('.js-searchInput').val(), p: 0 });
+ this.setSearch({ q: this.getCachedEl('.js-searchInput').val(), p: 0 }, { force: true });
recordEvent('Discover_EnterKeySearch');
recordEvent('Discover_Search', { type: 'enterKey' });
}
| 11 |
diff --git a/home.scn b/home.scn "quaternion": [0, 0, 0, 1],
"scale": [1, 1, 1],
"start_url": "https://avaer.github.io/hookshot/index.js"
- },
- {
- "name": "model",
- "position": [0, 0, 0],
- "quaternion": [0, 0, 0, 1],
- "scale": [1, 1, 1],
- "start_url": "https://avaer.github.io/parkour/parkour.glb",
- "physics_url": "https://avaer.github.io/parkour/parkour.bin"
}
]
}
\ No newline at end of file
| 2 |
diff --git a/src/lib/API/api.js b/src/lib/API/api.js @@ -118,7 +118,8 @@ class API {
* @param {UserRecord} user
*/
addUser(user: UserRecord): AxiosPromise<any> {
- return this.client.post('/user/add', { user })
+ //-skipRegistrationStep ONLY FOR TESTING delete this condition aftere testing
+ return this.client.post('/user/add', { user, skipRegistrationStep: global.skipRegistrationStep })
}
/**
| 0 |
diff --git a/src/RouterSelector.web.js b/src/RouterSelector.web.js @@ -33,7 +33,7 @@ const handleLinks = async () => {
try {
const { magiclink } = params
if (magiclink) {
- let userNameAndPWD = Buffer.from(magiclink, 'base64').toString('ascii')
+ let userNameAndPWD = Buffer.from(decodeURIComponent(magiclink), 'base64').toString()
let userNameAndPWDArray = userNameAndPWD.split('+')
log.debug('recoverByMagicLink', { magiclink, userNameAndPWDArray })
if (userNameAndPWDArray.length === 2) {
| 0 |
diff --git a/src/screens/SavedEventListScreen/NoSavedEvents.js b/src/screens/SavedEventListScreen/NoSavedEvents.js // @flow
import React, { PureComponent } from "react";
-import { Image, StyleSheet, ScrollView } from "react-native";
+import {
+ Image,
+ PixelRatio,
+ Platform,
+ StyleSheet,
+ ScrollView
+} from "react-native";
import type { NavigationScreenProp, NavigationState } from "react-navigation";
import Text from "../../components/Text";
import ButtonPrimary from "../../components/ButtonPrimary";
@@ -9,7 +15,6 @@ import ContentPadding from "../../components/ContentPadding";
import iconSave from "../../../assets/images/save.png";
import noSavedEvents from "../../../assets/images/howToSaveEvents.png";
import text from "../../constants/text";
-import { lightNavyBlueColor } from "../../constants/colors";
import { EVENT_LIST } from "../../constants/routes";
type Props = {
@@ -27,7 +32,7 @@ class NoSavedEvents extends PureComponent<Props> {
<ContentPadding style={styles.container}>
<LayoutColumn spacing={12}>
<Image style={styles.image} source={noSavedEvents} />
- <Text type="h1" style={styles.title}>
+ <Text type="h1" color="lightNavyBlueColor" style={styles.title}>
{text.noSavedEventsTitle}
</Text>
<Text
@@ -37,7 +42,7 @@ class NoSavedEvents extends PureComponent<Props> {
} ${text.noSavedEventsPart2}`}
>
{text.noSavedEventsPart1}
- <Image source={iconSave} />
+ <Image style={styles.heart} source={iconSave} />
{text.noSavedEventsPart2}
</Text>
<ButtonPrimary onPress={this.eventList}>
@@ -50,16 +55,23 @@ class NoSavedEvents extends PureComponent<Props> {
}
}
+// Fix for Android rendering Image inline with Text.
+const heartWidth = 24 * (Platform.OS === "ios" ? 1 : PixelRatio.get());
+const heartHeight = 21 * (Platform.OS === "ios" ? 1 : PixelRatio.get());
+
const styles = StyleSheet.create({
container: {
flex: 3,
marginBottom: 12
},
+ heart: {
+ width: heartWidth,
+ height: heartHeight
+ },
image: {
alignSelf: "center"
},
title: {
- color: lightNavyBlueColor,
textAlign: "center"
},
infoText: {
| 0 |
diff --git a/CHANGES.md b/CHANGES.md @@ -30,6 +30,8 @@ Change Log
* Fixed an issue where polygons, corridors, rectangles, and ellipses on terrain would not render on some mobile devices. [#6739](https://github.com/AnalyticalGraphicsInc/cesium/issues/6739)
* Fixed a bug where GlobeSurfaceTile would not render the tile until all layers completed loading causing globe to appear to hang. [#7974](https://github.com/AnalyticalGraphicsInc/cesium/issues/7974)
* Fixed alpha equation for `BlendingState.ALPHA_BLEND` and `BlendingState.ADDITIVE_BLEND`. [#8202](https://github.com/AnalyticalGraphicsInc/cesium/pull/8202)
+* Fixed atmosphere brightness when High Dynamic Range is disabled. [#8149](https://github.com/AnalyticalGraphicsInc/cesium/issues/8149)
+* Fixed brightness levels for procedural Image Based Lighting. [#7803](https://github.com/AnalyticalGraphicsInc/cesium/issues/7803)
### 1.61 - 2019-09-03
@@ -47,8 +49,6 @@ Change Log
* Fix negative altitude altitude handling in `GoogleEarthEnterpriseTerrainProvider`. [#8109](https://github.com/AnalyticalGraphicsInc/cesium/pull/8109)
* Fixed issue where KTX or CRN files would not be properly identified. [#7979](https://github.com/AnalyticalGraphicsInc/cesium/issues/7979)
* Fixed multiple globe materials making the globe darker. [#7726](https://github.com/AnalyticalGraphicsInc/cesium/issues/7726)
-* Fixed atmosphere brightness when High Dynamic Range is disabled. [#8149](https://github.com/AnalyticalGraphicsInc/cesium/issues/8149)
-* Fixed brightness levels for procedural Image Based Lighting. [#7803](https://github.com/AnalyticalGraphicsInc/cesium/issues/7803)
### 1.60 - 2019-08-01
| 5 |
diff --git a/src/components/CartPopover/CartPopover.js b/src/components/CartPopover/CartPopover.js @@ -158,7 +158,7 @@ class CartPopover extends Component {
if (cartItem) {
return (
- <Hidden mdUp>
+ <Hidden mdUp implementation="css">
<div className={classNames(container, { [isContainerHidden]: !uiStore.isCartPopoverOpen, [isContainerVisible]: uiStore.isCartPopoverOpen })}>
<Grid container className={gridContainer} spacing={theme.spacing.unit * 3}>
<Grid className={containerItem} item xs={12}>
| 4 |
diff --git a/src/containers/tags/withTag.js b/src/containers/tags/withTag.js @@ -23,14 +23,14 @@ export default (Component) => (
return (
<Query query={tagQuery} variables={{ slugOrId: tag }}>
- {({ loading, error, data }) => {
- if (loading || error) return null;
- if (!data || !data.tag) return null;
+ {({ error, data }) => {
+ if (error) return null;
+ const tagData = data || {};
return (
<Component
{...this.props}
- tag={data.tag}
+ tag={tagData && tagData.tag}
/>
);
}}
| 2 |
diff --git a/test/y_volume_restriction_tm.js b/test/y_volume_restriction_tm.js @@ -1773,7 +1773,7 @@ contract('VolumeRestrictionTransferManager', accounts => {
let amt = (await I_VolumeRestrictionTM.getTotalTradedByUser.call(account_delegate2, data[0].toNumber()))
.dividedBy(new BigNumber(10).pow(18)).toNumber();
// Verify the storage changes
- assert.equal(data[0].toNumber(), dataIndividual[0].toNumber() + 1);
+ assert.equal(data[0].toNumber(), startTime + duration.days(data[2].toNumber()));
assert.equal(data[2].toNumber(), 5);
assert.equal(amt, 5);
})
| 7 |
diff --git a/factory-ai-vision/EdgeSolution/modules/WebModule/ui/src/App.tsx b/factory-ai-vision/EdgeSolution/modules/WebModule/ui/src/App.tsx @@ -13,10 +13,15 @@ const App: FC = (): JSX.Element => {
const [key, setKey] = useState('');
useEffect(() => {
- Axios.get('http://localhost:8000/api/appinsight/key')
- .then(({ data }) => setKey(data.key))
+ Axios.get('/api/appinsight/key')
+ .then(({ data }) => {
+ if (key) return setKey(data.key);
+ throw new Error('No API Key');
+ })
.catch((e) => console.error(e));
- }, []);
+ }, [key]);
+
+ if (!key) return <h1>Loading</h1>;
return (
<Provider theme={myTheme}>
| 9 |
diff --git a/token-metadata/0xaAAf91D9b90dF800Df4F55c205fd6989c977E73a/metadata.json b/token-metadata/0xaAAf91D9b90dF800Df4F55c205fd6989c977E73a/metadata.json "symbol": "TKN",
"address": "0xaAAf91D9b90dF800Df4F55c205fd6989c977E73a",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/lib/waterline/utils/query/help-find.js b/lib/waterline/utils/query/help-find.js @@ -214,7 +214,7 @@ module.exports = function helpFind(WLModel, s2q, omen, done) {
// Start building the query to the junction table.
var junctionTableQuery = {
- using: firstJoin.child,
+ using: firstJoin.child,// TODO: we should use the same identity as below, right? (e.g. `firstJoin.childCollectionIdentity`)
method: 'find',
criteria: {
where: {
@@ -251,6 +251,13 @@ module.exports = function helpFind(WLModel, s2q, omen, done) {
junctionTableAdapter.find(junctionTableDatastoreName, junctionTableQuery, function(err, junctionTableResults) {
if (err) {
err = forgeAdapterError(err, omen, 'find', junctionTableQuery.using, orm);
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ // TODO: change the line above back to the following:
+ // ```
+ // err = forgeAdapterError(err, omen, 'find', junctionTableQuery.using, orm);
+ // ```
+ // (this will be fine to do once the bug is fixed that is causing `firstJoin.child` to be built w/ different letter casing than the actual model identity)
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
return nextSetOfJoins(err);
}
| 0 |
diff --git a/core/bound_variables.js b/core/bound_variables.js @@ -292,7 +292,7 @@ Blockly.BoundVariables.getAllVariablesOnBlocks = function(block, opt_filter) {
* @return {boolean} True if the renaming is valid.
*/
Blockly.BoundVariables.canRenameTo = function(variable, newName) {
- if (!Blockly.BoundVariables.isLegalName(variable, newName)) {
+ if (!Blockly.BoundVariables.isLegalName(newName)) {
return false;
}
var oldName = variable.getVariableName();
@@ -346,11 +346,10 @@ Blockly.BoundVariables.getVisibleVariableValues = function(variable) {
/**
* Returns whether the given name is legal as a variable name.
- * @param {!Blockly.BoundVariableAbstract} variable The variable to rename.
* @param {string} newName The new variable name.
* @return {boolean} True if the name is legal.
*/
-Blockly.BoundVariables.isLegalName = function(variable, newName) {
+Blockly.BoundVariables.isLegalName = function(newName) {
if (!newName) {
return false;
}
@@ -358,16 +357,10 @@ Blockly.BoundVariables.isLegalName = function(variable, newName) {
if (newName.match(/^[a-z_]\w*$/) == null) {
return false;
}
- if (variable.isReference()) {
+ // TODO(harukam): Support wildcard.
if (newName === '_') {
- // Can not refer to wildcard.
return false;
}
- } else {
- if (newName === '_') {
- throw 'Not implemented yet.';
- }
- }
return true;
};
| 2 |
diff --git a/tests/e2e/specs/modules/search-console/dashboard-date-range.test.js b/tests/e2e/specs/modules/search-console/dashboard-date-range.test.js @@ -125,7 +125,7 @@ describe( 'date range filtering on dashboard views', () => {
] );
} );
- it( 'loads new data when the date range is changed on a entity dashboard view for a single post', async () => {
+ it( 'loads new data when the date range is changed on an entity dashboard view for a single post', async () => {
const { last28Days, last14Days } = dashboardDetailsRequests;
await visitAdminPage( 'admin.php', 'page=googlesitekit-dashboard' );
| 1 |
diff --git a/src/util.js b/src/util.js @@ -486,6 +486,7 @@ async function messagesAfter(channel, message, limit) {
* @return {Boolean}
*/
util.ignoresAutomod = async (message) => {
+ if (!message.guild) return false;
/** @type {GuildConfig} */
const guildconfig = await GuildConfig.get(message.guild.id);
return message.author.bot || message.member.permissions.has('MANAGE_MESSAGES') || guildconfig.isProtected(message.member);
| 8 |
diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js @@ -529,8 +529,7 @@ function fetchIOUReportByID(iouReportID, chatReportID, shouldRedirectIfEmpty = f
function fetchIOUReportByIDAndUpdateChatReport(iouReportID, chatReportID) {
fetchIOUReportByID(iouReportID, chatReportID)
.then((iouReportObject) => {
- return;
- // Now sync the chatReport data to ensure it has a reference to the updated iouReportID // JULES
+ // Now sync the chatReport data to ensure it has a reference to the updated iouReportID
const chatReportObject = {
hasOutstandingIOU: iouReportObject.stateNum === CONST.REPORT.STATE_NUM.PROCESSING
&& iouReportObject.total !== 0,
| 13 |
diff --git a/app/math-editor.js b/app/math-editor.js @@ -211,26 +211,22 @@ function isMathEditorVisible() {
}
const markAndGetInlineImages = $editor => {
- return $editor.find('img[src^="data"]')
- .each((i, el) => el.setAttribute('id', new Date().getTime() + '-' + i))
- .map((i, el) => {
- const ret = Object.assign(decodeBase64Image(el.getAttribute('src')), {id: el.getAttribute('id')})
- el.setAttribute('src', loadingImg)
- return ret
- })
- .toArray()
- .filter(({type}) => type === 'image/png')
+ const images = $editor.find('img[src^="data"]').toArray()
+ .map((el, index) => Object.assign(decodeBase64Image(el.getAttribute('src')), {
+ $el: $(el)
+ }))
+ images.filter(({type}) => type !== 'image/png').forEach(({$el}) => $el.remove())
+ const pngImages = images.filter(({type}) => type === 'image/png')
+ pngImages.forEach(({$el}) => $el.attr('src', loadingImg))
+ return pngImages
}
-const persistInlineImages = ($editor, screenshotSaver) => {
- Bacon.combineAsArray(
- markAndGetInlineImages($editor)
- .map(data => Bacon.fromPromise(
- screenshotSaver(data)
- .then(screenshotUrl => $editor.find('#' + data.id).attr('src', screenshotUrl).removeAttr('id'))
- .fail(e => $editor.find('#' + data.id).remove())
- )
- )
+const persistInlineImages = ($editor, screenShotSaver) => {
+ Bacon.combineAsArray(markAndGetInlineImages($editor)
+ .map(data => Bacon.fromPromise(screenShotSaver(data)
+ .then(screenShotUrl => data.$el.attr('src', screenShotUrl))
+ .fail(e => data.$el.remove())
+ ))
).onValue(() => $editor.trigger('input'))
}
| 2 |
diff --git a/binding.js b/binding.js @@ -73,7 +73,7 @@ module.exports.download_vips = function () {
// Ensure glibc >= 2.15
const lddVersion = process.env.LDD_VERSION;
if (lddVersion) {
- if (/(glibc|gnu libc|gentoo)/i.test(lddVersion)) {
+ if (/(glibc|gnu libc|gentoo|solus)/i.test(lddVersion)) {
const glibcVersion = lddVersion ? lddVersion.split(/\n/)[0].split(' ').slice(-1)[0].trim() : '';
if (glibcVersion && semver.lt(glibcVersion + '.0', '2.13.0')) {
error('glibc version ' + glibcVersion + ' requires manual installation - please see http://sharp.dimens.io/en/stable/install/');
| 0 |
diff --git a/test/Air/Air.test.js b/test/Air/Air.test.js @@ -109,7 +109,7 @@ describe('#AirService', () => {
});
it('should call cancel ur if segment booking failed', () => {
- const params = { passengers: [], rule: 'RULE' };
+ const params = { passengers: [], rule: 'RULE', /*allowWaitlist: true*/ };
const airPricePricingSolutionXML = sinon.spy(
() => Promise.resolve({ foo: 123 })
);
@@ -132,21 +132,20 @@ describe('#AirService', () => {
'./AirService': service,
});
- return createAirService({ auth }).book(params).then(() => {
- expect(airPricePricingSolutionXML.calledOnce).to.be.equal(true);
- expect(createReservation.calledOnce).to.be.equal(true);
- expect(cancelUR.calledOnce).to.be.equal(true);
- })
+ return createAirService({ auth }).book(params)
.then(() => {
throw new Error('Cant be success.');
})
.catch((err) => {
expect(err).to.be.instanceof(AirRuntimeError.SegmentBookingFailed);
+ expect(airPricePricingSolutionXML.calledOnce).to.be.equal(true);
+ expect(createReservation.calledOnce).to.be.equal(true);
+ expect(cancelUR.calledOnce).to.be.equal(true);
});
});
it('should not call cancel ur if other error', () => {
- const params = { passengers: [], rule: 'RULE' };
+ const params = { passengers: [], rule: 'RULE', allowWaitlist: true };
const airPricePricingSolutionXML = sinon.spy(
() => Promise.resolve({ foo: 123 })
);
| 1 |
diff --git a/src/encoded/static/components/footer.js b/src/encoded/static/components/footer.js @@ -2,11 +2,9 @@ import React from 'react';
import PropTypes from 'prop-types';
-// Reworking the data triggers to use buttons doesn't seem worth it to avoid an eslint warning.
-/* eslint-disable jsx-a11y/anchor-is-valid, react/prefer-stateless-function */
-export default class Footer extends React.Component {
- render() {
- const session = this.context.session;
+/* eslint-disable jsx-a11y/anchor-is-valid */
+const Footer = ({ version }, reactContext) => {
+ const session = reactContext.session;
const disabled = !session;
let userActionRender;
@@ -19,7 +17,7 @@ export default class Footer extends React.Component {
<footer id="page-footer">
<div className="container">
<div className="row">
- <div className="app-version">{this.props.version}</div>
+ <div className="app-version">{version}</div>
</div>
</div>
<div className="page-footer">
@@ -27,6 +25,7 @@ export default class Footer extends React.Component {
<div className="row">
<div className="col-sm-6 col-sm-push-6">
<ul className="footer-links">
+ <li><a href="https://www.stanford.edu/site/privacy/">Privacy</a></li>
<li><a href="mailto:[email protected]">Contact</a></li>
<li><a href="http://www.stanford.edu/site/terms.html">Terms of Use</a></li>
<li id="user-actions-footer">{userActionRender}</li>
@@ -45,9 +44,8 @@ export default class Footer extends React.Component {
</div>
</footer>
);
- }
-}
-/* eslint-enable jsx-a11y/anchor-is-valid, react/prefer-stateless-function */
+};
+/* eslint-enable jsx-a11y/anchor-is-valid */
Footer.contextTypes = {
session: PropTypes.object,
@@ -60,3 +58,5 @@ Footer.propTypes = {
Footer.defaultProps = {
version: '',
};
+
+export default Footer;
| 0 |
diff --git a/test/Annotations.test.js b/test/Annotations.test.js import { test } from 'substance-test'
-import { setCursor, setSelection } from './integrationTestHelpers'
+import { setCursor, setSelection, openManuscriptEditor, loadBodyFixture } from './integrationTestHelpers'
import setupTestApp from './setupTestApp'
const annotationTypes = {
@@ -11,27 +11,30 @@ const annotationTypes = {
'monospace': 'Monospace'
}
+const fixture = `<p id="p1">
+Lorem <bold>ipsum</bold> dolor <italic>sit</italic> amet, ea <ext-link href="foo">ludus</ext-link>
+intellegat his, <sub>graece</sub> fastidii <sup>phaedrum</sup> ea mea, ne duo esse <monospace>omnium</monospace>.
+</p>`
+
Object.keys(annotationTypes).forEach(annoType => {
- test(annotationTypes[annoType] + ': toggle annotation', t => {
+ test(`Annotations: toggle ${annotationTypes[annoType]} annotation`, t => {
testAnnotationToggle(t, annoType)
})
})
function testAnnotationToggle (t, annoType) {
- let { app } = setupTestApp(t)
- let articlePanel = app.find('.sc-article-panel')
- let annoToogle = articlePanel.find('.sc-toggle-tool.sm-' + annoType)
- let editor = articlePanel.find('.sc-manuscript-editor')
+ let { editor } = _setup(t)
+ let annoToogle = editor.find('.sc-toggle-tool.sm-' + annoType)
// Set the cursor and check if tool is active
- setCursor(editor, 'p-2.content', 3)
- t.equal(isToolActive(articlePanel, annoType), false, 'Tool must be disabled')
+ setCursor(editor, 'p1.content', 3)
+ t.equal(isToolActive(editor, annoType), false, 'Tool must be disabled')
// Set the selection and check if tool is active
- setSelection(editor, 'p-2.content', 2, 4)
- t.equal(isToolActive(articlePanel, annoType), true, 'Tool must be active')
+ setSelection(editor, 'p1.content', 2, 4)
+ t.equal(isToolActive(editor, annoType), true, 'Tool must be active')
// Toggle the tool and check if an annotation appeared
annoToogle.find('button').click()
- let anno = editor.find('[data-path="p-2.content"] .sc-' + annoType)
+ let anno = editor.find('[data-path="p1.content"] .sc-' + annoType)
let annoId = anno.getAttribute('data-id')
t.notNil(anno, 'There should be an annotation')
let offset = anno.el.getAttribute('data-offset')
@@ -41,14 +44,21 @@ function testAnnotationToggle (t, annoType) {
let text = anno.text()
t.equal(text.length, parseInt(length), 'The number of annotated symbols must be equal to length of the selection')
// Set the cursor, toggle the tool and check if an annotation disappeared
- setCursor(editor, 'p-2.content', 3)
- t.equal(isToolActive(articlePanel, annoType), true, 'Tool must be active')
+ setCursor(editor, 'p1.content', 3)
+ t.equal(isToolActive(editor, annoType), true, 'Tool must be active')
annoToogle.find('button').click()
- let removedAnno = editor.find('[data-path="p-2.content"] [data-id="' + annoId + '"]')
+ let removedAnno = editor.find('[data-path="p1.content"] [data-id="' + annoId + '"]')
t.isNil(removedAnno, 'There should be no annotation')
t.end()
}
+function _setup (t) {
+ let { app } = setupTestApp(t, { archiveId: 'blank' })
+ let editor = openManuscriptEditor(app)
+ loadBodyFixture(editor, fixture)
+ return { editor }
+}
+
function isToolActive (el, annoType) {
let tool = el.find('.sc-toggle-tool.sm-' + annoType)
let btn = tool.find('button')
| 4 |
diff --git a/app/webpack/observations/identify/components/suggestions.jsx b/app/webpack/observations/identify/components/suggestions.jsx @@ -55,12 +55,11 @@ class Suggestions extends React.Component {
} }
/>
<div className="btn-group pull-right">
- { details && details.vision_score ? (
+ { details && ( details.vision_score || details.frequency_score ) ? (
<div className="quiet btn btn-label btn-xs">
- { I18n.t( "visually_similar" ) }
- { details.frequency_score ? (
- <span> / { I18n.t( "seen_nearby" ) }</span>
- ) : null}
+ { details.vision_score ? I18n.t( "visually_similar" ) : null }
+ { details.vision_score && details.frequency_score ? <span> / </span> : null }
+ { details.frequency_score ? I18n.t( "seen_nearby" ) : null }
</div>
) : null }
<Button
| 9 |
diff --git a/assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/index.js b/assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/index.js @@ -310,9 +310,9 @@ function DashboardIdeasWidget( props ) {
'google-site-kit'
) }
</span>
+ { /* Gap applied to title text due to potential wrapping. */ }
<Badge
label={ __( 'Experimental', 'google-site-kit' ) }
- className="googlesitekit-idea-hub__badge"
/>
</h3>
| 2 |
diff --git a/main/utils/config.js b/main/utils/config.js @@ -76,7 +76,7 @@ const initializeConfig = (opts = {}) => {
*/
const initConfigFile = async (options = {}) => {
- const opts = Object.assign(defaultOptions, options)
+ const opts = Object.assign({}, defaultOptions, options)
const config = initializeConfig(opts)
await fs.ensureFile(opts.configFilePath)
await fs.writeJson(opts.configFilePath, config, {spaces: ' '})
| 1 |
diff --git a/docs/general/data-structures.md b/docs/general/data-structures.md The `data` property of a dataset can be passed in various formats. By default, that `data` is parsed using the associated chart type and scales.
If the `labels` property of the main `data` property is used, it has to contain the same amount of elements as the dataset with the most values. These labels are used to label the index axis (default x axes). The values for the labels have to be provided in an array.
-The provides labels can be of the type string or number to be rendered correctly. In case you want multiline labels you can provide an array with each line as one entry in the array.
+The provided labels can be of the type string or number to be rendered correctly. In case you want multiline labels you can provide an array with each line as one entry in the array.
## Primitive[]
| 1 |
diff --git a/src/lib/gundb/UserStorage.js b/src/lib/gundb/UserStorage.js @@ -253,6 +253,33 @@ export class UserStorage {
})
}
+ gunAuth(username: string, password: string): Promise<any> {
+ return new Promise((res, rej) => {
+ this.gunuser.auth(username, password, user => {
+ logger.debug('gundb auth', user)
+ if (user.err) {
+ return rej(user.err)
+ }
+ res(user)
+ })
+ })
+ }
+
+ gunCreate(username: string, password: string): Promise<any> {
+ return new Promise((res, rej) => {
+ this.gunuser.create(username, password, user => {
+ logger.debug('gundb user created', user)
+
+ //if username exists its not an error we can create
+ //multiple accounts under same username
+ // if (user.err) {
+ // return rej(user.err)
+ // }
+ res(user)
+ })
+ })
+ }
+
/**
* Initialize wallet, gundb user, feed and subscribe to events
*/
@@ -267,14 +294,21 @@ export class UserStorage {
logger.debug('init:', 'logging out first')
this.gunuser.leave()
}
- return new Promise((res, rej) => {
- this.gunuser.create(username, password, userCreated => {
- logger.debug('gundb user created', userCreated)
+ const existingUsername = await this.gun.get('~@' + username)
+ logger.debug('init existing username:', { existingUsername })
+ let loggedInPromise
+ if (existingUsername) {
+ loggedInPromise = this.gunAuth(username, password).catch(e =>
+ this.gunCreate(username, password).then(r => this.gunAuth(username, password))
+ )
+ } else {
+ loggedInPromise = this.gunCreate(username, password).then(r => this.gunAuth(username, password))
+ }
- //auth.then - doesnt seem to work server side in tests
- this.gunuser.auth(username, password, user => {
- if (user.err) {
- return rej(user.err)
+ return new Promise(async (res, rej) => {
+ let user = await loggedInPromise.catch(e => rej(e))
+ if (user === undefined) {
+ return
}
this.user = this.gunuser.is
this.profile = this.gunuser.get('profile')
@@ -291,7 +325,7 @@ export class UserStorage {
.get('users')
.get(this.gunuser.is.pub)
.put(this.gunuser)
- logger.debug('GunDB logged in', { username, pubkey: this.wallet.account, user: this.user.sea })
+ logger.debug('GunDB logged in', { username, pubkey: this.wallet.account, user: user })
logger.debug('subscribing')
this.wallet.subscribeToEvent('receive', (err, events) => {
@@ -304,8 +338,6 @@ export class UserStorage {
this.wallet.subscribeToEvent('receiptReceived', receipt => this.handleReceiptUpdated(receipt))
res(true)
})
- })
- })
}
async handleReceiptUpdated(receipt: any): Promise<FeedEvent> {
| 0 |
diff --git a/packages/http-router/index.js b/packages/http-router/index.js @@ -7,6 +7,10 @@ const httpRouteHandler = (routes) => {
for (const route of routes) {
let { method, path, handler } = route
+ if (!methods.concat('ANY').includes(method)) {
+ throw new Error('method not allowed')
+ }
+
// remove trailing slash, but not if it's the first one
if (path.endsWith('/') && path !== '/') {
path = path.substr(0, path.length - 1)
@@ -46,7 +50,7 @@ const httpRouteHandler = (routes) => {
}
}
-const regexpDynamicParameters = /\{.+\}/g
+const regexpDynamicParameters = /\/\{.+\}\//g
const methods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS']
const attachStaticRoute = (method, path, handler, routesType) => {
@@ -59,7 +63,7 @@ const attachStaticRoute = (method, path, handler, routesType) => {
if (!routesType[method]) {
routesType[method] = {}
}
- routesType[method][path] = handler
+ routesType[method][path] = handler // This assignment may alter Object.prototype if a malicious '__proto__' string is injected from library input.
}
const attachDynamicRoute = (method, path, handler, routesType) => {
@@ -73,8 +77,8 @@ const attachDynamicRoute = (method, path, handler, routesType) => {
routesType[method] = []
}
path = path
- .replaceAll('{proxy+}', '?.*') // ? for previous `/` to make it optional
- .replace(regexpDynamicParameters, '.+')
+ .replaceAll('/{proxy+}', '/?.*')
+ .replace(regexpDynamicParameters, '/.+/')
path = new RegExp(`^${path}$`)
routesType[method].push({ path, handler })
}
| 1 |
diff --git a/packages/proxy-compat/src/main-noop.ts b/packages/proxy-compat/src/main-noop.ts import { getKey, callKey, setKey, deleteKey, inKey, iterableKey } from "./methods-noop";
-export default Object.assign({}, {
+export default {
getKey,
callKey,
setKey,
deleteKey,
inKey,
iterableKey
-});
+};
| 1 |
diff --git a/packages/bitcore-node/test/integration/ripple/csp.integration.ts b/packages/bitcore-node/test/integration/ripple/csp.integration.ts import { XRP } from '../../../src/modules/ripple/api/csp';
import { expect } from 'chai';
+import { XrpBlockStorage } from '../../../src/modules/ripple/models/block';
const chain = 'XRP';
const network = 'mainnet';
@@ -12,8 +13,24 @@ describe('Ripple Api', () => {
});
it('should be able to get local tip', async () => {
+ await XrpBlockStorage.collection.insertOne({
+ chain,
+ network,
+ height: 5,
+ hash: '528f01c17829622ed6a4af51b3b3f6c062f304fa60e66499c9cbb8622c8407f7',
+ time: new Date(1526326784),
+ timeNormalized: new Date(1526326784),
+ transactionCount: 1,
+ reward: 50,
+ previousBlockHash: '64bfb3eda276ae4ae5b64d9e36c9c0b629bc767fb7ae66f9d55d2c5c8103a929',
+ nextBlockHash: '',
+ size: 264,
+ processed: true
+ });
+
const tip = await XRP.getLocalTip({ chain, network });
expect(tip).to.exist;
expect(tip.hash).to.exist;
+ expect(tip.hash).to.eq('528f01c17829622ed6a4af51b3b3f6c062f304fa60e66499c9cbb8622c8407f7');
});
});
| 1 |
diff --git a/src/apps.json b/src/apps.json 48
],
"icon": "Synology DiskStation.png",
+ "html": "<noscript><div class='syno-no-script'",
"meta": {
- "application-name": "Synology DiskStation"
+ "application-name": "Synology DiskStation",
+ "description": "^DiskStation provides a full-featured network attached storage"
},
+ "script": "webapi/entry\\.cgi\\?api=SYNO\\.(?:Core|Filestation)\\.Desktop\\.",
"website": "synology.com"
},
"SyntaxHighlighter": {
| 7 |
diff --git a/.drone.yml b/.drone.yml @@ -23,11 +23,9 @@ publish:
".js": gzip
".css": gzip
".html": gzip
- metadata:
- "*.js":
- Cache-Control: "public, max-age: 86400"
- "*.css":
- Cache-Control: "public, max-age: 86400"
+ cache_control:
+ ".js": "public, max-age: 86400"
+ ".css": "public, max-age: 86400"
when:
branch: sandbox
@@ -44,6 +42,9 @@ publish:
".js": gzip
".css": gzip
".html": gzip
+ cache_control:
+ ".js": "public, max-age: 86400"
+ ".css": "public, max-age: 86400"
when:
branch: master
| 4 |
diff --git a/src/components/views/Navigation/index.js b/src/components/views/Navigation/index.js @@ -179,8 +179,10 @@ class Navigation extends Component {
z: this.courseCoordinate()
}
});
+ if (this.scanning) {
this.scanning = setTimeout(this._randomCourse.bind(this), 60);
}
+ }
updateDestination = e => {
e.preventDefault();
this.setState({
| 1 |
diff --git a/pages/cardGroups.js b/pages/cardGroups.js @@ -278,20 +278,7 @@ const Page = ({ data, data: { cardGroups }, router, t }) => (
{Flag && <Flag size={SIZE} {...styles.flag} />}
<strong>{cardGroup.name}</strong>
<br />
- <span>
- {t.pluralize.elements(
- 'pages/cardGroups/cardCount',
- {
- count: (
- <span key='count' {...styles.cardCount}>
- {cardGroup.cards.totalCount}
- </span>
- )
- }
- )}
- </span>
<span {...styles.cardCount}>
- <br />
{!!(
cardGroup.nElected.totalCount ||
cardGroup.sElected.totalCount
@@ -349,26 +336,6 @@ const Page = ({ data, data: { cardGroups }, router, t }) => (
<br />
<br />
</Container>
-
- <Center style={{ marginBottom: 30 }}>
- <Interaction.H3 {...styles.discussionFeedHeadline}>
- {t('pages/cardGroups/latestComments')}
- </Interaction.H3>
- <Loader
- loading={data.loading}
- error={data.error}
- render={() => {
- return (
- <LatestComments
- discussionIds={data.cardGroups.nodes.map(
- card => card.discussion.id
- )}
- toDepth={0}
- />
- )
- }}
- />
- </Center>
</Frame>
)
| 6 |
diff --git a/README.md b/README.md @@ -694,7 +694,7 @@ One caveat is that currently you [cannot Server-Side Render along with HMR](http
- [react\_on\_rails](https://github.com/shakacode/react_on_rails): Integration of React with Rails utilizing Webpack, Redux, React-Router.
- [react-rails-hot-loader](https://github.com/rmosolgo/react-rails-hot-loader) Simple live-reloader for `react-rails`.
- [react-rails-benchmark_renderer](https://github.com/pboling/react-rails-benchmark_renderer) adds performance instrumentation to server rendering.
-- [Ruby Hyperloop](http://ruby-hyperloop.org/): Use Ruby to build reactive user interfaces with React.
+- [Ruby Hyperstack](https://hyperstack.org/): Use Ruby to build reactive user interfaces with React.
## Contributing
| 1 |
diff --git a/components/landing/stats.js b/components/landing/stats.js @@ -84,9 +84,10 @@ class CoverageChart extends React.Component {
<Text fontSize={18}>
<FormattedMarkdown id={'Home.MonthlyStats.SummaryText'}
values={{
- measurementCount: intl.formatNumber(lastMonth.measurementCount),
- networkCount: intl.formatNumber(lastMonth.networkCount),
- countryCount: intl.formatNumber(lastMonth.countryCount)
+ // Added **'s to format the variables in bold text
+ measurementCount: `**${intl.formatNumber(lastMonth.measurementCount)}**`,
+ networkCount: `**${intl.formatNumber(lastMonth.networkCount)}**`,
+ countryCount: `**${intl.formatNumber(lastMonth.countryCount)}**`
}}
/>
</Text>
| 5 |
diff --git a/rss/initializeall.js b/rss/initializeall.js @@ -45,7 +45,7 @@ module.exports = function(con, link, rssList, uniqueSettings, callback) {
requestStream(link, cookies, feedparser, function(err) {
if (err) {
- console.log(`${bot.shard ? 'SH ' + bot.shard.id : ''} INIT Error: Skipping ${link}. (${err})`);
+ console.log(`INIT Error: Skipping ${link}. (${err})`);
return callback({status: 'failed', link: link, rssList: rssList})
}
})
| 1 |
diff --git a/.travis.yml b/.travis.yml @@ -18,7 +18,7 @@ install:
script:
- if [[ "$TEST_TYPE" = objc-macos ]]; then travis_retry travis_wait ./scripts/objc-test-macos.sh test; fi
- if [[ "$TEST_TYPE" = e2e-objc ]]; then node ./scripts/run-ci-e2e-tests.js --macos --js --retries 3; fi
- - if [[ ( "$TEST_TYPE" = podspecs ) && ( "$TRAVIS_PULL_REQUEST" = "false" ) ]]; then gem install cocoapods && ./scripts/process-podspecs.sh; fi
+ # - if [[ ( "$TEST_TYPE" = podspecs ) && ( "$TRAVIS_PULL_REQUEST" = "false" ) ]]; then gem install cocoapods && ./scripts/process-podspecs.sh; fi
matrix:
| 8 |
diff --git a/core/server/api/canary/session.js b/core/server/api/canary/session.js const Promise = require('bluebird');
-const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const models = require('../../models');
const auth = require('../../services/auth');
const api = require('./index');
+const messages = {
+ accessDenied: 'Access Denied.'
+};
+
const session = {
read(frame) {
/*
@@ -20,7 +24,7 @@ const session = {
if (!object || !object.username || !object.password) {
return Promise.reject(new errors.UnauthorizedError({
- message: i18n.t('errors.middleware.auth.accessDenied')
+ message: tpl(messages.accessDenied)
}));
}
@@ -40,7 +44,7 @@ const session = {
}).catch(async (err) => {
if (!errors.utils.isIgnitionError(err)) {
throw new errors.UnauthorizedError({
- message: i18n.t('errors.middleware.auth.accessDenied'),
+ message: tpl(messages.accessDenied),
err
});
}
| 14 |
diff --git a/app/classifier/tutorial.jsx b/app/classifier/tutorial.jsx @@ -192,10 +192,10 @@ export default class Tutorial extends React.Component {
if (this.props.user) {
const { projectPreferences } = this.props;
// Build this manually. Having an index (even as a strings) keys creates an array.
- if (projectPreferences.preferences === null) {
+ if (!projectPreferences.preferences) {
projectPreferences.preferences = {};
}
- if (projectPreferences.preferences.tutorials_completed_at === null) {
+ if (!projectPreferences.preferences.tutorials_completed_at) {
projectPreferences.preferences.tutorials_completed_at = {};
}
projectPreferences.update({ [`preferences.tutorials_completed_at.${this.props.tutorial.id}`]: now });
| 12 |
diff --git a/elements/course-design/lib/activity-box.js b/elements/course-design/lib/activity-box.js @@ -194,14 +194,11 @@ class ActivityBox extends LitElement {
></simple-icon>
`
: html``}
- ${this.tag
- ? html`<div class="tag">
+ <div class="tag" ?hidden=${!this.tag}>
<span
- ><simple-icon icon="check-circle"></simple-icon>${this
- .tag}</span
+ ><simple-icon icon="check-circle"></simple-icon>${this.tag}</span
>
- </div>`
- : html``}
+ </div>
<div class="pullout"><slot></slot></div>
</div>
`;
| 1 |
diff --git a/docs/src/pages/getting-started/installation.md b/docs/src/pages/getting-started/installation.md @@ -25,7 +25,7 @@ on how to do so.
## SVG Icons
In order to use prebuilt SVG Material icons, such as those found in the [component demos](/component-demos)
-you must first install the [material-ui-icons](https://www.npmjs.org/package/material-ui) package:
+you must first install the [material-ui-icons](https://www.npmjs.org/package/material-ui-icons) package:
```
npm install -S material-ui-icons
| 1 |
diff --git a/token-metadata/0x6fe56C0bcdD471359019FcBC48863d6c3e9d4F41/metadata.json b/token-metadata/0x6fe56C0bcdD471359019FcBC48863d6c3e9d4F41/metadata.json "symbol": "PROPS",
"address": "0x6fe56C0bcdD471359019FcBC48863d6c3e9d4F41",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/spec/factories/users.rb b/spec/factories/users.rb @@ -18,8 +18,6 @@ FactoryGirl.define do
quota_in_bytes 5000000
id { UUIDTools::UUID.timestamp_create.to_s }
builder_enabled nil # Most tests still assume editor
- organization_id nil
- database_schema 'public'
trait :admin_privileges do
username 'Admin'
| 2 |
diff --git a/webpack/postcss.config.js b/webpack/postcss.config.js @@ -12,6 +12,11 @@ module.exports = {
'postcss-nesting': {},
'postcss-preset-env': {
stage: 0,
+ features: {
+ 'custom-properties': {
+ preserve: false
+ }
+ }
},
'postcss-reporter': {
clearMessages: true
| 12 |
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml <action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
+
+ <!-- Custom URI handlers. Used to intercept Urban Airship deep links. -->
<data android:scheme="expensify-cash"/>
<data android:scheme="new-expensify"/>
+
+ <!-- Web URL handlers. Used to intercept web links. -->
<data android:scheme="https" android:host="new.expensify.com" />
<data android:scheme="https" android:host="staging.new.expensify.com" />
</intent-filter>
| 7 |
diff --git a/token-metadata/0x0417912b3a7AF768051765040A55BB0925D4DDcF/metadata.json b/token-metadata/0x0417912b3a7AF768051765040A55BB0925D4DDcF/metadata.json "symbol": "LID",
"address": "0x0417912b3a7AF768051765040A55BB0925D4DDcF",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/world.js b/world.js @@ -280,6 +280,7 @@ const _addObject = dynamic => (contentId, parentId = null, position = new THREE.
trackedObject.set('contentId', contentId);
trackedObject.set('position', position.toArray());
trackedObject.set('quaternion', quaternion.toArray());
+ trackedObject.set('scale', [1, 1, 1]);
trackedObject.set('options', JSON.stringify(options));
});
if (pendingAddPromise) {
@@ -384,14 +385,16 @@ world.addEventListener('trackedobjectadd', async e => {
scene.add(mesh);
}
- mesh.setPose = (position, quaternion) => {
+ mesh.setPose = (position, quaternion, scale) => {
trackedObject.set('position', position.toArray());
trackedObject.set('quaternion', quaternion.toArray());
+ trackedObject.set('scale', scale.toArray());
};
const _observe = () => {
mesh.position.fromArray(trackedObject.get('position'));
mesh.quaternion.fromArray(trackedObject.get('quaternion'));
+ mesh.scale.fromArray(trackedObject.get('scale'));
};
trackedObject.observe(_observe);
trackedObject.unobserve = trackedObject.unobserve.bind(trackedObject, _observe);
| 0 |
diff --git a/character-controller.js b/character-controller.js @@ -1197,6 +1197,14 @@ class RemotePlayer extends InterpolatedPlayer {
}
const observePlayerFn = e => {
+ if(e.changes.keys.has('avatar')) {
+ const avatar = e.changes.keys.get('avatar').value;
+ if(avatar === '') {
+ console.warn("Ignoring avatar sync", avatar);
+ } else {
+ this.syncAvatar();
+ }
+ }
this.position.fromArray(this.playerMap.get('position'));
this.quaternion.fromArray(this.playerMap.get('quaternion'));
};
| 0 |
diff --git a/js/base/Exchange.js b/js/base/Exchange.js @@ -157,7 +157,6 @@ module.exports = class Exchange {
this.iso8601 = timestamp => new Date (timestamp).toISOString ()
this.parse8601 = x => Date.parse (((x.indexOf ('+') >= 0) || (x.slice (-1) === 'Z')) ? x : (x + 'Z'))
- this.milliseconds = now
this.microseconds = () => now () * 1000 // TODO: utilize performance.now for that purpose
this.seconds = () => Math.floor (now () / 1000)
@@ -233,6 +232,10 @@ module.exports = class Exchange {
return this.seconds ()
}
+ milliseconds () {
+ return now ()
+ }
+
encodeURIComponent (...args) {
return encodeURIComponent (...args)
}
| 11 |
diff --git a/index.js b/index.js module.exports = {
name: 'ember-flatpickr',
included: function(app) {
- let cssPath = 'themes/';
if (app.options && app.options.flatpickr && app.options.flatpickr.theme) {
- cssPath += app.options.flatpickr.theme;
+ this.theme = `themes/${app.options.flatpickr.theme}.css`;
}
- else {
- cssPath += 'dark';
- }
- cssPath += '.css';
- this.theme = cssPath;
this.locales = [];
if (app.options && app.options.flatpickr && app.options.flatpickr.locales) {
@@ -31,7 +25,7 @@ module.exports = {
srcDir: 'dist',
import: [
'flatpickr.js',
- this.theme,
+ this.theme || 'flatpickr.css',
...localePaths
]
};
| 11 |
diff --git a/src/components/Player/Pages/Histograms/Histograms.jsx b/src/components/Player/Pages/Histograms/Histograms.jsx @@ -25,9 +25,7 @@ const getSubtitleStats = (columns) => {
return `${strings.heading_total_matches}: ${total}${(median !== undefined) ? `, ${strings.heading_median}: ${median}` : ''}`;
};
-const getSubtitleDescription = (histogramName) => {
- return strings[`histograms_${histogramName}_description`]
-};
+const getSubtitleDescription = histogramName => strings[`histograms_${histogramName}_description`];
const histogramNames = dataColumns.filter(col => col !== 'win_rate');
| 1 |
diff --git a/src/components/NextButtonContainer.js b/src/components/NextButtonContainer.js import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { compose, mapProps, getContext } from 'recompose';
-import { hasNextSelector } from '../selectors/dataSelectors';
+import { hasNextSelector, classNamesForComponentSelector, stylesForComponentSelector } from '../selectors/dataSelectors';
const enhance = OriginalComponent => compose(
getContext({
@@ -9,11 +9,12 @@ const enhance = OriginalComponent => compose(
}),
connect((state, props) => ({
hasNext: hasNextSelector(state, props),
+ className: classNamesForComponentSelector(state, 'NextButton'),
+ style: stylesForComponentSelector(state, 'NextButton'),
})),
mapProps(({ events: { onNext }, ...props }) => ({
onClick: onNext,
- // TODO: Get this from the store
- text: 'Next',
+ text: 'Next', // TODO: Get this from the store
...props }))
)((props) => <OriginalComponent {...props} />);
| 0 |
diff --git a/js/binance.js b/js/binance.js @@ -4413,12 +4413,12 @@ module.exports = class binance extends Exchange {
const defaultMethod = this.safeString (this.options, 'fetchPositions', 'positionRisk');
const method = this.getSupportedMapping (defaultMethod, {
'positionRisk': 'fetchPositionsRisk',
- 'account': 'fetchPositionsAccount',
+ 'account': 'fetchAccountPositions',
});
return await this[method] (symbolOrSymbols, params);
}
- async fetchPositionsAccount (symbols = undefined, params = {}) {
+ async fetchAccountPositions (symbols = undefined, params = {}) {
if (symbols !== undefined) {
if (!Array.isArray (symbols)) {
symbols = [ symbols ];
| 10 |
diff --git a/components/admin/data/layers/form/LayersForm.js b/components/admin/data/layers/form/LayersForm.js @@ -54,12 +54,6 @@ class LayersForm extends React.Component {
this.props.dispatch(setLayerInteractionError(valid ? false : err));
}
});
-
- // BINDINGS
- this.onSubmit = this.onSubmit.bind(this);
- this.onChange = this.onChange.bind(this);
- this.onChangeDataset = this.onChangeDataset.bind(this);
- this.onStepChange = this.onStepChange.bind(this);
}
componentDidMount() {
@@ -102,7 +96,7 @@ class LayersForm extends React.Component {
* - onChange
* - onChangeDataset
*/
- onSubmit(event) {
+ onSubmit = (event) => {
if (event) event.preventDefault();
const { step, form } = this.state;
@@ -163,16 +157,16 @@ class LayersForm extends React.Component {
}, 0);
}
- onChange(obj) {
+ onChange = (obj) => {
const form = Object.assign({}, this.state.form, obj);
this.setState({ form });
}
- onChangeDataset(dataset) {
+ onChangeDataset = (dataset) => {
this.setState({ dataset });
}
- onStepChange(step) {
+ onStepChange = (step) => {
this.setState({ step });
}
| 14 |
diff --git a/packages/neutrine/src/core/breadcrumb/index.js b/packages/neutrine/src/core/breadcrumb/index.js @@ -6,11 +6,15 @@ import "@siimple/css/scss/components/breadcrumb.scss";
//Breadcrumb parent component
export const Breadcrumb = function (props) {
- return helpers.createMergedElement("div", props, "siimple-breadcrumb");
+ return helpers.createMergedElement("div", props, {
+ "className": "siimple-breadcrumb"
+ });
};
//Breadcrumb item component
export const BreadcrumbItem = function (props) {
- return helpers.createMergedElement("div", props, "siimple-breadcrumb-item");
+ return helpers.createMergedElement("div", props, {
+ "className": "siimple-breadcrumb-item"
+ });
};
| 1 |
diff --git a/stories/module-analytics-components.stories.js b/stories/module-analytics-components.stories.js @@ -24,7 +24,6 @@ import DashboardAllTrafficWidget from '../assets/js/modules/analytics/components
import DashboardPopularPagesWidget from '../assets/js/modules/analytics/components/dashboard/DashboardPopularPagesWidget';
import DashboardBounceRateWidget from '../assets/js/modules/analytics/components/dashboard/DashboardBounceRateWidget';
import DashboardGoalsWidget from '../assets/js/modules/analytics/components/dashboard/DashboardGoalsWidget';
-import DashboardSearchVisitorsWidget from '../assets/js/modules/analytics/components/dashboard/DashboardSearchVisitorsWidget';
import { ModulePopularPagesWidget, ModuleOverviewWidget, ModuleAcquisitionChannelsWidget } from '../assets/js/modules/analytics/components/module';
import { STORE_NAME } from '../assets/js/modules/analytics/datastore/constants';
import { accountsPropertiesProfiles, goals } from '../assets/js/modules/analytics/datastore/__fixtures__';
@@ -288,76 +287,6 @@ generateAnalyticsWidgetStories( {
},
} );
-generateAnalyticsWidgetStories( {
- group: 'Analytics Module/Components/Dashboard/Unique Visitors Widget',
- referenceDate: '2020-09-08',
- ...generateData( [
- {
- compareStartDate: '2020-07-14',
- compareEndDate: '2020-08-10',
- startDate: '2020-08-11',
- endDate: '2020-09-07',
- dimensionFilters: { 'ga:channelGrouping': 'Organic Search' },
- dimensions: [ 'ga:channelGrouping' ],
- metrics: [
- {
- expression: 'ga:users',
- alias: 'Total Users',
- },
- ],
- },
- {
- startDate: '2020-08-11',
- endDate: '2020-09-07',
- dimensionFilters: { 'ga:channelGrouping': 'Organic Search' },
- dimensions: [ 'ga:date', 'ga:channelGrouping' ],
- metrics: [
- {
- expression: 'ga:users',
- alias: 'Users',
- },
- ],
- },
- ] ),
- Component: DashboardSearchVisitorsWidget,
-} );
-
-generateAnalyticsWidgetStories( {
- group: 'Analytics Module/Components/Page Dashboard/Unique Visitors Widget',
- referenceDate: '2020-09-08',
- ...generateData( [
- {
- compareStartDate: '2020-07-14',
- compareEndDate: '2020-08-10',
- startDate: '2020-08-11',
- endDate: '2020-09-07',
- url: 'https://www.example.com/example-page/',
- dimensionFilters: { 'ga:channelGrouping': 'Organic Search' },
- dimensions: [ 'ga:channelGrouping' ],
- metrics: [
- {
- expression: 'ga:users',
- alias: 'Total Users',
- },
- ],
- },
- {
- startDate: '2020-08-11',
- endDate: '2020-09-07',
- url: 'https://www.example.com/example-page/',
- dimensionFilters: { 'ga:channelGrouping': 'Organic Search' },
- dimensions: [ 'ga:date', 'ga:channelGrouping' ],
- metrics: [
- {
- expression: 'ga:users',
- alias: 'Users',
- },
- ],
- },
- ] ),
- Component: DashboardSearchVisitorsWidget,
-} );
-
generateAnalyticsWidgetStories( {
group: 'Analytics Module/Components/Dashboard/Popular Pages Widget',
referenceDate: '2020-09-10',
| 2 |
diff --git a/lib/plugins/aws/provider/awsProvider.test.js b/lib/plugins/aws/provider/awsProvider.test.js @@ -240,6 +240,7 @@ describe('AwsProvider', () => {
describe('#request()', () => {
beforeEach(() => {
+ serverless.service.provider.credentials = {}
const originalSetTimeout = setTimeout;
sinon
.stub(global, 'setTimeout')
| 12 |
diff --git a/packages/component-library/src/Scatterplot/Scatterplot.test.js b/packages/component-library/src/Scatterplot/Scatterplot.test.js @@ -27,10 +27,10 @@ describe('Scatterplot', () => {
const wrapper = shallow(<Scatterplot data={simpleData} />);
expect(wrapper.find({ title: 'Scatter Plot' }).length).to.eql(1);
expect(wrapper.find({ title: 'Scatter Plot' }).props().data).to.eql([
- { dataKey: 100, dataValue: 1, series: undefined, size: 3 },
- { dataKey: 200, dataValue: 2, series: undefined, size: 3 },
- { dataKey: 300, dataValue: 3, series: undefined, size: 3 },
- { dataKey: 400, dataValue: 4, series: undefined, size: 3 },
+ { dataKey: 100, dataValue: 1, label: "X: 100 | Y: 1", series: undefined, size: 3 },
+ { dataKey: 200, dataValue: 2, label: "X: 200 | Y: 2", series: undefined, size: 3 },
+ { dataKey: 300, dataValue: 3, label: "X: 300 | Y: 3", series: undefined, size: 3 },
+ { dataKey: 400, dataValue: 4, label: "X: 400 | Y: 4", series: undefined, size: 3 },
]);
});
@@ -65,10 +65,10 @@ describe('Scatterplot', () => {
};
const wrapper = shallow(<Scatterplot {...props} />);
expect(wrapper.find({ title: 'Scatter Plot' }).props().data).to.eql([
- { dataKey: 100, dataValue: 1, series: 'first', size: 3 },
- { dataKey: 200, dataValue: 2, series: 'first', size: 3 },
- { dataKey: 100, dataValue: 3, series: 'second', size: 3 },
- { dataKey: 200, dataValue: 3, series: 'second', size: 3 },
+ { dataKey: 100, dataValue: 1, label: "X: 100 | Y: 1", series: 'first', size: 3 },
+ { dataKey: 200, dataValue: 2, label: "X: 200 | Y: 2", series: 'first', size: 3 },
+ { dataKey: 100, dataValue: 3, label: "X: 100 | Y: 3", series: 'second', size: 3 },
+ { dataKey: 200, dataValue: 3, label: "X: 200 | Y: 3", series: 'second', size: 3 },
]);
});
@@ -95,19 +95,19 @@ describe('Scatterplot', () => {
};
const wrapper = shallow(<Scatterplot {...props} />);
expect(wrapper.find({ title: 'Scatter Plot' }).props().data).to.eql([
- { dataKey: 100, dataValue: 1, series: undefined, size: 3 },
- { dataKey: 200, dataValue: 2, series: undefined, size: 3 },
- { dataKey: 300, dataValue: 3, series: undefined, size: 3 },
- { dataKey: 400, dataValue: 4, series: undefined, size: 3 },
+ { dataKey: 100, dataValue: 1, label: "X: 100 | Y: 1", series: undefined, size: 3 },
+ { dataKey: 200, dataValue: 2, label: "X: 200 | Y: 2", series: undefined, size: 3 },
+ { dataKey: 300, dataValue: 3, label: "X: 300 | Y: 3", series: undefined, size: 3 },
+ { dataKey: 400, dataValue: 4, label: "X: 400 | Y: 4", series: undefined, size: 3 },
]);
wrapper.setProps({ size: { key: 'y' } });
expect(wrapper.find({ title: 'Scatter Plot' }).props().data).to.eql([
- { dataKey: 100, dataValue: 1, series: undefined, size: 1 },
- { dataKey: 200, dataValue: 2, series: undefined, size: 2 },
- { dataKey: 300, dataValue: 3, series: undefined, size: 3 },
- { dataKey: 400, dataValue: 4, series: undefined, size: 4 },
+ { dataKey: 100, dataValue: 1, label: "X: 100 | Y: 1", series: undefined, size: 1 },
+ { dataKey: 200, dataValue: 2, label: "X: 200 | Y: 2", series: undefined, size: 2 },
+ { dataKey: 300, dataValue: 3, label: "X: 300 | Y: 3", series: undefined, size: 3 },
+ { dataKey: 400, dataValue: 4, label: "X: 400 | Y: 4", series: undefined, size: 4 },
]);
});
});
| 3 |
diff --git a/generators/app/index.js b/generators/app/index.js @@ -334,20 +334,24 @@ module.exports = class JHipsterAppGenerator extends BaseBlueprintGenerator {
_composing() {
return {
/**
- * Composing with others generators, must be runned after `configuring` priority to let blueprints
- * `configuring` tasks to run.
- * But must be the first task to run at `default` priority.
- * When mixing blueprints with sbs-blueprints, sbs-blueprints must be called after, otherwise the
- * priority will run before this `composing` task and the configuration will not be settled.
+ * Composing with others generators, must be executed after `configuring` priority to let others
+ * generators `configuring` priority to run.
+ *
+ * Generators `server`, `client`, `common`, `languages` depends on each other.
+ * We are composing in the same task so every priority are executed in parallel.
+ * - compose (app) -> initializing (common) -> initializing (server) -> ...
+ *
+ * When composing in different tasks the result would be:
+ * - composeCommon (app) -> initializing (common) -> prompting (common) -> ... -> composeServer (app) -> initializing (server) -> ...
*/
- composing() {
+ compose() {
+ this.composeWithJHipster('common', true);
if (!this.skipServer) {
this.composeWithJHipster('server', true);
}
if (!this.skipClient) {
this.composeWithJHipster('client', true);
}
- this.composeWithJHipster('common', true);
if (!this.configOptions.skipI18n) {
this.composeWithJHipster(
'languages',
@@ -361,16 +365,10 @@ module.exports = class JHipsterAppGenerator extends BaseBlueprintGenerator {
askForTestOpts: prompts.askForTestOpts,
askForMoreModules: prompts.askForMoreModules,
- };
- }
- get composing() {
- if (useBlueprints) return;
- return this._composing();
- }
-
- _loading() {
- return {
+ /**
+ * At this point every other generator should already be configured, so, enforce defaults fallback.
+ */
saveConfigWithDefaults() {
this.setConfigDefaults();
@@ -383,12 +381,29 @@ module.exports = class JHipsterAppGenerator extends BaseBlueprintGenerator {
this.blueprintVersion && (config.blueprintVersion = this.blueprintVersion);
this.config.set(config);
},
+
+ composeEntities() {
+ if (!this.withEntities) return;
+ this.composeWithJHipster('entities', { skipInstall: true }, true);
+ },
+
+ composePages() {
+ if (!this.jhipsterConfig.pages || this.jhipsterConfig.pages.length === 0 || this.configOptions.skipComposePage) return;
+ this.configOptions.skipComposePage = true;
+ this.jhipsterConfig.pages.forEach(page => {
+ this.composeWithJHipster(page.generator || 'page', {
+ skipInstall: true,
+ arguments: [page.name],
+ page,
+ });
+ });
+ },
};
}
- get loading() {
+ get composing() {
if (useBlueprints) return;
- return this._loading();
+ return this._composing();
}
_default() {
@@ -424,23 +439,6 @@ module.exports = class JHipsterAppGenerator extends BaseBlueprintGenerator {
cleanup.upgradeFiles(this);
},
- composeEntities() {
- if (!this.withEntities) return;
- this.composeWithJHipster('entities', { skipInstall: true }, true);
- },
-
- regeneratePages() {
- if (!this.jhipsterConfig.pages || this.jhipsterConfig.pages.length === 0 || this.configOptions.skipComposePage) return;
- this.configOptions.skipComposePage = true;
- this.jhipsterConfig.pages.forEach(page => {
- this.composeWithJHipster(page.generator || 'page', {
- skipInstall: true,
- arguments: [page.name],
- page,
- });
- });
- },
-
...super._missingPostWriting(),
};
}
| 7 |
diff --git a/src/components/mousewheel/mousewheel.js b/src/components/mousewheel/mousewheel.js @@ -319,10 +319,18 @@ const Mousewheel = {
const window = getWindow();
if (
- this.params.mousewheel.preventSwipeThreshold &&
- newEvent.delta < this.params.mousewheel.preventSwipeThreshold
+ this.params.mousewheel.preventSwipeThresholdDelta &&
+ newEvent.delta < this.params.mousewheel.preventSwipeThresholdDelta
) {
- // Prevent swipe if delta of wheel scroll is below threshold
+ // Prevent if delta of wheel scroll delta is below configured threshold
+ return false;
+ }
+
+ if (
+ this.params.mousewheel.preventSwipeThresholdTime &&
+ now() - swiper.mousewheel.lastScrollTime < this.params.mousewheel.preventSwipeThresholdTime
+ ) {
+ // Prevent if time between scrolls is below configured threshold
return false;
}
@@ -421,7 +429,8 @@ export default {
forceToAxis: false,
sensitivity: 1,
eventsTarget: 'container',
- preventSwipeThreshold: null,
+ preventSwipeThresholdDelta: null,
+ preventSwipeThresholdTime: null,
},
},
create() {
| 0 |
diff --git a/pages/bases-locales/publication.js b/pages/bases-locales/publication.js import {useState, useEffect, useCallback} from 'react'
import PropTypes from 'prop-types'
import Image from 'next/image'
+import Link from 'next/link'
import Page from '@/layouts/main'
@@ -138,7 +139,7 @@ function PublicationPage({defaultRevision, defaultHabilitation, defaultCommune,
{commune && (
<div className='commune-infos'>
<Image src='/images/icons/commune.svg' height={60} width={60} />
- <div>{commune.nom} - {commune.code}</div>
+ <Link href={`/commune/${commune.code}`} passHref><div>{commune.nom} - {commune.code}</div></Link>
</div>
)}
@@ -209,6 +210,8 @@ function PublicationPage({defaultRevision, defaultHabilitation, defaultCommune,
font-weight: bold;
font-size: 24px;
text-align: center;
+ text-decoration: underline;
+ cursor: pointer;
}
.loading {
| 0 |
diff --git a/components/DataGrid/DataGrid.js b/components/DataGrid/DataGrid.js @@ -596,7 +596,7 @@ var DataGrid = function (_props)
_cellItemRenderers[Math.min(rowIndex, _rowCount - 1)][columnIndex].hide();
let itemEditorInfo = _cellItemEditors[columnIndex];
let itemEditor;
- if (itemEditorInfo == null || !document.contains(itemEditorInfo.itemEditor.$el[0]))
+ if (itemEditorInfo == null || !itemEditorInfo.itemEditor.$el[0].isConnected)
{
let ctor;
if (typeof column.itemEditor.ctor == "string")
@@ -612,7 +612,8 @@ var DataGrid = function (_props)
column.itemEditor.props.parentRepeater = _self.proxyMaybe;
column.itemEditor.props.repeaterIndex = rowIndex;
column.itemEditor.props.bindingDefaultContext = data;
- itemEditor = await Component.fromLiteral(column.itemEditor);
+ let component = ObjectUtils.deepCopy(column.itemEditor);
+ itemEditor = await Component.fromLiteral(component);
//let props = extend(true, true, column.itemEditor.props);
//delete props["value"];
| 14 |
diff --git a/articles/extensions/deploy-cli/guides/incorporate-deploy-cli-into-build-environment.md b/articles/extensions/deploy-cli/guides/incorporate-deploy-cli-into-build-environment.md @@ -52,7 +52,7 @@ Your CI server should have a different deploy task and config for each environme
The deploy task should do the following:
- 1. Update the local repo to include latest the latest changes (each environment should have its own branch of the repository that can later be merged with other branches)
+ 1. Update the local repo to include the latest changes (each environment should have its own branch of the repository that can later be merged with other branches)
1. If there are changes, call `a0deploy`.
1. Run a suite of tests to confirm configuration is working.
1. (Optional) Merge to next branch (e.g. `development` to `uat` or `uat` to `staging`.
| 2 |
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml @@ -46,9 +46,9 @@ jobs:
run: yarn build
- name: Github auth
run: |
- git config --global user.name 'Your Name'
- git config --global user.email '[email protected]'
- git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/semrush/intergalactic
+ git config --global user.name 'semrush-ci-whale'
+ git config --global user.email '[email protected]'
+ git remote set-url origin https://x-access-token:${{ secrets.BOT_ACCOUNT_GITHUB_TOKEN }}@github.com/semrush/intergalactic
- name: Lint
run: yarn lint
- name: Test
| 12 |
diff --git a/package.json b/package.json "version": "0.1.0",
"description": "",
"scripts": {
- "clean": "rm -rf node_modules && lerna clean --yes",
+ "clean": "lerna clean --yes || true",
+ "postclean": "rm -rf node_modules",
"postinstall": "lerna bootstrap",
"test": "jest",
"posttest": "standard",
"setupTestFrameworkScriptFile": "jest-extended"
},
"standard": {
- "envs": ["jest"]
+ "envs": [
+ "jest"
+ ]
}
}
\ No newline at end of file
| 11 |
diff --git a/src/core/content/connector.js b/src/core/content/connector.js @@ -482,6 +482,9 @@ function BaseConnector() {
*/
let isPlaying = this.isPlaying();
if (isPlaying !== currentState.isPlaying) {
+ // @ifdef DEBUG
+ Util.debugLog(`isPlaying state changed to ${isPlaying}`);
+ // @endif
this.stateChangedWorker();
} else {
this.stateChangedWorkerThrottled();
@@ -626,10 +629,12 @@ function BaseConnector() {
}
// @ifdef DEBUG
- let isNewSongPlaying = !(changedFields.length === 1 &&
- changedFields.includes('currentTime'));
- if (isNewSongPlaying) {
+ const fields = ['artist', 'track', 'album', 'uniqueID'];
+ for (const field of fields) {
+ if (changedFields.includes(field)) {
TestReporter.reportSongRecognition(filteredState);
+ continue;
+ }
}
// @endif
}
| 7 |
diff --git a/src/mode/cam/ops.js b/src/mode/cam/ops.js slice(progress) {
let { op, state } = this;
let { tool, rate, down, plunge, offset } = op;
- let { settings, widget, sliceAll, zMax, zTop, tabs } = state;
+ let { settings, widget, sliceAll, zMax, zTop, zThru, tabs } = state;
let { updateToolDiams, cutTabs, cutPolys, healPolys } = state;
let { process, stock } = settings;
let poly2polyEmit = BASE.util.poly2polyEmit;
}
for (let pi of poly)
if (down) {
- for (let z of BASE.util.lerp(zTop, pi.getZ(), down)) {
+ let zto = pi.getZ();
+ if (zThru && similar(zto,0)) {
+ zto -= zThru;
+ }
+ for (let z of BASE.util.lerp(zTop, zto, down)) {
followZ(pi.clone().setZ(z));
}
} else {
| 11 |
diff --git a/articles/email/custom.md b/articles/email/custom.md @@ -18,8 +18,6 @@ The Auth0 Management API provides endpoints that allow you to completely manage
To begin, you will need to disable automatic emails by deselecting **Status** under the **Verification Email** and **Welcome Email** tabs on the [Email Templates](${manage_url}/#/emails) page of the Auth0 dashboard.
-
-
## Verification Email
A verification email should be sent to every user for which the `email_verified` property is `false`. Typically, these are users in database connections or users authenticating with Social Providers that do not validate email addresses upon new user registration.
| 2 |
diff --git a/src/components/Modeler.vue b/src/components/Modeler.vue <button @click="redo" :disabled="!canRedo" data-test="redo">Redo</button>
</div>
- <button class="validate-button" @click="validateBpmnDiagram">Validate Diagram</button>
-
<drop @drop="handleDrop" @dragover="validateDropTarget">
<div ref="paper" data-test="paper"/>
</drop>
@@ -728,13 +726,6 @@ $cursors: default, not-allowed;
cursor: pointer;
}
}
-
- .validate-button {
- position: absolute;
- top: 1rem;
- right: 1rem;
- cursor: pointer;
- }
}
@each $cursor in $cursors {
| 2 |
diff --git a/test/server/card/drawcard.hasKeyword.spec.js b/test/server/card/drawcard.hasKeyword.spec.js @@ -76,7 +76,7 @@ describe('the DrawCard', function() {
describe('when the card has a keyword line', function() {
beforeEach(function() {
- this.card = new DrawCard(this.player, { type_code: 'attachment', cost: 0, text: 'Ancestral. Notarealkeyword.\n' });
+ this.card = new DrawCard(this.player, { type_code: 'attachment', cost: 0, text: 'Ancestral. Notarealkeyword.\n Extra text because we need stuff here.' });
this.card.location = 'hand';
this.player.hand = _([this.card]);
this.player.playCard(this.card, true);
| 3 |
diff --git a/js/annotationtools/ToolBar.js b/js/annotationtools/ToolBar.js +/**
+ * Get option values for "tool" element, else set default values.
+ *
+ * @param element
+ * @param options
+ * @constructor
+ */
var ToolBar = function (element, options) {
// console.log(options)
this.annotools = options.annotool
@@ -13,6 +20,11 @@ var ToolBar = function (element, options) {
this.iid = options.iid || null
this.annotationActive = isAnnotationActive()
}
+
+/**
+ * Print message to console.
+ * @param msg
+ */
ToolBar.prototype.showMessage = function (msg) {
console.log(msg)
}
@@ -68,7 +80,6 @@ function goodalgo (data, status) {
icons: true, // Display node icons.
keyboard: true, // Support keyboard navigation.
keyPathSeparator: '/', // Used by node.getKeyPath() and tree.loadKeyPath().
- minExpandLevel: 1, // 1: root node is not collapsible
quicksearch: false, // Navigate to next node by typing the first letters.
selectMode: 2, // 1:single, 2:multi, 3:multi-hier
tabbable: true, // Whole tree behaves as one single control
@@ -95,6 +106,9 @@ var SELECTED_ALGORITHM_KEYS = [];
var SELECTED_ALGORITHM_COLOR = {};
var AlgorithmSelectorHidden = true;
+/**
+ * Show/Hide "Select Algorithm" menu
+ */
ToolBar.prototype.toggleAlgorithmSelector = function () {
var self = this;
console.log("toggleAlgorithmSelector");
@@ -154,8 +168,9 @@ ToolBar.prototype.toggleAlgorithmSelector = function () {
jQuery("#panel").html(htmlStr);
-
-
+ /**
+ * Open Select Algorithm menu.
+ */
jQuery("#algorithmList input[type=checkbox]").each(function () {
var elem = jQuery(this)
@@ -172,6 +187,9 @@ ToolBar.prototype.toggleAlgorithmSelector = function () {
self.annotools.getMultiAnnot();
+ /**
+ * Select algorithm from menu.
+ */
jQuery('#algorithmList input[type=checkbox]').change(function () {
console.log("change");
SELECTED_ALGORITHM_LIST = [];
@@ -257,6 +275,9 @@ ToolBar.prototype.createButtons = function () {
tool.addClass('annotools') // Update Styles
// this.tool.makeDraggable(); //Make it Draggable.
+ /**
+ * Set up Toolbar buttons
+ */
if (this.annotationActive) {
/*
@@ -264,9 +285,6 @@ ToolBar.prototype.createButtons = function () {
* Mootools to Jquery for creation of toolbar buttons
*/
- /**
- * Toolbar buttons
- */
this.homebutton = jQuery('<img>', {
'data-toggle': 'tooltip', 'data-placement': 'bottom',
src: 'images/ic_home_white_24px.svg',
@@ -439,7 +457,10 @@ ToolBar.prototype.createButtons = function () {
var y2 = y1 + annotool.imagingHelper._viewportHeight;
var zoom = viewer.viewport.getZoom();
//zoom = parseInt(zoom);
- if (zoom<1.0) zoom=1.0;
+ if (zoom < 1.0)
+ {
+ zoom = 1.0;
+ }
var width, height;
//get image width and height
var url = 'api/Data/getImageInfoByCaseID.php?case_id=' + tissueId;
@@ -461,7 +482,6 @@ ToolBar.prototype.createButtons = function () {
}.bind(this))
-
this.rectbutton.on('click', function () {
this.mode = 'rect'
this.annotools.mode = 'rect'
@@ -642,7 +662,6 @@ ToolBar.prototype.createButtons = function () {
}).inject(this.tool) //Quit Button
*/
if (this.annotationActive) {
+ // empty block
}
}
-
-
| 1 |
diff --git a/src/viewport.js b/src/viewport.js @@ -165,8 +165,8 @@ $.Viewport.prototype = {
// deprecated
set degrees (degrees) {
- $.console.warn('Setting [Viewport.degrees] is deprecated. Use viewport.setRotation instead.');
- this.setRotation(degrees);
+ $.console.warn('Setting [Viewport.degrees] is deprecated. Use viewport.rotateTo, viewport.rotateBy, or viewport.setRotation instead.');
+ this.rotateTo(degrees);
},
/**
@@ -925,17 +925,16 @@ $.Viewport.prototype = {
},
/**
- * Rotates this viewport to the angle specified. Almost an alias for rotateTo,
- * but with a different order of arguments to maintain backwards compatibility.
+ * Rotates this viewport to the angle specified. Alias for rotateTo.
* @function
* @param {Number} degrees The degrees to set the rotation to.
- * @param {Boolean} [immediately=false] Whether to animate to the new angle
- * or rotate immediately.
* @param {OpenSeadragon.Point} [pivot] (Optional) point in viewport coordinates
* around which the rotation should be performed. Defaults to the center of the viewport.
- * @returns {OpenSeadragon.Viewport} Chainable.
+ * @param {Boolean} [immediately=false] Whether to animate to the new angle
+ * or rotate immediately.
+ * * @returns {OpenSeadragon.Viewport} Chainable.
*/
- setRotation: function(degrees, immediately, pivot) {
+ setRotation: function(degrees, pivot, immediately) {
return this.rotateTo(degrees, pivot, immediately);
},
@@ -982,7 +981,7 @@ $.Viewport.prototype = {
this.rotationPivot = null;
return this;
}
- this._rotateAboutPivot(true, degrees);
+ this._rotateAboutPivot(degrees);
} else{
this.degreesSpring.resetTo(degrees);
}
@@ -1104,7 +1103,7 @@ $.Viewport.prototype = {
this.centerSpringY.update();
if(this.rotationPivot){
- this._rotateAboutPivot();
+ this._rotateAboutPivot(true);
}
else{
this.degreesSpring.update();
@@ -1125,17 +1124,18 @@ $.Viewport.prototype = {
return changed;
},
- // private
- _rotateAboutPivot: function(immediately, degrees){
- //immediately defaults to false; degrees are ignored for immediately==false
+ // private - pass true to use spring, or a number for degrees for immediate rotation
+ _rotateAboutPivot: function(degreesOrUseSpring){
+ var useSpring = degreesOrUseSpring === true;
+
var delta = this.rotationPivot.minus(this.getCenter());
this.centerSpringX.shiftBy(delta.x);
this.centerSpringY.shiftBy(delta.y);
- if(immediately){
- this.degreesSpring.resetTo(degrees);
- } else {
+ if(useSpring){
this.degreesSpring.update();
+ } else {
+ this.degreesSpring.resetTo(degreesOrUseSpring);
}
var changeInDegrees = this.degreesSpring.current.value - this._oldDegrees;
| 3 |
diff --git a/src/components/stepOne.js b/src/components/stepOne.js @@ -78,7 +78,7 @@ export class stepOne extends React.Component {
state.contracts[contract] = {
src,
bin,
- abi: JSON.parse(abi),
+ abi: JSON.parse(JSON.stringify(abi)),
addr: (contract=="crowdsale" || contract=="pricingStrategy" || contract=="finalizeAgent")?[]:"",
abiConstructor: (contract=="crowdsale" || contract=="pricingStrategy" || contract=="finalizeAgent")?[]:""
}
| 1 |
diff --git a/packages/app/src/services/renderer/rehype-plugins/keyword-highlighter.ts b/packages/app/src/services/renderer/rehype-plugins/keyword-highlighter.ts @@ -10,7 +10,7 @@ import { Plugin } from 'unified';
* @param value
* @returns
*/
-function splitWithKeyword(keyword: string, value: string): string[] {
+function splitWithKeyword(lowercasedKeyword: string, value: string): string[] {
if (value.length === 0) {
return [];
}
@@ -21,7 +21,7 @@ function splitWithKeyword(keyword: string, value: string): string[] {
const splitted: string[] = [];
do {
- cursorEnd = value.indexOf(keyword, cursorStart);
+ cursorEnd = value.toLowerCase().indexOf(lowercasedKeyword, cursorStart);
// not found
if (cursorEnd === -1) {
@@ -29,7 +29,7 @@ function splitWithKeyword(keyword: string, value: string): string[] {
}
// keyword is found
else if (cursorEnd === cursorStart) {
- cursorEnd += keyword.length;
+ cursorEnd += lowercasedKeyword.length;
}
splitted.push(value.slice(cursorStart, cursorEnd));
@@ -50,17 +50,17 @@ function wrapWithEm(textElement: Text): Element {
};
}
-function highlight(keyword: string, node: Text, index: number, parent: Root | Element): void {
- if (node.value.includes(keyword)) {
- const splitted = splitWithKeyword(keyword, node.value);
+function highlight(lowercasedKeyword: string, node: Text, index: number, parent: Root | Element): void {
+ if (node.value.toLowerCase().includes(lowercasedKeyword)) {
+ const splitted = splitWithKeyword(lowercasedKeyword, node.value);
parent.children[index] = {
type: 'element',
tagName: 'span',
properties: {},
children: splitted.map((text) => {
- return text === keyword
- ? wrapWithEm({ type: 'text', value: keyword })
+ return text.toLowerCase() === lowercasedKeyword
+ ? wrapWithEm({ type: 'text', value: text })
: { type: 'text', value: text };
}),
};
@@ -79,11 +79,13 @@ export const rehypePlugin: Plugin<[KeywordHighlighterPluginParams]> = (options)
const keywords = (typeof options.keywords === 'string') ? [options.keywords] : options.keywords;
+ const lowercasedKeywords = keywords.map(keyword => keyword.toLowerCase());
+
// return rehype-rewrite with hithlighter
return rehypeRewrite.bind(this)({
rewrite: (node, index, parent) => {
if (parent != null && index != null && node.type === 'text') {
- keywords.forEach(keyword => highlight(keyword, node, index, parent));
+ lowercasedKeywords.forEach(keyword => highlight(keyword, node, index, parent));
}
},
});
| 8 |
diff --git a/src/scripts/interactive-video.js b/src/scripts/interactive-video.js @@ -1497,11 +1497,13 @@ InteractiveVideo.prototype.toggleEndscreen = function (show) {
if (show) {
this.disableTabIndexes('.h5p-interactive-video-endscreen');
+ this.controls.$endscreensButton.attr('aria-expanded', true);
this.stateBeforeEndscreen = this.currentState;
this.video.pause();
}
else {
this.restoreTabIndexes();
+ this.controls.$endscreensButton.attr('aria-expanded', false);
this.controls.$endscreensButton.focus();
// Continue video if it had been playing before opening the endscreen
@@ -1994,7 +1996,10 @@ InteractiveVideo.prototype.attachControls = function ($wrapper) {
const starClick = (self.editor) ? (() => self.toggleEndscreensChooser()) : (() => self.toggleEndscreen());
self.controls.$endscreensButton = self.createButton(starClass, 'h5p-control', self.$star, starClick);
- self.controls.$endscreensButton.attr('aria-label', self.l10n.summary);
+ self.controls.$endscreensButton
+ .attr('aria-label', self.l10n.summary)
+ .attr('aria-haspopup', 'dialog')
+ .attr('aria-expanded', 'false');
self.popupMenuButtons.push(self.controls.$endscreensButton);
}
| 0 |
diff --git a/tools/make/lib/addons/Makefile b/tools/make/lib/addons/Makefile @@ -56,8 +56,11 @@ install-addons: $(NODE_GYP)
echo "Add-on: $$pkg"; \
echo 'Compiling source...'; \
cd $$pkg/src && \
+ CC=$(CC) \
C_COMPILER=$(C_COMPILER) \
+ CXX=$(CXX) \
FORTRAN_COMPILER=$(FORTRAN_COMPILER) \
+ FC=$(FC) \
fPIC=$(fPIC) \
$(MAKE); \
echo 'Building add-on...'; \
| 12 |
diff --git a/src/react/projects/spark-react/src/SprkButton/SprkButton.js b/src/react/projects/spark-react/src/SprkButton/SprkButton.js @@ -36,7 +36,7 @@ const SprkButton = ({
data-id={idString}
data-analytics={analyticsString}
disabled={disabled}
- href={href}
+ href={TagName !== 'button' ? href : undefined}
{...rest}
>
{(loading && <SprkSpinner />) || children}
| 3 |
diff --git a/src/components/layouts/Layout.js b/src/components/layouts/Layout.js @@ -76,15 +76,12 @@ const Layout = ({ children, initialContext, hasSideBar, location }) => {
Skip to Main Content
</SprkLink>
</div>
- <div
- className="sprk-u-BackgroundColor--black
- sprk-u-pvm
- sprk-u-AbsoluteCenter"
- >
- <p className="sprk-u-Color--white sprk-u-pam">
- Designs launching
- <span className="sprk-u-FontWeight--bold sprk-u-mas">before</span>
- July 14, 2021 should reference
+ <div className="sprk-u-BackgroundColor--black sprk-u-AbsoluteCenter sprk-u-pam">
+ <p className="sprk-u-Color--white">
+ <span className="sprk-u-FontWeight--bold sprk-u-mrs">
+ Designs launching before July 14, 2021
+ </span>
+ should reference
<a
href="https://sparkdesignsystem.com/"
className="docs-c-Banner--link sprk-u-mls"
| 3 |
diff --git a/src/lambda/routes/invocations/invocationsRoute.js b/src/lambda/routes/invocations/invocationsRoute.js @@ -50,6 +50,6 @@ export default function invocationsRoute(lambda) {
},
tags: ['api'],
},
- path: '/{apiVersion}/functions/{functionName}/invocations',
+ path: '/2015-03-31/functions/{functionName}/invocations',
}
}
| 0 |
diff --git a/content/custom-scripts/beta-deployment-with-fastlane.md b/content/custom-scripts/beta-deployment-with-fastlane.md @@ -4,10 +4,10 @@ title: Run fastlane for beta deployment
weight: 4
---
-If your Flutter app has an existing *fastlane* setup for beta deployment, you can easily run *fastlane* scripts as part of the Codemagic build process and publish to Crashlytics, for example. Note that our builder machines have *fastlane* pre-installed. You can use the pre-build script example below to execute `fastlane beta` for successful Android builds.
+If your Flutter app has an existing *fastlane* setup for beta deployment, you can easily run *fastlane* scripts as part of the Codemagic build process and publish to Crashlytics, for example. Note that our builder machines have *fastlane* pre-installed. You can use the pre-publish script example below to execute `fastlane beta` for successful Android builds.
1. Before running the script, navigate to **App settings > Environment variables** and add the API keys / secrets required for authorizing with the third-party service as secure [environment variables](../building/environment-variables).
-2. Click on the + sign between **Build** and **Publish** and paste your script to the pre-build script field.
+2. Click on the + sign between **Build** and **Publish** and paste your script to the pre-publish script field.
```
#!/usr/bin/env sh
| 1 |
diff --git a/app/collections/files.js b/app/collections/files.js @@ -10,12 +10,16 @@ var cookie = require('../cookie');
var util = require('../util');
var ignore = require('ignore');
-function replaceVariables (variables, setting) {
- var result = setting;
+/*
+ * placeholderValues {object} mapping of placeholders, ie {CURRENT_USER: 'sally'}
+ * initialValue {string} default value possibly containing placeholder
+ */
+function replacePlaceholders (placeholderValues, initialValue) {
+ var result = initialValue;
if (result) {
- for (var name in variables) {
- if (result.indexOf(name) >= 0 && variables[name]) {
- result = result.replace(name, variables[name]);
+ for (var item in placeholderValues) {
+ if (result.indexOf(item) >= 0 && placeholderValues[item]) {
+ result = result.replace(item, placeholderValues[item]);
}
}
}
@@ -108,11 +112,11 @@ module.exports = Backbone.Collection.extend({
this.parseIgnore(config.prose.ignore);
}
- var variables = this.getVariables();
+ var placeholderValues = this.getPlaceholderValues();
- this.config.rooturl = replaceVariables(variables, this.config.rooturl);
- this.config.media = replaceVariables(variables, this.config.media);
- this.config.siteurl = replaceVariables(variables, this.config.siteurl);
+ this.config.rooturl = replacePlaceholders(placeholderValues, this.config.rooturl);
+ this.config.media = replacePlaceholders(placeholderValues, this.config.media);
+ this.config.siteurl = replacePlaceholders(placeholderValues, this.config.siteurl);
if (config.prose.metadata) {
var metadata = config.prose.metadata;
@@ -154,11 +158,11 @@ module.exports = Backbone.Collection.extend({
// replace default values like CURRENT_USER and CURRENT_DATETIME
if (value && value.field && value.field.value) {
- value.field.value = replaceVariables(variables, value.field.value);
+ value.field.value = replacePlaceholders(placeholderValues, value.field.value);
}
});
} else if (_.isString(raw)) {
- raw = replaceVariables(variables, raw);
+ raw = replacePlaceholders(placeholderValues, raw);
try {
defaults = jsyaml.safeLoad(raw);
} catch(err) {
@@ -316,7 +320,9 @@ module.exports = Backbone.Collection.extend({
return this.repo.url() + '/git/trees/' + this.sha + '?recursive=1';
},
- getVariables: function() {
+ // Create a mapping of values to replace placeholders, ie 'CURRENT_DATETIME'.
+ // Optionally allows a user alias to take the place of the actual login.
+ getPlaceholderValues: function() {
var login = cookie.get('login');
var user = login;
| 0 |
diff --git a/src/components/explorer/builder/QueryForm.js b/src/components/explorer/builder/QueryForm.js @@ -16,6 +16,7 @@ import SavedSearchControls from './SavedSearchControls';
import { emptyString, validDate } from '../../../lib/formValidators';
import { isStartDateAfterEndDate, isValidSolrDate } from '../../../lib/dateUtil';
import { KEYWORD, MEDIA, DATES } from '../../../lib/explorerUtil';
+import { ALL_MEDIA } from '../../../lib/mediaUtil';
import messages from '../../../resources/messages';
const formSelector = formValueSelector('queryForm');
@@ -73,10 +74,14 @@ class QueryForm extends React.Component {
if (cleanedInitialValues.disabled === undefined) {
cleanedInitialValues.disabled = false;
}
+ if (initialValues.collections && initialValues.collections.length && initialValues.collections[0].tags_id === ALL_MEDIA) {
+ cleanedInitialValues.media = [{ id: ALL_MEDIA, label: formatMessage(messages.allMedia) }];
+ } else {
cleanedInitialValues.media = [ // merge intial sources and collections into one list for display with `renderFields`
...initialValues.sources,
...initialValues.collections,
];
+ }
selected.media = [ // merge sources and collections into one list for display with `renderFields`
...selected.sources,
...selected.collections,
| 9 |
diff --git a/devtools/test_dashboard/index-mathjax3.html b/devtools/test_dashboard/index-mathjax3.html <section id="mocks-list"></section>
- <p>MathJax $V^3$ with $svg$ output on the page as well as plotly graphs</p>
+ <p id="pWithMathJax">MathJax $V^3$ with $svg$ output on the page as well as plotly graphs</p>
+ <h4>no MathJax: Apple: $2, Orange: $3</h4>
+
<div id="plots">
<div id="graph"></div>
</div>
<div id="snapshot"></div>
+ <script>
+ window.MathJax = {
+ startup: {
+ elements: [
+ document.getElementById('pWithMathJax')
+ ],
+ // typeset: false,
+ // in case the elements array is empty one could disable startup typeset
+ // https://docs.mathjax.org/en/latest/options/startup/startup.html#the-configuration-block
+ }
+ };
+ </script>
<script src="../../node_modules/mathjax-v3/es5/tex-svg.js"></script>
<script charset="utf-8" id="source" src="../../build/plotly.js" type="module"></script>
<script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script>
| 7 |
diff --git a/services/importer/spec/acceptance/shp_spec.rb b/services/importer/spec/acceptance/shp_spec.rb @@ -53,8 +53,6 @@ describe 'SHP regression tests' do
user: @user
})
runner.run
- puts runner.log
- Rails.logger.info runner.log
geometry_type_for(runner, @user).should eq "MULTIPOLYGON"
job = runner.send(:job)
| 2 |
diff --git a/app/src/scripts/admin/admin.store.js b/app/src/scripts/admin/admin.store.js @@ -326,8 +326,9 @@ let UserStore = Reflux.createStore({
required: true,
type: 'select',
}
-
+ if (!formData.parameters.includes('participant_label')) {
formData.parameters.push(participantLabel)
+ }
// Can split out paramter metadata here I think?
// Want to post metadata as a separate prop so we can delete before sending to Batch
if (formData.parameters) {
| 12 |
diff --git a/test/needle-api/needle-server-cache.spec.js b/test/needle-api/needle-server-cache.spec.js @@ -240,36 +240,6 @@ describe('needle API server cache: JHipster server generator with blueprint', ()
})
.on('end', done);
});
-
- it('Assert Infinispan configuration has entity added', () => {
- assert.fileContent(
- `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/config/CacheConfiguration.java`,
- ' registerPredefinedCache(entry, new JCache<Object, Object>(\n' +
- ' cacheManager.getCache(entry).getAdvancedCache(), this,\n' +
- ' ConfigurationAdapter.create()));'
- );
- });
-
- it('Assert Infinispan configuration has entity added', () => {
- assert.fileContent(
- `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/config/CacheConfiguration.java`,
- ' registerPredefinedCache(com.mycompany.myapp.domain.entityClass.class.getName(), new JCache<Object, Object>(\n' +
- ' cacheManager.getCache(com.mycompany.myapp.domain.entityClass.class.getName()).getAdvancedCache(), this,\n' +
- ' ConfigurationAdapter.create()));'
- );
- assert.fileContent(
- `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/config/CacheConfiguration.java`,
- ' registerPredefinedCache(com.mycompany.myapp.domain.entityClass.class.getName() + ".entitiesOneToMany", new JCache<Object, Object>(\n' +
- ' cacheManager.getCache(com.mycompany.myapp.domain.entityClass.class.getName() + ".entitiesOneToMany").getAdvancedCache(), this,\n' +
- ' ConfigurationAdapter.create()));'
- );
- assert.fileContent(
- `${SERVER_MAIN_SRC_DIR}com/mycompany/myapp/config/CacheConfiguration.java`,
- ' registerPredefinedCache(com.mycompany.myapp.domain.entityClass.class.getName() + ".entitiesManoToMany", new JCache<Object, Object>(\n' +
- ' cacheManager.getCache(com.mycompany.myapp.domain.entityClass.class.getName() + ".entitiesManoToMany").getAdvancedCache(), this,\n' +
- ' ConfigurationAdapter.create()));'
- );
- });
});
describe('redis', () => {
| 1 |
diff --git a/packages/app/src/components/InAppNotification/NotificationContent.tsx b/packages/app/src/components/InAppNotification/NotificationContent.tsx import React from 'react';
+import { PagePathLabel } from '@growi/ui';
import { InAppNotification as IInAppNotification } from '../../interfaces/in-app-notification';
-
import FormattedDistanceDate from '../FormattedDistanceDate';
-import { PagePath } from './PagePath';
-
interface Props {
actionUsers: string
notification: IInAppNotification
@@ -13,10 +11,12 @@ interface Props {
export const PageCommentNotification = (props: Props): JSX.Element => {
+ const pagePath = { path: props.notification.target.path };
+
return (
<>
<div>
- <b>{props.actionUsers}</b> commented on <PagePath notification={props.notification} />
+ <b>{props.actionUsers}</b> commented on <PagePathLabel page={pagePath} />
</div>
<i className="fa fa-comment-o mr-2" />
<FormattedDistanceDate id={props.notification._id} date={props.notification.createdAt} isShowTooltip={false} />
@@ -26,10 +26,12 @@ export const PageCommentNotification = (props: Props): JSX.Element => {
export const PageUpdateNotification = (props: Props): JSX.Element => {
+ const pagePath = { path: props.notification.target.path };
+
return (
<>
<div>
- <b>{props.actionUsers}</b> page updated on <PagePath notification={props.notification} />
+ <b>{props.actionUsers}</b> page updated on <PagePathLabel page={pagePath} />
</div>
<i className="fa fa-file-o mr-2" />
<FormattedDistanceDate id={props.notification._id} date={props.notification.createdAt} isShowTooltip={false} />
| 4 |
diff --git a/lib/tests/test.js b/lib/tests/test.js @@ -119,14 +119,21 @@ class Test {
if (this.error) {
return callback(this.error);
}
- this.events.once('ready', () => {
- self.events.removeListener('deployError', () => {});
- callback();
- });
- this.events.once('deployError', (err) => {
- self.events.removeListener('ready', () => {});
+
+ let errorCallback, readyCallback;
+
+ errorCallback = (err) => {
+ self.events.removeListener('ready', readyCallback);
callback(err);
- });
+ };
+
+ readyCallback = () => {
+ self.events.removeListener('deployError', errorCallback);
+ callback();
+ };
+
+ this.events.once('ready', readyCallback);
+ this.events.once('deployError', errorCallback);
}
config(options, callback) {
| 2 |
diff --git a/packages/node_modules/@node-red/runtime/lib/flows/util.js b/packages/node_modules/@node-red/runtime/lib/flows/util.js @@ -271,7 +271,7 @@ module.exports = {
parseConfig: parseConfig,
- diffConfigs: function(oldConfig, newConfig, ignoreGroup) {
+ diffConfigs: function(oldConfig, newConfig) {
var id;
var node;
var nn;
| 13 |
diff --git a/src/components/dashboard/__tests__/FaceRecognition.js b/src/components/dashboard/__tests__/FaceRecognition.js import React from 'react'
import renderer from 'react-test-renderer'
+import zoomSdkLoader from '../FaceRecognition/ZoomSdkLoader'
import { getWebRouterComponentWithMocks } from './__util__'
// Note: test renderer must be required after react-native.
describe('FaceRecognition Rendering', () => {
+ beforeAll(async () => {
+ await zoomSdkLoader.load()
+ })
it('renders without errors', () => {
const FaceRecognition = getWebRouterComponentWithMocks('../FaceRecognition/FaceRecognition')
const tree = renderer.create(<FaceRecognition />)
| 0 |
diff --git a/public/javascripts/Choropleths/InitializeStreets.js b/public/javascripts/Choropleths/InitializeStreets.js @@ -13,15 +13,11 @@ function InitializeStreets(map, params, streetData) {
let hasUnauditedStreets = params.unauditedStreetColor != null;
function onEachStreetFeature(feature, layer) {
- let popupContent = `<a href="/audit/street/${feature.properties.street_edge_id}">Explore this street!</a>`;
+ let popupContent = `<a href="/audit/street/${feature.properties.street_edge_id}">Click here</a> to explore this street!`;
layer.bindPopup(popupContent);
layer.on({
- 'mouseover': function () {
- this.setStyle({ weight: 5 });
- },
- 'mouseout': function() {
- this.setStyle({ weight: 3 });
- }
+ 'mouseover': function () { this.setStyle({ weight: 6 }); },
+ 'mouseout': function() { this.setStyle({ weight: 3 }); }
});
}
// Render street segments.
| 3 |
diff --git a/edit.js b/edit.js @@ -4,6 +4,7 @@ import * as THREE from 'https://static.xrpackage.org/xrpackage/three.module.js';
import {BufferGeometryUtils} from 'https://static.xrpackage.org/BufferGeometryUtils.js';
import {GLTFLoader} from './GLTFLoader.js';
import {TransformControls} from './TransformControls.js';
+import CapsuleGeometry from './CapsuleGeometry.js';
// import address from 'https://contracts.webaverse.com/address.js';
// import abi from 'https://contracts.webaverse.com/abi.js';
import {XRPackage, pe, renderer, scene, camera, parcelMaterial, floorMesh, proxySession, getRealSession, loginManager} from './run.js';
@@ -729,6 +730,42 @@ for (let i = 0; i < numRemoteChunkMeshes; i++) {
remoteChunkMeshes.push(chunkMesh);
_setCurrentChunkMesh(chunkMesh);
+{
+ const npcMesh = await _loadGltf('./npc.vrm');
+ npcMesh.position.y = -3;
+ npcMesh.position.z = -3;
+ npcMesh.traverse(o => {
+ if (o.isMesh) {
+ o.isBuildMesh = true;
+ }
+ });
+ npcMesh.hit = () => {
+ console.log('hit!');
+ };
+ npcMesh.updateMatrixWorld();
+ npcMesh.matrix.premultiply(localMatrix2.getInverse(currentChunkMesh.matrixWorld))
+ .decompose(npcMesh.position, npcMesh.quaternion, npcMesh.scale);
+ currentChunkMesh.add(npcMesh);
+
+ let geometry = new CapsuleGeometry(0.5, 0.5, 16)
+ .applyMatrix4(new THREE.Matrix4().makeRotationFromQuaternion(new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(1, 0, 0), Math.PI/2)))
+ .applyMatrix4(new THREE.Matrix4().makeTranslation(0, 0.5/2+0.5, 0))
+ // .toNonIndexed();
+ geometry = new THREE.BufferGeometry().fromGeometry(geometry);
+ const material = new THREE.MeshBasicMaterial({
+ color: 0x008000,
+ });
+ const capsuleMesh = new THREE.Mesh(geometry, material);
+ capsuleMesh.position.copy(npcMesh.position);
+ _decorateMeshForRaycast(capsuleMesh);
+ capsuleMesh.isNpcHullMesh = true;
+ capsuleMesh.npcMesh = npcMesh;
+ capsuleMesh.position.copy(npcMesh.position);
+ capsuleMesh.quaternion.copy(npcMesh.quaternion);
+ capsuleMesh.scale.copy(npcMesh.scale);
+ currentChunkMesh.add(capsuleMesh);
+}
+
// physics.bindStaticMeshPhysics(chunkMesh);
/* for (let i = 0; i < remoteChunkMeshes.length; i++) {
console.time('lol');
@@ -1703,13 +1740,6 @@ const hpMesh = (() => {
})();
scene.add(hpMesh);
-(async () => {
- const npcModel = await _loadGltf('./npc.vrm');
- npcModel.position.y = -3;
- npcModel.position.z = -3;
- scene.add(npcModel);
-})();
-
const _applyVelocity = (position, timeDiff) => {
position.add(localVector4.copy(velocity).multiplyScalar(timeDiff));
};
@@ -2107,7 +2137,7 @@ function animate(timestamp, frame) {
if (removeMesh.visible) {
if (raycastChunkSpec.mesh.isChunkMesh) {
_applyPotentialDelta(removeMesh.position, -0.2);
- } else if (raycastChunkSpec.mesh.isHullMesh) {
+ } else if (raycastChunkSpec.mesh.isBuildHullMesh) {
const {buildMesh} = raycastChunkSpec.mesh;
localVector2.copy(localVector)
@@ -2123,6 +2153,25 @@ function animate(timestamp, frame) {
const oldBuildMesh = buildMap[buildKey];
buildMesh.hit(30);
+ } else if (raycastChunkSpec.mesh.isNpcHullMesh) {
+ const {npcMesh} = raycastChunkSpec.mesh;
+
+ npcMesh.hit(30);
+ /* const {buildMesh} = raycastChunkSpec.mesh;
+
+ localVector2.copy(localVector)
+ .add(localVector3.set(0, 0, -BUILD_SNAP).applyQuaternion(localQuaternion))
+ .add(localVector3.set(0, -BUILD_SNAP/2, 0));
+ _snapBuildPosition(localVector2);
+
+ localMatrix.compose(localVector2, localQuaternion, localVector3.set(1, 1, 1))
+ .premultiply(localMatrix2.getInverse(worldContainer.matrix))
+ .decompose(localVector2, localQuaternion2, localVector3);
+
+ const buildKey = _getBuildKey(localVector2);
+ const oldBuildMesh = buildMap[buildKey];
+
+ buildMesh.hit(30); */
}
}
break;
@@ -2149,7 +2198,7 @@ function animate(timestamp, frame) {
buildMeshClone.hullMesh = buildMesh.hullMesh.clone();
buildMeshClone.hullMesh.geometry = buildMesh.hullMesh.geometry.clone();
_decorateMeshForRaycast(buildMeshClone.hullMesh);
- buildMeshClone.hullMesh.isHullMesh = true;
+ buildMeshClone.hullMesh.isBuildHullMesh = true;
buildMeshClone.hullMesh.buildMesh = buildMeshClone;
let animation = null;
let hp = 100;
| 0 |
diff --git a/test/proxy_code.js b/test/proxy_code.js @@ -124,7 +124,7 @@ describe('proxy program', function() {
" im.src = proxy url\n" +
"window.d = null\n" +
"await loadImageData " +
- "'http://davidbau.com/images/art/enigma.jpg', defer window.d\n"
+ "'http://davidbau.com/mandelbrot/mandelzoom.gif', defer window.d\n"
);
});
pollScript(_driver, function() {
@@ -140,7 +140,7 @@ describe('proxy program', function() {
// Filename is still shown and unchanged.
assert(/^untitled/.test(result.filename));
// Editor text has the new code.
- assert(/enigma/.test(result.text));
+ assert(/mandelzoom/.test(result.text));
// Preview is still shown.
assert.equal(1, result.preview);
// The save button is no longer disabled, because the doc is dirty.
@@ -177,11 +177,11 @@ describe('proxy program', function() {
}
}).then(function(result) {
// Verify dimensions can be read.
- assert.equal(result.height, 316);
- assert.equal(result.width, 298);
- assert.equal(result.datalen, 298 * 316 * 4);
+ assert.equal(result.height, 180);
+ assert.equal(result.width, 177);
+ assert.equal(result.datalen, 177 * 180 * 4);
// Verify that an arbitrary byte can be read from the image.
- assert.equal(result.data10000, 61);
+ assert.equal(result.data10000, 187);
});
return _driver;
});
| 4 |
diff --git a/tests/e2e/specs/modules/analytics/setup-with-account-no-tag.test.js b/tests/e2e/specs/modules/analytics/setup-with-account-no-tag.test.js @@ -164,7 +164,8 @@ describe( 'setting up the Analytics module with an existing account and no exist
await expect( page ).toClick( '.mdc-menu-surface--open .mdc-list-item', { text: /set up a new property/i } );
await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /set up a new property/i } );
- await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /set up a new view/i } );
+ // FAILING whether true or false assertion
+ // await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /set up a new view/i } );
// Intentionally does not submit to trigger property & profile creation requests.
} );
| 2 |
diff --git a/api/src/api/v2.js b/api/src/api/v2.js @@ -37,7 +37,7 @@ router.post('/execute', async function(req, res){
}
for (const [i,file] of files.entries()) {
- if(!file.content || typeof file.content !== "string"){
+ if(typeof file.content !== "string"){
return res
.status(400)
.send({
| 11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.