code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/lib/datapacktypes/omniscript.js b/lib/datapacktypes/omniscript.js @@ -91,7 +91,7 @@ OmniScript.prototype.afterActivationSuccess = async function(inputMap) {
var jobInfo = inputMap.jobInfo;
var dataPack = inputMap.dataPack;
- if(!jobInfo.checkLWCActivation){
+ if(!jobInfo.ignoreLWCActivation && !jobInfo.checkLWCActivation){
var minVersions = yaml.safeLoad(fs.readFileSync(path.join(__dirname,'..', 'buildToolsMinVersionOS-LWC.yaml'), 'utf8'));
var minVersion = minVersions[this.vlocity.namespace]
var currentVersion = this.vlocity.PackageVersion;
@@ -102,6 +102,16 @@ OmniScript.prototype.afterActivationSuccess = async function(inputMap) {
jobInfo.checkLWCActivation = true;
}
+ if (jobInfo.isRetry && jobInfo.omniScriptLwcActivationSkip[dataPack.VlocityDataPackKey]) {
+ var oldError = jobInfo.omniScriptLwcActivationSkip[dataPack.VlocityDataPackKey];
+ jobInfo.hasError = true;
+ jobInfo.currentStatus[dataPack.VlocityDataPackKey] = 'Error';
+ jobInfo.currentErrors[dataPack.VlocityDataPackKey] = 'LWC Activation Error >> ' + dataPack.VlocityDataPackKey + oldError;
+ jobInfo.errors.push('LWC Activation Error >> ' + dataPack.VlocityDataPackKey + oldError);
+ VlocityUtils.error('LWC Activation Error', dataPack.VlocityDataPackKey + oldError);
+ return;
+ }
+
if (jobInfo.ignoreLWCActivation) {
return;
}
@@ -176,7 +186,15 @@ OmniScript.prototype.afterActivationSuccess = async function(inputMap) {
var siteUrl = this.vlocity.jsForceConnection.instanceUrl;
var sessionToken = this.vlocity.jsForceConnection.accessToken;
var loginURl = siteUrl + '/secur/frontdoor.jsp?sid=' + sessionToken;
- const browser = await puppeteer.launch(puppeteerOptions);
+ var browser;
+ try {
+ browser = await puppeteer.launch(puppeteerOptions);
+ } catch (error) {
+ VlocityUtils.error('Puppeteer initialization Failed, LWC Activation disabled - ' + error);
+ jobInfo.ignoreLWCActivation = true;
+ return;
+ }
+
const page = await browser.newPage();
const loginTimeout = 300000;
@@ -224,6 +242,10 @@ OmniScript.prototype.afterActivationSuccess = async function(inputMap) {
}
if(errorMessage) {
+ if(!jobInfo.omniScriptLwcActivationSkip){
+ jobInfo.omniScriptLwcActivationSkip = {};
+ }
+ jobInfo.omniScriptLwcActivationSkip[dataPack.VlocityDataPackKey] = errorMessage;
jobInfo.hasError = true;
jobInfo.currentStatus[dataPack.VlocityDataPackKey] = 'Error';
jobInfo.currentErrors[dataPack.VlocityDataPackKey] = 'LWC Activation Error >> ' + dataPack.VlocityDataPackKey + errorMessage;
| 8 |
diff --git a/datalad_service/app.py b/datalad_service/app.py import falcon
from datalad_service.common import raven
-from datalad_service.common.celery import app
+from datalad_service.common.celery import app, publish_queue
+from datalad_service.tasks.audit import audit_datasets
from datalad_service.datalad import DataladStore
from datalad_service.handlers.dataset import DatasetResource
from datalad_service.handlers.draft import DraftResource
+from datalad_service.handlers.description import DescriptionResource
from datalad_service.handlers.files import FilesResource
from datalad_service.handlers.objects import ObjectsResource
from datalad_service.handlers.snapshots import SnapshotResource
@@ -39,6 +41,7 @@ def create_app(annex_path):
heartbeat = HeartbeatResource()
datasets = DatasetResource(store)
dataset_draft = DraftResource(store)
+ dataset_description = DescriptionResource(store)
dataset_files = FilesResource(store)
dataset_objects = ObjectsResource(store)
dataset_publish = PublishResource(store)
@@ -50,6 +53,7 @@ def create_app(annex_path):
api.add_route('/datasets/{dataset}', datasets)
api.add_route('/datasets/{dataset}/draft', dataset_draft)
+ api.add_route('/datasets/{dataset}/description', dataset_description)
api.add_route('/datasets/{dataset}/files', dataset_files)
api.add_route('/datasets/{dataset}/files/{filename:path}', dataset_files)
| 1 |
diff --git a/cli.js b/cli.js @@ -12,7 +12,7 @@ module.exports = function (dir, options) {
validate.BIDS(dir, options, function (issues, summary) {
var errors = issues.errors;
var warnings = issues.warnings;
- if (issues === 'Invalid') {
+ if (issues.errors.length === 1 && issues.errors[0].code === 61) {
console.log(colors.red("The directory " + dir + " failed an initial Quick Test. This means the basic names and structure of the files and directories do not comply with BIDS specification. For more info go to http://bids.neuroimaging.io/"));
} else if (issues.config && issues.config.length >= 1) {
console.log(colors.red('Invalid Config File'));
| 9 |
diff --git a/templates/master/test/lex.js b/templates/master/test/lex.js @@ -17,11 +17,7 @@ var exists = require('./util').exists
var run = require('./util').run
var api = require('./util').api
-function sleep(ms){
- // return new Promise(resolve=>{
- // setTimeout(resolve,ms)
- // })
-}
+
module.exports = {
setUp: function(cb) {
@@ -183,6 +179,7 @@ module.exports = {
hook: function(test) {
var self = this
var id1 = 'unit-test.1'
+ var id2 = "unit-test.2"
var lambda = new aws.Lambda({
region: config.region
})
@@ -213,6 +210,10 @@ module.exports = {
path: "questions/" + id1,
method: "DELETE"
}))
+ .then(() => api({
+ path: "questions/" + id2,
+ method: "DELETE"
+ }))
.finally(() => test.done())
},
// Guided Navigation tests
@@ -250,7 +251,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.equal(response.message, "no next room")
- await sleep(1000)
+
response = await this.lex.postText({
sessionAttributes: sessionAttributes,
inputText: "previous"
@@ -258,7 +259,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.equal(response.message, "no previous room")
- await sleep(1000)
+
}
catch (e) {
test.ifError(e)
@@ -354,7 +355,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.equal(response.message, "One")
- await sleep(2000)
+
response = await this.lex.postText({
sessionAttributes:sessionAttributes,
inputText: "Two"
@@ -362,7 +363,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.equal(response.message, "Two")
- await sleep(2000)
+
response = await this.lex.postText({
sessionAttributes:sessionAttributes,
inputText: "next"
@@ -370,7 +371,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.equal(response.message, "Three")
- await sleep(2000)
+
response = await this.lex.postText({
sessionAttributes:sessionAttributes,
inputText: "previous"
@@ -378,7 +379,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.equal(response.message, "Two")
- await sleep(2000)
+
response = await this.lex.postText({
sessionAttributes:sessionAttributes,
inputText: "Two"
@@ -386,7 +387,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.equal(response.message, "Two")
- await sleep(2000)
+
response = await this.lex.postText({
sessionAttributes:sessionAttributes,
inputText: "previous"
@@ -394,7 +395,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.equal(response.message, "One")
- await sleep(2000)
+
}
catch (e) {
test.ifError(e)
@@ -463,7 +464,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.equal(response.message, "There is no question to leave feedback on, please ask a question before attempting to leave feedback")
- await sleep(2000)
+
response = await this.lex.postText({
sessionAttributes:sessionAttributes,
inputText: "One"
@@ -471,7 +472,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.equal(response.message, "One")
- await sleep(2000)
+
response = await this.lex.postText({
sessionAttributes:sessionAttributes,
inputText: "feedback"
@@ -479,7 +480,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.ok(response.message.includes("What feedback would you like to leave for the question, \"One\" ?"))
- await sleep(2000)
+
response = await this.lex.postText({
sessionAttributes:sessionAttributes,
inputText: "goodbye"
@@ -487,7 +488,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.ok(response.message.includes("What feedback would you like to leave for the question, \"One\" ?"))
- await sleep(2000)
+
response = await this.lex.postText({
sessionAttributes:sessionAttributes,
inputText: "a"
@@ -495,7 +496,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.ok(response.message.includes("Thank you for leaving the feedback"))
- await sleep(2000)
+
response = await this.lex.postText({
sessionAttributes:sessionAttributes,
inputText: "feedback"
@@ -503,7 +504,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.ok(response.message.includes("What feedback would you like to leave for the question, \"One\" ?"))
- await sleep(2000)
+
response = await this.lex.postText({
sessionAttributes:sessionAttributes,
inputText: "E"
@@ -511,7 +512,7 @@ module.exports = {
console.log(response)
sessionAttributes = response.sessionAttributes
test.ok(response.message.includes("Canceled Feedback"))
- await sleep(2000)
+
}
catch (e) {
test.ifError(e)
| 1 |
diff --git a/packages/harden/src/main.js b/packages/harden/src/main.js @@ -18,15 +18,21 @@ import makeHardener from '@agoric/make-hardener';
import buildTable from './buildTable.js';
// Try to use SES's own harden if available.
-let h = typeof harden !== 'undefined' && harden;
-if (!h) {
+let h = typeof harden === 'undefined' ? undefined : harden;
+if (h === undefined) {
// Legacy SES compatibility.
- h = typeof SES !== 'undefined' && SES.harden;
+ h = typeof SES === 'undefined' ? undefined : SES.harden;
}
-if (!h) {
- console.warn(`SecurityWarning: '@agoric/harden' is ineffective without SES`);
+if (h === undefined) {
+ // Warn if they haven't explicitly set harden or SES.harden.
+ console.warn(
+ `SecurityWarning: '@agoric/harden' doesn't prevent prototype poisoning without SES`,
+ );
+}
+// Create the shim if h is anything falsey.
+if (!h) {
// Hunt down our globals.
// eslint-disable-next-line no-new-func
const g = Function('return this')();
| 11 |
diff --git a/platform_services/components/crud/getList.js b/platform_services/components/crud/getList.js @@ -84,7 +84,7 @@ module.exports = (query, getAllRecords, onComplete) => {
});
}
- if (!getAllRecords || (global.userId && !_.includes(global.config.admin_users, global.userId.toLowerCase()))) {
+ if (/*!getAllRecords ||*/ (global.userId && !_.includes(global.config.admin_users, global.userId.toLowerCase()))) {
var ddb_created_by = utils.getDatabaseKeyName("created_by");
// filter for services created by current user
| 8 |
diff --git a/test/builders/capsule-query.test.js b/test/builders/capsule-query.test.js @@ -3,7 +3,8 @@ const request = require('supertest');
const app = require('../../src/app');
beforeAll((done) => {
- app.on('ready', () => {
+ app.on('ready', async () => {
+ jest.setTimeout(10000);
done();
});
});
@@ -12,65 +13,58 @@ beforeAll((done) => {
// Capsule Query Test
//------------------------------------------------------------
-test('It should return capsule serial C113', () => {
- return request(app).get('/v2/parts/caps?capsule_serial=C113').then((response) => {
+test('It should return capsule serial C113', async () => {
+ const response = await request(app).get('/v2/parts/caps?capsule_serial=C113');
expect(response.statusCode).toBe(200);
response.body.forEach((item) => {
expect(item).toHaveProperty('capsule_serial', 'C113');
});
});
-});
-test('It should return capsule id dragon1', () => {
- return request(app).get('/v2/parts/caps?capsule_id=dragon1').then((response) => {
+test('It should return capsule id dragon1', async () => {
+ const response = await request(app).get('/v2/parts/caps?capsule_id=dragon1');
expect(response.statusCode).toBe(200);
response.body.forEach((item) => {
expect(item).toHaveProperty('capsule_id', 'dragon1');
});
});
-});
-test('It should return capsules with an active status', () => {
- return request(app).get('/v2/parts/caps?status=active').then((response) => {
+test('It should return capsules with an active status', async () => {
+ const response = await request(app).get('/v2/parts/caps?status=active');
expect(response.statusCode).toBe(200);
response.body.forEach((item) => {
expect(item).toHaveProperty('status', 'active');
});
});
-});
-test('It should return capsule C113 with the correct launch date', () => {
- return request(app).get('/v2/parts/caps?original_launch=2017-08-14T16:31:00Z').then((response) => {
+test('It should return capsule C113 with the correct launch date', async () => {
+ const response = await request(app).get('/v2/parts/caps?original_launch=2017-08-14T16:31:00Z');
expect(response.statusCode).toBe(200);
response.body.forEach((item) => {
expect(item).toHaveProperty('original_launch', '2017-08-14T16:31:00Z');
});
});
-});
-test('It should return capsule for CRS-12', () => {
- return request(app).get('/v2/parts/caps?missions=SpaceX+CRS-12').then((response) => {
+test('It should return capsule for CRS-12', async () => {
+ const response = await request(app).get('/v2/parts/caps?missions=SpaceX+CRS-12');
expect(response.statusCode).toBe(200);
response.body.forEach((item) => {
expect(item).toHaveProperty('missions');
});
});
-});
-test('It should return capsule with number of landings', () => {
- return request(app).get('/v2/parts/caps?landings=1').then((response) => {
+test('It should return capsule with number of landings', async () => {
+ const response = await request(app).get('/v2/parts/caps?landings=1');
expect(response.statusCode).toBe(200);
response.body.forEach((item) => {
expect(item).toHaveProperty('landings', 1);
});
});
-});
-test('It should return capsule with type of Dragon 1.1', () => {
- return request(app).get('/v2/parts/caps?type=Dragon+1.1').then((response) => {
+test('It should return capsule with type of Dragon 1.1', async () => {
+ const response = await request(app).get('/v2/parts/caps?type=Dragon+1.1');
expect(response.statusCode).toBe(200);
response.body.forEach((item) => {
expect(item).toHaveProperty('type', 'Dragon 1.1');
});
});
-});
| 3 |
diff --git a/src/components/ProductDetailOptionsList/ProductDetailOptionsList.js b/src/components/ProductDetailOptionsList/ProductDetailOptionsList.js @@ -26,7 +26,6 @@ const styles = (theme) => ({
});
@withStyles(styles, { withTheme: true })
-@inject("uiStore")
@observer
export default class OptionsList extends Component {
static propTypes = {
@@ -35,8 +34,7 @@ export default class OptionsList extends Component {
options: PropTypes.arrayOf(PropTypes.object),
productSlug: PropTypes.string,
selectedOptionId: PropTypes.string,
- theme: PropTypes.object,
- uiStore: PropTypes.object
+ theme: PropTypes.object
}
renderInventoryStatus(option) {
| 2 |
diff --git a/examples/CustomArrows.js b/examples/CustomArrows.js import React, { Component } from 'react'
-import createReactClass from 'create-react-class'
import Slider from '../src/slider'
-var SampleNextArrow = createReactClass({
- render: function() {
- const {className, style, onClick} = this.props
+function SampleNextArrow(props) {
+ const {className, style, onClick} = props
return (
<div
className={className}
@@ -13,11 +11,9 @@ var SampleNextArrow = createReactClass({
></div>
);
}
-});
-var SamplePrevArrow = createReactClass({
- render: function() {
- const {className, style, onClick} = this.props
+function SamplePrevArrow(props) {
+ const {className, style, onClick} = props
return (
<div
className={className}
@@ -26,7 +22,7 @@ var SamplePrevArrow = createReactClass({
></div>
);
}
-});
+
export default class CustomArrows extends Component {
render() {
| 2 |
diff --git a/Dockerfile b/Dockerfile @@ -30,7 +30,6 @@ COPY package.json /usr/src/app/
COPY npm-shrinkwrap.json /usr/src/app/
RUN npm install --production && npm cache clean --force
COPY . /usr/src/app
-RUN chmod a+w /usr/src/app
COPY docker/scripts/start.sh /start.sh
| 13 |
diff --git a/lib/node_modules/@stdlib/math/fast/special/int32-sqrt/test/test.js b/lib/node_modules/@stdlib/math/fast/special/int32-sqrt/test/test.js var tape = require( 'tape' );
var minstd = require( '@stdlib/math/base/random/minstd-shuffle' );
-var SQRT = require( '@stdlib/math/base/special/sqrt' );
+var sqrt = require( '@stdlib/math/base/special/sqrt' );
var floor = require( '@stdlib/math/base/special/floor' );
var lsqrt = require( './../lib' );
@@ -38,7 +38,7 @@ tape( 'the function returns an approximate square root for integer values not ha
for ( i = 0; i < 5000; i++ ) {
x = minstd();
- y = SQRT( x );
+ y = sqrt( x );
v = lsqrt( x );
t.strictEqual( v, floor( y ), 'returns an approximate square root' );
}
| 14 |
diff --git a/src/components/play-mode/minimap/minimap.module.css b/src/components/play-mode/minimap/minimap.module.css margin-bottom: 20px;
width: 180px;
height: 180px;
- border-radius: 50%;
+ /* border-radius: 50%; */
background-color: #000;
image-rendering: pixelated;
}
| 2 |
diff --git a/bin/idyll.js b/bin/idyll.js @@ -27,7 +27,6 @@ var argv = require('yargs')
.describe('datasets', 'Directory where data files are located')
.default('datasets', 'data')
.describe('defaultComponents', 'Directory where default set of components are located')
- .default('defaultComponents', 'components/default')
.describe('inputFile', 'File containing Idyll source')
.describe('inputString', 'Idyll source as a string')
.describe('layout', 'Name of (or path to) the layout to use')
@@ -41,7 +40,6 @@ var argv = require('yargs')
.default('spellcheck', true)
.describe('spellcheck', 'Check spelling of Idyll source input')
.describe('template', 'Path to HTML template')
- .default('template', '_index.html')
.array('transform')
.describe('transform', 'Custom browserify transforms to apply.')
.default('transform', [])
@@ -72,4 +70,9 @@ delete argv['no-minify'];
delete argv.k;
delete argv.spellcheck;
+// delete undefined keys so Object.assign won't use them
+Object.keys(argv).forEach((key) => {
+ if (argv[key] === undefined) delete argv[key];
+})
+
idyll(argv).build();
| 2 |
diff --git a/kitty-items-go/services/kibbles.go b/kitty-items-go/services/kibbles.go @@ -3,10 +3,23 @@ package services
import (
"context"
+ "github.com/onflow/cadence"
"github.com/onflow/flow-go-sdk"
)
-const mintKibblesTemplate = ``
+const mintKibblesTemplate = `
+import DietKibbles from 0x06f65a4f32bba850
+import FungibleToken from 0x9a0766d93b6608b7
+
+transaction(to: Address, amount: UInt) {
+ prepare(to: AuthAccount) {
+ getAccount(to)
+ .getCapability<&{FungibleToken.Receiver}>(DietKibbles.publicPath)!
+ .borrow()!
+ .deposit(from: <- DietKibbles.mintTenDietKibbles())
+ }
+}
+`
type KibblesService struct {
flowService *FlowService
@@ -17,18 +30,30 @@ func NewKibbles(service *FlowService) *KibblesService {
}
// Mint sends a transaction to the Flow blockchain and returns the generated transactionID as a string.
-func (k *KibblesService) Mint(ctx context.Context, flowAddress flow.Address, amount uint) (string, error) {
+func (k *KibblesService) Mint(ctx context.Context, destinationAddress flow.Address, amount uint) (string, error) {
sequenceNumber, err := k.flowService.GetMinterAddressSequenceNumber(ctx)
if err != nil {
return "", err
}
+ block, err := k.flowService.client.GetLatestBlock(ctx, true)
+
tx := flow.NewTransaction().
SetScript([]byte(mintKibblesTemplate)).
AddAuthorizer(k.flowService.minterAddress).
SetProposalKey(k.flowService.minterAddress, k.flowService.minterAccountKey.Index, sequenceNumber).
SetPayer(k.flowService.minterAddress).
+ SetReferenceBlockID(block.ID).
SetGasLimit(10000)
+
+ if err := tx.AddArgument(cadence.NewAddress(destinationAddress)); err != nil {
+ return "", err
+ }
+
+ if err := tx.AddArgument(cadence.NewUInt(amount)); err != nil {
+ return "", err
+ }
+
txID, err := k.flowService.Send(ctx, tx)
if err != nil {
return "", err
| 0 |
diff --git a/_CodingChallenges/90-floyd-steinberg-dithering.md b/_CodingChallenges/90-floyd-steinberg-dithering.md @@ -32,9 +32,9 @@ contributions:
- title: "Image dithering in python that outputs to CSS"
author:
name: "MeaningOf42"
- url: "github.com/MeaningOf42"
- url: "meaningof42.github.io/pointless-site/css_dithering/index.html"
- source: "github.com/MeaningOf42/pointless-site/tree/master/css_dithering"
+ url: "https://github.com/MeaningOf42"
+ url: "https://meaningof42.github.io/pointless-site/css_dithering/index.html"
+ source: "https://github.com/MeaningOf42/pointless-site/tree/master/css_dithering"
---
| 1 |
diff --git a/packages/idyll-document/src/components/author-tool.js b/packages/idyll-document/src/components/author-tool.js @@ -7,7 +7,6 @@ class AuthorTool extends React.PureComponent {
this.state = { isAuthorView: false, debugHeight: 0};
this.handleClick = this.handleClick.bind(this);
}
-
/* Returns authoring information for the values in the form of
ComponentName
Link to Docs page
@@ -87,9 +86,11 @@ class AuthorTool extends React.PureComponent {
render() {
const { idyll, updateProps, hasError, ...props } = this.props;
- const addBorder = this.state.isAuthorView ? {outline: '2px solid grey',
- backgroundColor: '#F5F5F5',
- transition: 'background-color 0.4s linear'} : null;
+ const addBorder = this.state.isAuthorView ? {
+ boxShadow: '5px 5px 5px 6px lightGray',
+ transition: 'box-shadow 0.4s linear',
+ padding: '10px',
+ margin: '-10px -10px 20px'} : null;
return (
<div className="component-debug-view" style={addBorder}>
{props.component}
@@ -105,8 +106,8 @@ class AuthorTool extends React.PureComponent {
place='right'
disable={this.state.isAuthorView}
>
- <h4>{props.authorComponent.type._idyll.name} Component</h4>
- <p>Click for more info</p>
+ <div className="tooltip-header">{props.authorComponent.type._idyll.name} Component</div>
+ <div className="tooltip-subtitle">Click for more info</div>
</ReactTooltip>
{this.handleFormatComponent(props.authorComponent)}
</div>
| 2 |
diff --git a/admin-base/materialize/custom/_explorer.scss b/admin-base/materialize/custom/_explorer.scss .explorer {
- width: 100%;
- max-width: 100%;
- padding: 0 0.75rem;
+ position: absolute;
+ top: 64px;
+ padding: 0.75rem 0.75rem 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ overflow: hidden;
+ .nav-explorer {
+ .nav-wrapper {
+ background-color: $blue-gray-darken-2;
+ .nav-breadcrumbs {
+ text-align: center;
+ display: inline-block;
+ > span {
+ font-size: 18px;
+ color: rgba(255, 255, 255, 0.7);
+
+ i,
+ [class^="mdi-"],
+ [class*="mdi-"],
+ i.material-icons {
+ display: inline-block;
+ float: left;
+ font-size: 24px;
+ }
+ &:before {
+ content: '\E5CC';
+ color: rgba(255, 255, 255, 0.7);
+ vertical-align: top;
+ display: inline-block;
+ font-family: 'Material Icons';
+ font-weight: normal;
+ font-style: normal;
+ font-size: 25px;
+ margin: 0 10px 0 8px;
+ -webkit-font-smoothing: antialiased;
+ }
+ &:first-child:before {
+ display: none;
+ }
+ &:last-child {
+ color: #fff;
+ }
+ }
+ }
+ .nav-actions {
+ float: right;
+ display: inline-block;
+ > span {
+ display: inline-block;
+ padding-left: 0.75rem;
+ .material-icons {
+ height: 40px;
+ line-height: 40px;
+ }
+ }
+ }
+ }
+ }
+ .explorer-layout {
+ clear: both;
+ display: flex;
+ flex-direction: row;
+ height: 100%;
+ position: relative;
+ z-index: 1;
+ .explorer-main {
+ flex: 6 1 60%;
+ height: 100%;
+ overflow: scroll;
.collection {
border: 0;
+ padding-bottom: 90px;
a.collection-item {
background: none;
border-color: $blue-grey-lighten-4;
.material-icons {
vertical-align: middle;
}
+ &:last-child {
+ border-bottom: 0;
+ }
}
}
.secondary-content {
}
}
}
- .explorer-layout {
- display: flex;
- flex-direction: row;
- .explorer-main {
- flex: 6 1 60%;
}
.explorer-preview {
flex: 4 1 40%;
- > div {
+ background-color: $blue-grey-lighten-5;
+ border-left: 1px solid $blue-grey-lighten-4;
+ color: $blue-gray-darken-1;
+ .asset-preview {
height: 100%;
padding: 0.75rem;
- background-color: $blue-grey-lighten-5;
text-align: center;
position: relative;
+ .asset-info {
+ font-size: 12px;
+ > li {
+ display: flex;
+ flex-direction: row;
+ .asset-name {
+ flex: 1;
+ padding-right: 0.75rem;
+ text-align: right;
+ font-weight: 500;
+ }
+ .asset-value {
+ flex: 2;
+ text-align: left;
+ font-weight: 400;
+ }
+ }
+ }
img {
width: auto;
max-width: 100%;
+ height: auto;
+ max-height: 50%;
}
iframe {
border: 0;
@media(min-width: 768px){
.explorer-layout {
.explorer-preview {
- > div {
- img {
- position: relative;
- top: 50%;
- -webkit-transform: translateY(-50%);
- -o-transform: translateY(-50%);
- transform: translateY(-50%);
- }
- }
+
}
}
}
| 11 |
diff --git a/src/components/pinAnimatedInput/views/pinAnimatedInputView.js b/src/components/pinAnimatedInput/views/pinAnimatedInputView.js /* eslint-disable react/no-array-index-key */
import React, { Component } from 'react';
import { View } from 'react-native';
-import Animated, { Easing } from 'react-native-reanimated';
+import * as Animatable from 'react-native-animatable';
// Styles
import styles from './pinAnimatedInputStyles';
@@ -15,70 +15,21 @@ class PinAnimatedInput extends Component {
constructor(props) {
super(props);
this.state = {};
-
- this.dots = [];
-
- this.dots[0] = new Animated.Value(0);
- this.dots[1] = new Animated.Value(0);
- this.dots[2] = new Animated.Value(0);
- this.dots[3] = new Animated.Value(0);
- }
-
- _startLoadingAnimation = () => {
- [...Array(4)].map((item, index) => {
- this.dots[index].setValue(0);
- });
- Animated.sequence([
- ...this.dots.map((item) =>
- Animated.timing(item, {
- toValue: 1,
- duration: 250,
- easing: Easing.linear(Easing.linear),
- }),
- ),
- ]).start((o) => {
- if (o.finished) {
- this._startLoadingAnimation();
- }
- });
- };
-
- _stopLoadingAnimation = () => {
- [...Array(4)].map((item, index) => {
- this.dots[index].stopAnimation();
- });
- };
-
- UNSAFE_componentWillReceiveProps(nextProps) {
- const { loading } = this.props;
- if (loading !== nextProps.loading) {
- if (nextProps.loading) {
- this._startLoadingAnimation();
- } else {
- this._stopLoadingAnimation();
- }
- }
}
render() {
const { pin } = this.props;
- const marginBottom = [];
-
- [...Array(4)].map((item, index) => {
- marginBottom[index] = this.dots[index].interpolate({
- inputRange: [0, 0.5, 1],
- outputRange: [0, 20, 0],
- });
- });
-
+ var dotsArr = Array(4).fill('');
return (
<View style={[styles.container]}>
- {this.dots.map((val, index) => {
+ {dotsArr.map((val, index) => {
if (pin.length > index) {
return (
- <Animated.View
+ <Animatable.View
+ animation="fadeIn"
key={`passwordItem-${index}`}
- style={[styles.input, styles.inputWithBackground, { bottom: marginBottom[index] }]}
+ style={[styles.input, styles.inputWithBackground]}
+ useNativeDriver
/>
);
}
| 14 |
diff --git a/components/post.js b/components/post.js @@ -72,12 +72,25 @@ function Post({title, published_at, feature_image, html, backLink}) {
text-align: center;
}
- .kg-bookmark-card {
+ .kg-bookmark-card, .kg-callout-card {
position: relative;
width: 85%;
margin: 1em auto;
}
+ .kg-callout-card {
+ width: 100%;
+ display: flex;
+ background-color: ${colors.lighterBlue};
+ padding: 1.2em;
+ border-radius: 3px;
+ font-size: 1.3rem;
+ }
+
+ .kg-callout-emoji {
+ margin-right: .5em;
+ }
+
.kg-bookmark-card a.kg-bookmark-container {
display: flex;
text-decoration: none;
| 0 |
diff --git a/src/html-utils.js b/src/html-utils.js @@ -158,6 +158,7 @@ function renderExamplesList(data) {
function renderModule(data) {
const {symbol} = data;
const value = head(symbol.value);
+ const kind = value.kind;
return `
${renderSymbolHeader(symbol)}
@@ -173,7 +174,7 @@ function renderModule(data) {
${renderLanguageSpecificArgumentsList(value)}`
: ''
}
- ${renderMembers(value)}
+ ${renderMembers(value, kind)}
${renderDocs(data)}
${renderUsages(data)}
${renderExamples(data)}
@@ -474,24 +475,26 @@ function renderUsage(usage) {
</div>`;
}
-function renderMembers(value, limit) {
+function renderMembers(value, kind, limit) {
const detail = getDetails(value, 'type', 'module')
const {members, total_members} = detail;
+ const title = kind === 'type' ? 'Top attributes' : 'Top members'
+
return members.length === 0
? ''
: (limit != null
- ? section('Top members', `
+ ? section(title, `
<ul>
${members.slice(0, limit).map(m => renderMember(m)).join('')}
</ul>
- ${additionalMembersLink(total_members - limit, value)}`)
- : section('Top members', `
+ ${additionalMembersLink(total_members - limit, value, kind)}`)
+ : section(title, `
<ul>
${members.map(m => renderMember(m)).join('')}
</ul>
${total_members > members.length
- ? additionalMembersLink(total_members - members.length, value)
+ ? additionalMembersLink(total_members - members.length, value, kind)
: ''
}`));
}
@@ -585,11 +588,11 @@ function renderMember(member) {
}
-function additionalMembersLink(membersCount, value) {
+function additionalMembersLink(membersCount, value, kind) {
return membersCount <= 0
? ''
: `<a href='command:kite.navigate?"members-list/${value.id}"'
- class="more-members">See ${membersCount} more members</a>`;
+ class="more-members">See ${membersCount} more ${kind == 'type' ? 'attributes' : 'members'}</a>`;
}
function renderParameters(value) {
| 10 |
diff --git a/website/widgets/ske.js b/website/widgets/ske.js @@ -355,7 +355,7 @@ Ske.searchThes=function(fromp){
$(".skebox .waiter").show();
var lemma=$.trim($(".skebox .textbox").val());
if(lemma!="") {
- $.get(rootPath+dictID+"/skeget/thes/", {url: kex.url, corpus: kex.corpus, username: ske_username, apikey: ske_apiKey, lemma: lemma, fromp: fromp}, function(json){
+ $.get(rootPath+dictID+"/skeget/thes/", {url: kex.apiurl, corpus: kex.corpus, username: ske_username, apikey: ske_apiKey, lemma: lemma, fromp: fromp}, function(json){
$(".skebox .choices").html("");
if(json.error && json.error=="Empty result"){
$(".skebox .choices").html("<div class='error'>No results found.</div>");
@@ -436,7 +436,7 @@ Ske.searchCollx=function(fromp){
$(".skebox .waiter").show();
var lemma=$.trim($(".skebox .textbox").val());
if(lemma!="") {
- $.get(rootPath+dictID+"/skeget/collx/", {url: kex.url, corpus: kex.corpus, username: ske_username, apikey: ske_apiKey, lemma: lemma, fromp: fromp}, function(json){
+ $.get(rootPath+dictID+"/skeget/collx/", {url: kex.apiurl, corpus: kex.corpus, username: ske_username, apikey: ske_apiKey, lemma: lemma, fromp: fromp}, function(json){
$(".skebox .choices").html("");
if(json.error && json.error=="Empty result"){
$(".skebox .choices").html("<div class='error'>No results found.</div>");
@@ -517,7 +517,7 @@ Ske.searchDefo=function(fromp){
$(".skebox .waiter").show();
var lemma=$.trim($(".skebox .textbox").val());
if(lemma!="") {
- $.get(rootPath+dictID+"/skeget/defo/", {url: kex.url, corpus: kex.corpus, username: ske_username, apikey: ske_apiKey, lemma: lemma, fromp: fromp}, function(json){
+ $.get(rootPath+dictID+"/skeget/defo/", {url: kex.apiurl, corpus: kex.corpus, username: ske_username, apikey: ske_apiKey, lemma: lemma, fromp: fromp}, function(json){
$(".skebox .choices").html("");
if(json.error && json.error=="Empty result"){
$(".skebox .choices").html("<div class='error'>No results found.</div>");
| 1 |
diff --git a/apps/qrcode/custom.html b/apps/qrcode/custom.html </div>
<hr>
<p>Additional options:</p>
- <input type="checkbox" id="hideDescription" name="minimize"/>
+ <input type="checkbox" id="boostBacklight" name="boostBacklight"/>
+ <label for="boostBacklight">Set backlight to max. while QR is shown</label></br>
+ <input type="checkbox" id="stayOn" name="stayOn"/>
+ <label for="stayOn">Do not lock or dim while showing QR</label></br>
+ <input type="checkbox" id="hideDescription" name="hideDescription"/>
<label for="hideDescription">Hide Description</label></br>
<label for="description">Replace default description:</label>
<input type="text" id="description" class="form-input" value="">
}
var img = imageconverter.canvastoString(document.getElementsByTagName("canvas")[0],{mode:"1bit",output:"string",compression:true});
var app = `var img = ${img};
+${document.getElementById("boostBacklight").checked ? 'Bangle.setLCDBrightness(1);' : ''}
+${document.getElementById("stayOn").checked ? 'Bangle.setLCDTimeout(0);' : ''}
${document.getElementById("hideDescription").checked ? '' : `var content = ${JSON.stringify(content)};`}
g.clear(1).setColor(1,1,1).setBgColor(0,0,0);
g.fillRect(0,0,g.getWidth()-1,g.getHeight()-1);
| 11 |
diff --git a/package.json b/package.json "ntl": "./bin/run",
"netlify": "./bin/run"
},
- "bugs": "https://github.com/netlify/cli/issues",
+ "bugs": {
+ "url": "https://github.com/netlify/cli/issues"
+ },
"dependencies": {
"@iarna/toml": "^2.0.0",
"@netlify/open-api": "^0.2.0",
| 7 |
diff --git a/inspect.js b/inspect.js @@ -429,14 +429,18 @@ const _bakePackage = async p => {
const manifest = document.getElementById('manifest').value;
console.log('save manifest', manifest);
- if (!isValidManifest(manifest)) return window.alert('Error: invalid manifest!');
+ if (isValidManifest(manifest)) {
p = _updateManifest(p, manifest);
pe.reset();
await pe.add(p);
await _renderPackage(p);
- progress.stopTrickle();
openTab(0);
+ } else {
+ window.alert('Error: invalid manifest!');
+ }
+
+ progress.stopTrickle();
});
// files
| 2 |
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -2441,12 +2441,15 @@ function excentersolve(){
a=parseFloat(document.getElementById('ena').value);
b=parseFloat(document.getElementById('enb').value);
c=parseFloat(document.getElementById('enc').value);
- var excenterop1 = (-a*x1 + b*y1 + c*z1)/(-a+b+c)
- var excenterop2 = (-a*x1 + b*y1 + c*z1)/(-a+b+c)
- var excenterop2 = (-a*x1 + b*y1 + c*z1)/(-a+b+c)
- document.getElementById("ex_output1").innerHTML = "The excentre for first side is " + excenterop1
- document.getElementById("ex_output2").innerHTML = "The excentre for second side is " + excenterop2
- document.getElementById("ex_output3").innerHTML = "The excentre for third side is " + excenterop3
+ var excenterop1 = (-a*x1 + b*x2 + c*x3)/(-a+b+c)
+ var excenterop2 = (-a*y1 + b*y2 + c*y3)/(-a+b+c)
+ var excenterop3 = (a*x1 - b*x2 + c*x3)/(a-b+c)
+ var excenterop4 = (a*y1 - b*y2 + c*y3)/(a-b+c)
+ var excenterop5 = (a*x1 + b*x2 - c*x3)/(a+b-c)
+ var excenterop6 = (a*y1 + b*y2 - c*y3)/(a+b-c)
+ document.getElementById("ex_output1").innerHTML = "The excentre for first side is (" + excenterop1.toFixed(2) + " , " + excenterop2.toFixed(2) + ")";
+ document.getElementById("ex_output2").innerHTML = "The excentre for second side is (" + excenterop3.toFixed(2) + " , " + excenterop4.toFixed(2) + ")";
+ document.getElementById("ex_output3").innerHTML = "The excentre for third side is (" + excenterop5.toFixed(2) + " , " + excenterop6.toFixed(2) + ")";
}
function collinearsolve()
| 1 |
diff --git a/app/Root.js b/app/Root.js @@ -45,6 +45,7 @@ export default class Root extends Component {
we must load the RustModule and Lovefield DB first.
*/
Promise.all([loadRustModule(), loadLovefieldDB()]).then(() => {
+ console.debug('Root::componentDidMount Async modules loaded');
const api = setupApi();
const router = new RouterStore();
this.history = syncHistoryWithStore(hashHistory, router);
@@ -53,8 +54,7 @@ export default class Root extends Component {
this._redirectToWallet();
return true;
}).catch((error) => {
- // FIXME: Improve error message
- console.error('Root::loadRustModule unable to load cardano crypto module', error);
+ console.error('Root::componentDidMount Unable to load async modules', error);
});
}
| 7 |
diff --git a/parent_composer.js b/parent_composer.js @@ -81,22 +81,30 @@ function findLastStableMcBall(conn, arrWitnesses, onDone){
);
}
-function adjustLastStableMcBall(conn, last_stable_mc_ball_unit, arrParentUnits, handleAdjustedLastStableUnit){
+function adjustLastStableMcBallAndParents(conn, last_stable_mc_ball_unit, arrParentUnits, arrWitnesses, handleAdjustedLastStableUnit){
main_chain.determineIfStableInLaterUnits(conn, last_stable_mc_ball_unit, arrParentUnits, function(bStable){
if (bStable){
conn.query("SELECT ball, main_chain_index FROM units JOIN balls USING(unit) WHERE unit=?", [last_stable_mc_ball_unit], function(rows){
if (rows.length !== 1)
throw Error("not 1 ball by unit "+last_stable_mc_ball_unit);
var row = rows[0];
- handleAdjustedLastStableUnit(row.ball, last_stable_mc_ball_unit, row.main_chain_index);
+ handleAdjustedLastStableUnit(row.ball, last_stable_mc_ball_unit, row.main_chain_index, arrParentUnits);
});
return;
}
console.log('will adjust last stable ball because '+last_stable_mc_ball_unit+' is not stable in view of parents '+arrParentUnits.join(', '));
+ if (arrParentUnits.length > 1){ // select only one parent
+ pickDeepParentUnits(conn, arrWitnesses, function(err, arrAdjustedParentUnits){
+ if (err)
+ throw Error("pickDeepParentUnits in adjust failed: "+err);
+ adjustLastStableMcBallAndParents(conn, last_stable_mc_ball_unit, arrAdjustedParentUnits, arrWitnesses, handleAdjustedLastStableUnit);
+ });
+ return;
+ }
storage.readStaticUnitProps(conn, last_stable_mc_ball_unit, function(objUnitProps){
if (!objUnitProps.best_parent_unit)
throw Error("no best parent of "+last_stable_mc_ball_unit);
- adjustLastStableMcBall(conn, objUnitProps.best_parent_unit, arrParentUnits, handleAdjustedLastStableUnit)
+ adjustLastStableMcBallAndParents(conn, objUnitProps.best_parent_unit, arrParentUnits, arrWitnesses, handleAdjustedLastStableUnit);
});
});
}
@@ -108,18 +116,21 @@ function pickParentUnitsAndLastBall(conn, arrWitnesses, onDone){
findLastStableMcBall(conn, arrWitnesses, function(err, last_stable_mc_ball, last_stable_mc_ball_unit, last_stable_mc_ball_mci){
if (err)
return onDone(err);
- adjustLastStableMcBall(conn, last_stable_mc_ball_unit, arrParentUnits, function(last_stable_ball, last_stable_unit, last_stable_mci){
+ adjustLastStableMcBallAndParents(
+ conn, last_stable_mc_ball_unit, arrParentUnits, arrWitnesses,
+ function(last_stable_ball, last_stable_unit, last_stable_mci, arrAdjustedParentUnits){
storage.findWitnessListUnit(conn, arrWitnesses, last_stable_mci, function(witness_list_unit){
- var objFakeUnit = {parent_units: arrParentUnits};
+ var objFakeUnit = {parent_units: arrAdjustedParentUnits};
if (witness_list_unit)
objFakeUnit.witness_list_unit = witness_list_unit;
storage.determineIfHasWitnessListMutationsAlongMc(conn, objFakeUnit, last_stable_unit, arrWitnesses, function(err){
if (err)
return onDone(err); // if first arg is not array, it is error
- onDone(null, arrParentUnits, last_stable_ball, last_stable_unit, last_stable_mci);
- });
+ onDone(null, arrAdjustedParentUnits, last_stable_ball, last_stable_unit, last_stable_mci);
});
});
+ }
+ );
});
});
}
| 4 |
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml @@ -67,7 +67,6 @@ jobs:
working-directory: rule-server/dist
- run: npm install
- postinstall: sed -i " "s/[\"|']use strict[\"|']/;/g" exceljs.js
working-directory: accessibility-checker-engine
- run: npm install
working-directory: accessibility-checker
@@ -231,6 +230,8 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
working-directory: report-react
+ - run: sed -i " "s/[\"|']use strict[\"|']/;/g" exceljs.js
+ working-directory: accessibility-checker-extension/node_modules/exceljs/dist/exceljs.js
- run: npm install
working-directory: accessibility-checker-extension
- run: cp -f ./manifest_Chrome.json ./src/manifest.json
| 3 |
diff --git a/util.js b/util.js @@ -767,3 +767,20 @@ export const memoize = fn => {
return cache;
};
};
+export function shuffle(array, rng = Math.random) {
+ let currentIndex = array.length, randomIndex;
+
+ // While there remain elements to shuffle...
+ while (currentIndex != 0) {
+
+ // Pick a remaining element...
+ randomIndex = Math.floor(rng() * currentIndex);
+ currentIndex--;
+
+ // And swap it with the current element.
+ [array[currentIndex], array[randomIndex]] = [
+ array[randomIndex], array[currentIndex]];
+ }
+
+ return array;
+}
\ No newline at end of file
| 0 |
diff --git a/assets/js/modules/analytics/datastore/accounts.js b/assets/js/modules/analytics/datastore/accounts.js @@ -31,7 +31,7 @@ import { actions as profileActions } from './profiles';
// Actions
const FETCH_ACCOUNTS_PROPERTIES_PROFILES = 'FETCH_ACCOUNTS_PROPERTIES_PROFILES';
const RECEIVE_ACCOUNTS = 'RECEIVE_ACCOUNTS';
-const RECEIVE_ACCOUNTS_PROPERTIES_PROFILES = 'RECEIVE_ACCOUNTS_PROPERTIES_PROFILES';
+const RECEIVE_ACCOUNTS_PROPERTIES_PROFILES_COMPLETED = 'RECEIVE_ACCOUNTS_PROPERTIES_PROFILES_COMPLETED';
const RECEIVE_ACCOUNTS_PROPERTIES_PROFILES_FAILED = 'RECEIVE_ACCOUNTS_PROPERTIES_PROFILES_FAILED';
export const INITIAL_STATE = {
@@ -65,10 +65,10 @@ export const actions = {
};
},
- receiveAccountsPropertiesProfiles() {
+ receiveAccountsPropertiesProfilesCompleted() {
return {
payload: {},
- type: RECEIVE_ACCOUNTS_PROPERTIES_PROFILES,
+ type: RECEIVE_ACCOUNTS_PROPERTIES_PROFILES_COMPLETED,
};
},
@@ -106,7 +106,7 @@ export const reducer = ( state, { type, payload } ) => {
};
}
- case RECEIVE_ACCOUNTS_PROPERTIES_PROFILES: {
+ case RECEIVE_ACCOUNTS_PROPERTIES_PROFILES_COMPLETED: {
return {
...state,
isFetchingAccountsPropertiesProfiles: false,
@@ -139,7 +139,7 @@ export const resolvers = {
yield propertyActions.receiveProperties( properties );
yield profileActions.receiveProfiles( profiles );
- return yield actions.receiveAccountsPropertiesProfiles();
+ return yield actions.receiveAccountsPropertiesProfilesCompleted();
} catch ( err ) {
// TODO: Implement an error handler store or some kind of centralized
// place for error dispatch...
| 10 |
diff --git a/assets/js/modules/analytics/components/common/ExistingTagNotice.js b/assets/js/modules/analytics/components/common/ExistingTagNotice.js @@ -26,7 +26,6 @@ import { sprintf, __ } from '@wordpress/i18n';
*/
import Data from 'googlesitekit-data';
import { MODULES_ANALYTICS } from '../../datastore/constants';
-import { MODULES_ANALYTICS_4 } from '../../../analytics-4/datastore/constants';
import { MODULES_TAGMANAGER } from '../../../tagmanager/datastore/constants';
const { useSelect } = Data;
@@ -35,80 +34,14 @@ export default function ExistingTagNotice() {
select( MODULES_ANALYTICS ).getPropertyID()
);
- const hasGA4ExistingTag = useSelect( ( select ) =>
- select( MODULES_ANALYTICS_4 ).hasExistingTag()
- );
-
- const ga4ExistingTag = useSelect( ( select ) =>
- select( MODULES_ANALYTICS_4 ).getExistingTag()
- );
-
- const measurementID = useSelect( ( select ) =>
- select( MODULES_ANALYTICS_4 ).getMeasurementID()
- );
-
const gtmAnalyticsPropertyID = useSelect( ( select ) =>
select( MODULES_TAGMANAGER ).getSingleAnalyticsPropertyID()
);
- const hasGTMAnalyticsProperty = !! gtmAnalyticsPropertyID;
-
- if ( ! hasGTMAnalyticsProperty ) {
+ if ( ! gtmAnalyticsPropertyID ) {
return null;
}
- function getNoticeForExistingGTMPropertyAndGA4Tag() {
- if (
- gtmAnalyticsPropertyID === propertyID &&
- ga4ExistingTag === measurementID
- ) {
- return sprintf(
- /* translators: %1$s: GTM property ID, %2$s: Analytics 4 measurement ID */
- __(
- 'An existing Google Tag Manager property with the ID %1$s and an existing Google Analytics 4 tag with the ID %2$s were found on your site. Since they refer to the same properties selected here, Site Kit will not place its own tags and rely on the existing ones. If later on you decide to remove this property and/or tag, Site Kit can place new tags for you.',
- 'google-site-kit'
- ),
- gtmAnalyticsPropertyID,
- ga4ExistingTag
- );
- } else if (
- gtmAnalyticsPropertyID === propertyID &&
- ga4ExistingTag !== measurementID
- ) {
- return sprintf(
- /* translators: %1$s: GTM property ID, %2$s: Analytics 4 measurement ID */
- __(
- 'An existing Google Tag Manager property with the ID %1$s and an existing Google Analytics 4 tag with the ID %2$s were found on your site. Since the Google Tag Manager property refers to the same property selected here, Site Kit will not place its own tag and rely on the existing one.',
- 'google-site-kit'
- ),
- gtmAnalyticsPropertyID,
- ga4ExistingTag
- );
- } else if (
- gtmAnalyticsPropertyID !== propertyID &&
- ga4ExistingTag === measurementID
- ) {
- return sprintf(
- /* translators: %1$s: GTM property ID, %2$s: Analytics 4 measurement ID */
- __(
- 'An existing Google Tag Manager property with the ID %1$s and an existing Google Analytics 4 tag with the ID %2$s were found on your site. Since the Google Analytics 4 tag refers to the same property selected here, Site Kit will not place its own tag and rely on the existing one. If later on you decide to remove this tag, Site Kit can place a new tag for you.',
- 'google-site-kit'
- ),
- gtmAnalyticsPropertyID,
- ga4ExistingTag
- );
- }
- return sprintf(
- /* translators: %1$s: GTM property ID, %2$s: Analytics 4 measurement ID */
- __(
- 'An existing Google Tag Manager property with the ID %1$s and an existing Google Analytics 4 tag with the ID %2$s were found on your site.',
- 'google-site-kit'
- ),
- gtmAnalyticsPropertyID,
- ga4ExistingTag
- );
- }
-
function getNoticeForExistingGTMProperty() {
if ( gtmAnalyticsPropertyID === propertyID ) {
return sprintf(
@@ -130,9 +63,5 @@ export default function ExistingTagNotice() {
);
}
- const notice = hasGA4ExistingTag
- ? getNoticeForExistingGTMPropertyAndGA4Tag()
- : getNoticeForExistingGTMProperty();
-
- return <p>{ notice }</p>;
+ return <p>{ getNoticeForExistingGTMProperty() }</p>;
}
| 2 |
diff --git a/components/Discussion/Comments.js b/components/Discussion/Comments.js @@ -398,7 +398,7 @@ class Comments extends PureComponent {
return (
<Loader
loading={loading}
- error={error}
+ error={error || (discussion === null && t('discussion/missing'))}
render={() => {
const {totalCount, pageInfo, nodes} = discussion.comments
| 9 |
diff --git a/package.json b/package.json {
"name": "design-system-react",
- "version": "0.8.8",
+ "version": "0.8.8-a",
"description": "Salesforce Lightning Design System for React",
"license": "SEE LICENSE IN README.md",
"engines": {
"warning": "^3.0.0"
},
"peerDependencies": {
- "@salesforce-ux/design-system": ">=2.4.x",
+ "@salesforce-ux/design-system": ">=2.4.x <=2.6.0-alpha",
"react": ">=15.4.1 <16",
"react-dom": ">=15.4.1 <16"
},
| 11 |
diff --git a/planet.js b/planet.js @@ -843,13 +843,6 @@ const _connectRoom = async roomName => {
}
});
- planet.update = () => {
- // update remote player rigs
- for (const peerConnection of peerConnections) {
- peerConnection.getPlayerRig().update();
- }
- };
-
/* channelConnection.addEventListener('botconnection', async e => {
console.log('got bot connection', e.data);
@@ -899,6 +892,13 @@ const _connectRoom = async roomName => {
});
};
+planet.update = () => {
+ // update remote player rigs
+ for (const peerConnection of peerConnections) {
+ peerConnection.getPlayerRig().update();
+ }
+};
+
planet.connect = async (rn, {online = true} = {}) => {
roomName = rn;
if (online) {
| 5 |
diff --git a/articles/quickstart/spa/angular2/01-login.md b/articles/quickstart/spa/angular2/01-login.md @@ -10,8 +10,6 @@ topics:
github:
path: 01-Login
---
-<%= include('../_includes/_intro', { library: 'Angular 2+' } ) %>
-
<%= include('../_includes/_getting_started', { library: 'Angular 2+', callback: 'http://localhost:3000/callback' }) %>
<%= include('_includes/_centralized_login') %>
\ No newline at end of file
| 2 |
diff --git a/docs/en/API-reference.md b/docs/en/API-reference.md @@ -123,7 +123,7 @@ dayjs().year();
### Month `.month()`
-Returns a `number` representing the `Dayjs`'s month.
+Returns a `number` representing the `Dayjs`'s month. Starts at 0
```js
dayjs().month();
@@ -131,7 +131,7 @@ dayjs().month();
### Day of the Month `.date()`
-Returns a `number` representing the `Dayjs`'s day of the month.
+Returns a `number` representing the `Dayjs`'s day of the month. Starts at 1
```js
dayjs().date();
@@ -139,7 +139,7 @@ dayjs().date();
### Day of the Week `.day()`
-Returns a `number` representing the `Dayjs`'s day of the week
+Returns a `number` representing the `Dayjs`'s day of the week. Starts on Sunday with 0
```js
dayjs().day();
| 0 |
diff --git a/src/inertia.js b/src/inertia.js @@ -17,6 +17,7 @@ export default {
if (window.history.state && this.navigationType() === 'back_forward') {
this.setPage(window.history.state)
} else {
+ window.history.state.cache = null
this.setPage(initialPage)
}
@@ -142,7 +143,11 @@ export default {
|| page.url === window.location.href
|| (window.location.pathname === '/' && page.url === window.location.href.replace(/\/$/, ''))
- window.history[replace ? 'replaceState' : 'pushState'](page, '', page.url)
+ if (replace) {
+ window.history.replaceState({ cache: window.history.state.cache, ...page }, '', page.url)
+ } else {
+ window.history.pushState(page, '', page.url)
+ }
},
restoreState(event) {
| 1 |
diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js @@ -260,7 +260,7 @@ class SidebarLinks extends React.Component {
hasDraftHistory = lodashGet(this.props.reports, `${ONYXKEYS.COLLECTION.REPORT}${this.props.currentlyViewedReportID}.hasDraft`, false);
}
- const shouldReorder = this.shouldReorder(hasDraftHistory);
+ const shouldReorder = this.shouldReorderReports(hasDraftHistory);
const switchingPriorityModes = this.props.priorityMode !== this.priorityMode;
// Build the report options we want to show
@@ -301,7 +301,7 @@ class SidebarLinks extends React.Component {
* @returns {Object}
*/
getUnreadReports(reports) {
- return _.reduce(unfilteredReports, (finalUnreadReportMap, report) => {
+ return _.reduce(reports, (finalUnreadReportMap, report) => {
if (report.unreadActionCount > 0) {
return {
[report.reportID]: true,
@@ -325,7 +325,7 @@ class SidebarLinks extends React.Component {
return sidebarOptions.recentReports;
}
- shouldReorder(hasDraftHistory) {
+ shouldReorderReports(hasDraftHistory) {
// We don't need to limit draft comment flashing for small screen widths as LHN is not visible.
// Because: TBD
// @TODO try and figure out why
| 10 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -207,6 +207,28 @@ npm run test-jasmine -- --help
npm run test-jasmine -- --info
```
+### Draft new baseline
+Install fonts and tools
+```sh
+# install required fonts (if missing) on ubuntu
+sudo cp -r .circleci/fonts/ /usr/share/ && sudo fc-cache -f
+# upgrade pip (if needed)
+python3 -m pip install --upgrade pip
+# install kaleido
+python3 -m pip install kaleido
+# install plotly
+python3 -m pip install plotly
+```
+
+If you added new mocks to test/image/mocks folder, to generate draft baselines run
+```sh
+python3 test/image/make_baseline.py = mockFilename1 mockFilename2
+```
+Then commit the new baselines and push.
+Please note that image pixel comparison tests run using circleci/python:3.8.9 docker container.
+Therefore the final baselines may need updates.
+This could simply be done by downloading the `baselines.tar` stored in the `ARTIFACTS` tab of `test-baselines` job (if the test failed).
+
### Image pixel comparison tests
Image pixel comparison tests are run in a docker container. For more
| 0 |
diff --git a/token-metadata/0xCA0e7269600d353F70b14Ad118A49575455C0f2f/metadata.json b/token-metadata/0xCA0e7269600d353F70b14Ad118A49575455C0f2f/metadata.json "symbol": "AMLT",
"address": "0xCA0e7269600d353F70b14Ad118A49575455C0f2f",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/server/game/cards/02.1-ToA/SmokeAndMirrors.js b/server/game/cards/02.1-ToA/SmokeAndMirrors.js @@ -17,7 +17,7 @@ class SmokeAndMirrors extends DrawCard {
},
handler: context => {
this.game.addMessage('{0} uses {1} to send {2} home', this.controller, this, context.target);
- _.each(context.target, card => this.game.currentConflict.sendHome(card));
+ this.game.currentConflict.sendHome(context.target);
}
});
}
| 4 |
diff --git a/src/MUIDataTable.js b/src/MUIDataTable.js @@ -421,7 +421,7 @@ class MUIDataTable extends React.Component {
column.options.sortDirection = 'none';
}
- if (column.options.sortDirection !== undefined) {
+ if (column.options.sortDirection !== undefined && column.options.sortDirection !== 'none') {
if (sortDirectionSet) {
console.error('sortDirection is set for more than one column. Only the first column will be considered.');
column.options.sortDirection = 'none';
| 11 |
diff --git a/articles/rules/legacy/index.md b/articles/rules/legacy/index.md @@ -65,10 +65,6 @@ Rules containing shared functions should be placed at the top of the [Rules list
## Examples
-::: note
-You can find more examples of common Rules on Github at [auth0/rules](https://github.com/auth0/rules).
-:::
-
To create a Rule, or try the examples below, go to [New Rule](${manage_url}/#/rules/create) in the Rule Editor on the dashboard.
### *Hello World*
| 2 |
diff --git a/views/redux/info/quests.es b/views/redux/info/quests.es @@ -306,18 +306,22 @@ function questTrackingReducer(state, {type, postBody, body, result}) {
// e.g. api_slotitem_ids = "24004,24020"
const slotitems = postBody.api_slotitem_ids || ''
const ids = slotitems.split(',')
- let flag = false
+ // now it only supports gun quest, slotitemId = $ietm.api_type[3]
+ let gunCount = 0
ids.forEach(id =>{
- const equip_id = getStore(`info.equips.${id}.api_slotitem_id`)
- const slotitemId = getStore(`const.$equips.${equip_id}.api_type.3`)
+ const equipId = getStore(`info.equips.${id}.api_slotitem_id`)
+ const slotitemId = getStore(`const.$equips.${equipId}.api_type.3`)
if (slotitemId === 15) {
- flag = updateQuestRecord('destory_item', {slotitemId: slotitemId}, 1) || flag
+ gunCount += 1
}
})
- if (flag) {
- return {...state, records}
- } else if (updateQuestRecord('destory_item', null, 1)) {
+ let flag = false
+ if (gunCount > 0) {
+ flag = updateQuestRecord('destory_item', {slotitemId: 15}, gunCount)
+ }
+
+ if (updateQuestRecord('destory_item', null, 1)|| flag) {
return {...state, records}
}
break
| 7 |
diff --git a/src/client/js/legacy/crowi.js b/src/client/js/legacy/crowi.js @@ -596,6 +596,11 @@ $(() => {
window.addEventListener('load', (e) => {
const { appContainer } = window;
+ // do nothing if user is guest
+ if (appContainer.currentUser == null) {
+ return;
+ }
+
// hash on page
if (window.location.hash) {
if ((window.location.hash === '#edit' || window.location.hash === '#edit-form') && $('.tab-pane#edit').length > 0) {
@@ -619,7 +624,9 @@ window.addEventListener('load', (e) => {
$('a[data-toggle="tab"][href="#revision-history"]').tab('show');
}
}
+});
+window.addEventListener('load', (e) => {
const crowi = window.crowi;
if (crowi && crowi.users && crowi.users.length !== 0) {
const totalUsers = crowi.users.length;
| 7 |
diff --git a/tests/phpunit/integration/Core/Authentication/Setup_V2Test.php b/tests/phpunit/integration/Core/Authentication/Setup_V2Test.php @@ -114,7 +114,7 @@ class Setup_V2Test extends TestCase {
* @dataProvider data_conditionally_syncs_site_fields
*/
public function test_handle_action_setup_start__syncs_site_fields( $has_credentials ) {
- $redirect_url = 'https://oauth.google.com/test-page';
+ $redirect_url = 'https://sitekit.withgoogle.com/test-page';
$user_id = $this->factory()->user->create( array( 'role' => 'administrator' ) );
wp_set_current_user( $user_id );
| 1 |
diff --git a/spec/requests/superadmin/organizations_spec.rb b/spec/requests/superadmin/organizations_spec.rb @@ -16,10 +16,6 @@ feature "Superadmin's organization API" do
end
end
- scenario "organization create fail" do
- pending "Exception handling isn' implemented yet"
- end
-
scenario "organization create success" do
@org_atts = build(:organization).attributes
post_json superadmin_organizations_path, { organization: @org_atts }, superadmin_headers do |response|
@@ -72,10 +68,6 @@ feature "Superadmin's organization API" do
end
end
- scenario "organization update fail" do
- pending "Exception handling isn' implemented yet"
- end
-
scenario "organization update success" do
put_json superadmin_organization_path(@organization1),
{
| 2 |
diff --git a/lib/shared/addon/components/cluster-driver/driver-azureaks/component.js b/lib/shared/addon/components/cluster-driver/driver-azureaks/component.js @@ -9,11 +9,11 @@ import {
} from 'ui/utils/azure-choices';
const VERSIONS = [
- // {
- // "value": "1.7.7"
- // },
{
- "value": "1.8.1"
+ "value": "1.8.11"
+ },
+ {
+ "value": "1.9.6"
},
];
@@ -29,13 +29,15 @@ export default Component.extend(ClusterDriver, {
this._super(...arguments);
let config = get(this, 'cluster.azureKubernetesServiceConfig');
+
if ( !config ) {
+
config = this.get('globalStore').createRecord({
agentPoolName: "rancher",
type: 'azureKubernetesServiceConfig',
osDiskSizeGb: 100,
adminUsername: 'azureuser',
- kubernetesVersion: '1.8.1',
+ kubernetesVersion: '1.8.11',
count: 3,
agentVmSize: 'Standard_A2',
location: 'eastus',
| 3 |
diff --git a/generators/entity/templates/client/angular/src/main/webapp/app/entities/_entity-management-dialog.component.html b/generators/entity/templates/client/angular/src/main/webapp/app/entities/_entity-management-dialog.component.html @@ -79,10 +79,10 @@ _%>
<span class="pull-left">{{<%= entityInstance %>.<%= fieldName %>ContentType}}, {{byteSize(<%= entityInstance %>.<%= fieldName %>)}}</span>
<%_ } _%>
<%_ if (fieldTypeBlobContent === 'image') { _%>
- <button type="button" (click)="clearInputImage('<%= fieldName %>', '<%= fieldName %>ContentType', 'fileImage')" class="btn btn-default btn-xs pull-right">
+ <button type="button" (click)="clearInputImage('<%= fieldName %>', '<%= fieldName %>ContentType', 'fileImage')" class="btn btn-secondary btn-xs pull-right">
<%_ } else { _%>
<button type="button" (click)="<%= entityInstance %>.<%= fieldName %>=null;<%= entityInstance %>.<%= fieldName %>ContentType=null;"
- class="btn btn-default btn-xs pull-right">
+ class="btn btn-secondary btn-xs pull-right">
<%_ } _%>
<span class="fa fa-times"></span>
</button>
@@ -95,7 +95,7 @@ _%>
<input id="field_<%= fieldName %>" type="text" class="form-control" name="<%= fieldName %>" ngbDatepicker #<%= fieldName %>Dp="ngbDatepicker" [(ngModel)]="<%= entityInstance %>.<%= fieldName %>"
<%- include ng_validators %>/>
<span class="input-group-btn">
- <button type="button" class="btn btn-default" (click)="<%= fieldName %>Dp.toggle()"><i class="fa fa-calendar"></i></button>
+ <button type="button" class="btn btn-secondary" (click)="<%= fieldName %>Dp.toggle()"><i class="fa fa-calendar"></i></button>
</span>
</div>
<%_ } else if (['Instant', 'ZonedDateTime'].includes(fieldType)) { _%>
@@ -263,7 +263,7 @@ _%>
<%_ } _%>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal" (click)="clear()">
+ <button type="button" class="btn btn-secondary" data-dismiss="modal" (click)="clear()">
<span class="fa fa-ban"></span> <span jhiTranslate="entity.action.cancel">Cancel</span>
</button>
<button type="submit" [disabled]="editForm.form.invalid || isSaving" class="btn btn-primary">
| 14 |
diff --git a/scenes/SceneTara.js b/scenes/SceneTara.js @@ -8,11 +8,9 @@ import { css } from "@emotion/react";
import { TabGroup } from "~/components/core/TabGroup";
import { ButtonPrimary } from "~/components/system/components/Buttons";
import { dispatchCustomEvent } from "~/common/custom-events";
-import { WarningMessage } from "~/components/core/WarningMessage";
import ScenePage from "~/components/core/ScenePage";
import DataView from "~/components/core/DataView";
-import DataMeter from "~/components/core/DataMeter";
import ScenePageHeader from "~/components/core/ScenePageHeader";
import EmptyState from "~/components/core/EmptyState";
@@ -22,9 +20,7 @@ const STYLES_ICONS = css`
justify-content: center;
`;
-const POLLING_INTERVAL = 10000;
-
-export default class SceneFilesFolder extends React.Component {
+export default class SceneTara extends React.Component {
render() {
return (
<ScenePage>
@@ -44,8 +40,6 @@ export default class SceneFilesFolder extends React.Component {
}
/>
- {/* <TabGroup disabled tabs={["Usage"]} />
- <DataMeter stats={this.props.viewer.stats} /> */}
{this.props.viewer.library[0].children && this.props.viewer.library[0].children.length ? (
<DataView
onAction={this.props.onAction}
| 10 |
diff --git a/src/client/js/components/PageEditor/GridEditModal.jsx b/src/client/js/components/PageEditor/GridEditModal.jsx @@ -30,8 +30,15 @@ export default class GridEditModal extends React.PureComponent {
this.hide();
}
- render() {
- showCols() {
+ // showDevices() {
+ // const devices = ['Phone', 'Tablet', 'Desktop', 'Large Desktop'];
+ // for (let i = 0; i < devices.length; i++) {
+ // devices.push(<div className="device-titile-bar">{devices}</div>);
+ // }
+ // return devices;
+ // }
+
+ showBgCols() {
const cols = [];
for (let i = 0; i < 12; i++) {
cols.push(<div className="bg-light mx-1 grid-edit-col"></div>);
@@ -39,6 +46,7 @@ export default class GridEditModal extends React.PureComponent {
return cols;
}
+ render() {
return (
<Modal isOpen={this.state.show} toggle={this.cancel} size="xl">
<ModalHeader tag="h4" toggle={this.cancel} className="bg-primary text-light">
@@ -57,7 +65,7 @@ export default class GridEditModal extends React.PureComponent {
<div className="device-titile-bar">Large Desktop</div>
<div className="device-container"></div>
</div>
- <div className="row col-9 flex-nowrap overflow-auto">{this.showColsBg()}</div>
+ <div className="row col-9 flex-nowrap overflow-auto">{this.showBgCols()}</div>
</div>
</div>
</ModalBody>
| 10 |
diff --git a/src/components/SaveEventButton.js b/src/components/SaveEventButton.js @@ -18,6 +18,19 @@ type State = {
progress?: Object
};
+const triggerAnimation = (progress: Object, active: boolean) => {
+ const value = active ? 1 : 0;
+ if (active) {
+ ReactNativeHapticFeedback.trigger("impactHeavy");
+ }
+ Animated.timing(progress, {
+ toValue: value,
+ duration: value * 800,
+ easing: Easing.linear,
+ useNativeDriver: true
+ }).start();
+};
+
export default class SaveEventButton extends React.Component<Props, State> {
static defaultProps = {
active: false,
@@ -41,23 +54,10 @@ export default class SaveEventButton extends React.Component<Props, State> {
// Animates heart when change from inactive -> active
// Snaps to start when change from active -> inactive
if (this.state.progress && this.props.active !== prevProps.active) {
- this.triggerAnimation();
+ triggerAnimation(this.state.progress, this.props.active);
}
}
- triggerAnimation() {
- const value = this.props.active ? 1 : 0;
- if (this.props.active) {
- ReactNativeHapticFeedback.trigger("impactHeavy");
- }
- Animated.timing(this.state.progress, {
- toValue: value,
- duration: value * 800,
- easing: Easing.linear,
- useNativeDriver: true
- }).start();
- }
-
handlePress = () => {
this.props.onPress(!this.props.active);
};
| 1 |
diff --git a/js/drawSamples.js b/js/drawSamples.js @@ -85,6 +85,11 @@ var drawSamples = (vg, props) => {
let {heatmapData, codes, width, zoom} = props,
{count, height, index} = zoom;
+ if (_.isEmpty(heatmapData)) { // no features to draw
+ vg.box(0, 0, width, height, "gray");
+ return;
+ }
+
vg.labels(() => {
draw(vg, {
height,
| 9 |
diff --git a/userscript.user.js b/userscript.user.js @@ -1039,7 +1039,7 @@ var $$IMU_EXPORT$$;
mouseover_styles: "",
// thanks to decembre on github for the idea: https://github.com/qsniyg/maxurl/issues/14#issuecomment-541065461
mouseover_wait_use_el: false,
- //mouseover_download_key: ["ctrl", "s"],
+ mouseover_download_key: ["s"],
mouseover_apply_blacklist: false,
website_inject_imu: true,
website_image: true,
@@ -1746,6 +1746,7 @@ var $$IMU_EXPORT$$;
requires: {
mouseover: true
},
+ type: "keysequence",
category: "popup",
subcategory: "behavior"
},
@@ -47798,6 +47799,12 @@ var $$IMU_EXPORT$$;
return src.replace(/(\/wp-content\/+uploads\/+.*)-[0-9]+x[0-9]+@[0-9]+x(\.[^/.]+)(?:[?#].*)?$/, "$1$2");
}
+ if (domain_nosub === "infcdn.net" && /^art/.test(domain)) {
+ // https://art-u2.infcdn.net/articles_uploads/4/4550/thumb/MacBookSortcuts2-300x.png
+ // https://art-u2.infcdn.net/articles_uploads/4/4550/MacBookSortcuts2.png
+ return src.replace(/(\/articles_uploads\/+[0-9]\/+[0-9]+\/+)thumb\/+([^/.]+)-[0-9]*x[0-9]*(\.[^/.]+)(?:[?#].*)?$/, "$1$2$3");
+ }
+
@@ -55566,23 +55573,7 @@ var $$IMU_EXPORT$$;
} else if (trigger_complete(settings.mouseover_gallery_next_key)) {
trigger_gallery(true);
ret = false;
- } else if (!event.shiftKey &&
- !event.ctrlKey &&
- !event.altKey &&
- !event.metaKey) {
- if (event.which === 82) { // r
- rotate_gallery(90);
- ret = false;
- } else if (event.which === 69) { // e
- rotate_gallery(-90);
- ret = false;
- }
- }
-
- if (ret === undefined && event.which === 83 // s
- && !event.shiftKey
- && !event.altKey
- && !event.metaKey) {
+ } else if (trigger_complete(settings.mouseover_download_key)) {
ret = false;
var a = document.createElement("a");
@@ -55613,6 +55604,17 @@ var $$IMU_EXPORT$$;
setTimeout(function() {
document.body.removeChild(a);
}, 500);
+ } else if (!event.shiftKey &&
+ !event.ctrlKey &&
+ !event.altKey &&
+ !event.metaKey) {
+ if (event.which === 82) { // r
+ rotate_gallery(90);
+ ret = false;
+ } else if (event.which === 69) { // e
+ rotate_gallery(-90);
+ ret = false;
+ }
}
if (ret === false) {
| 11 |
diff --git a/helpers/svgcode.json b/helpers/svgcode.json "desc": "Convert raster images like JPG, PNG, GIF, WebP, AVIF, etc. to vector graphics in SVG format.",
"url": "https://svgco.de/",
"tags": [
- "Data transformation",
"Favicons",
"Icons",
"Illustration",
"Images",
- "PWA",
"SVG"
],
"maintainers": [
"tomayac"
],
- "addedAt": "2021-11-17"
+ "addedAt": "2021-11-19"
}
| 2 |
diff --git a/world.js b/world.js @@ -127,9 +127,9 @@ world.connectRoom = async (roomName, worldURL) => {
rigManager.removePeerRig(peerConnection.connectionId);
live = false;
- world.dispatchEvent(new MessageEvent('peersupdate', {
+ /* world.dispatchEvent(new MessageEvent('peersupdate', {
data: Array.from(rigManager.peerRigs.values()),
- }));
+ })); */
});
peerConnection.addEventListener('status', e => {
@@ -153,11 +153,11 @@ world.connectRoom = async (roomName, worldURL) => {
updated = true;
}
- if (updated) {
+ /* if (updated) {
world.dispatchEvent(new MessageEvent('peersupdate', {
data: Array.from(rigManager.peerRigs.values()),
}));
- }
+ } */
});
peerConnection.addEventListener('pose', e => {
// const [head, leftGamepad, rightGamepad, floorHeight] = e.data;
@@ -224,9 +224,9 @@ world.connectRoom = async (roomName, worldURL) => {
}, 10);
}
- world.dispatchEvent(new MessageEvent('peersupdate', {
+ /* world.dispatchEvent(new MessageEvent('peersupdate', {
data: Array.from(rigManager.peerRigs.values()),
- }));
+ })); */
});
channelConnection.close = (close => function() {
close.apply(this, arguments);
| 2 |
diff --git a/layouts/partials/helpers/fragments.html b/layouts/partials/helpers/fragments.html check for presence of local fragments since multiple files can use a single
fragment.
*/}}
-{{- $local_fragments := $real_page.Resources.ByType "page" -}}
+{{- if $page -}}
+ {{- $local_fragments := $page.Resources.ByType "page" -}}
{{- $page_scratch.Set "fragments" (slice $page) -}}
{{- $page_scratch.Set "local_fragments_dirs" (slice) -}}
{{- $page_scratch.Add "fragments" (slice .) -}}
{{- $page_scratch.Add "local_fragments_dirs" .Dir -}}
{{- end -}}
+{{- else -}}
+ {{- $page_scratch.Set "fragments" (slice) -}}
+ {{- $page_scratch.Set "local_fragments_dirs" (slice) -}}
+{{- end -}}
{{- $page_scratch.Set "sections" (slice "/") -}}
{{- $sections := findRE "[^\\/]+" $real_page.CurrentSection.Dir -}}
{{- range ($page_scratch.Get "global_fragments") -}}
{{- $name := replace .Name "/index" "" -}}
{{- $directory_same_name := in ($page_scratch.Get "local_fragments_dirs") (printf "%s%s/" $root.Dir (replace $name ".md" "")) -}}
- {{- $file_same_name := where ($page_scratch.Get "fragments") ".Name" $name -}}
- {{- if and (not $file_same_name) (not $directory_same_name) (ne .Params.fragment "404") -}}
+ {{- if and (and ($page_scratch.Get "fragments") (not (where ($page_scratch.Get "fragments") ".Name" $name))) (not $directory_same_name) (ne .Params.fragment "404") -}}
{{- $page_scratch.Add "fragments" (slice .) -}}
{{- end -}}
{{- end -}}
| 1 |
diff --git a/renderer/pages/home.js b/renderer/pages/home.js @@ -40,17 +40,6 @@ const TopLeftFloatingButton = styled.div`
cursor: pointer;
`
-const ConfigureButton = styled(Button)`
- font-size: 12px;
- border-radius: 20px;
- height: 25px;
- line-height: 1;
- padding-left: 15px;
- padding-right: 15px;
- text-transform: none;
- border: 1px solid ${props => props.theme.colors.white};
-`
-
const ScrollableBox = styled(Box)`
max-height: 150px;
overflow: auto;
@@ -63,8 +52,7 @@ const FrontCardContent = ({
icon,
color,
toggleCard,
- onRun,
- onConfigure
+ onRun
}) => (
<Box width={1 / 2} pr={3} pb={3}>
<Card
@@ -156,7 +144,6 @@ class Home extends React.Component {
runDone: true,
stopping: false
}
- this.onConfigure = this.onConfigure.bind(this)
this.onRun = this.onRun.bind(this)
this.onMessage = this.onMessage.bind(this)
this.onKill = this.onKill.bind(this)
@@ -201,12 +188,6 @@ class Home extends React.Component {
}
}
- onConfigure(groupName) {
- return () => {
- console.log('configuring', groupName)
- }
- }
-
onKill() {
if (this.runner !== null && this.state.stopping !== true) {
this.runner.kill()
@@ -281,7 +262,6 @@ class Home extends React.Component {
{testList.map((t, idx) => (
<RunTestCard
onRun={this.onRun(t.key)}
- onConfigure={this.onConfigure(t.key)}
key={idx}
id={t.key}
{...t}
| 2 |
diff --git a/public/app/js/cbus-audio.js b/public/app/js/cbus-audio.js @@ -204,6 +204,7 @@ if (MPRISPlayer) {
supportedInterfaces: [ "player" ]
});
+ cbus.audio.mprisPlayer.canGoNext = false;
cbus.audio.mprisPlayer.canGoPrevious = false;
cbus.audio.mprisPlayer.playbackStatus = "Paused";
cbus.audio.mprisPlayer.minimumRate = cbus.audio.PLAYBACK_RATE_MIN;
| 12 |
diff --git a/src/components/dashboard/SendQRSummary.js b/src/components/dashboard/SendQRSummary.js @@ -86,7 +86,7 @@ const SendQRSummary = (props: AmountProps) => {
source={profile && profile.avatar}
/>
{to && <Section.Text style={styles.toText}>{`To: ${to}`}</Section.Text>}
- {profile && profile.name && <Section.Text style={styles.toText}>{`Name: ${profile.name}`}</Section.Text>}
+ {profile.name && <Section.Text style={styles.toText}>{`Name: ${profile.name}`}</Section.Text>}
</View>
<Section.Text>
{`Here's `}
| 2 |
diff --git a/test/jasmine/tests/titles_test.js b/test/jasmine/tests/titles_test.js @@ -6,6 +6,7 @@ var interactConstants = require('@src/constants/interactions');
var createGraphDiv = require('../assets/create_graph_div');
var destroyGraphDiv = require('../assets/destroy_graph_div');
var mouseEvent = require('../assets/mouse_event');
+var Plots = require('@src/plots/plots');
describe('editable titles', function() {
'use strict';
@@ -45,6 +46,24 @@ describe('editable titles', function() {
return promise;
}
+ function editTitle(letter, attr, text) {
+ return new Promise(function(resolve) {
+ gd.once('plotly_relayout', function(eventData) {
+ expect(eventData[attr]).toEqual(text, [letter, attr, eventData]);
+ setTimeout(resolve, 10);
+ });
+
+ var textNode = document.querySelector('.' + letter + 'title');
+ textNode.dispatchEvent(new window.MouseEvent('click'));
+
+ var editNode = document.querySelector('.plugin-editable.editable');
+ editNode.dispatchEvent(new window.FocusEvent('focus'));
+ editNode.textContent = text;
+ editNode.dispatchEvent(new window.FocusEvent('focus'));
+ editNode.dispatchEvent(new window.FocusEvent('blur'));
+ });
+ }
+
it('shows default titles semi-opaque with no hover effects', function(done) {
Plotly.plot(gd, data, {}, {editable: true})
.then(function() {
@@ -84,11 +103,13 @@ describe('editable titles', function() {
title: ''
}, {editable: true})
.then(function() {
- return Plotly.relayout(gd, {
- 'xaxis.title': 'XXX',
- 'yaxis.title': 'YYY',
- 'title': 'TTT'
- });
+ return editTitle('x', 'xaxis.title', 'XXX');
+ })
+ .then(function() {
+ return editTitle('y', 'yaxis.title', 'YYY');
+ })
+ .then(function() {
+ return editTitle('g', 'title', 'TTT');
})
.then(function() {
return Promise.all([
| 3 |
diff --git a/src/components/webServer/index.js b/src/components/webServer/index.js @@ -60,7 +60,8 @@ module.exports = class WebServer {
(
error.code.startsWith('HPE_') ||
error.code.startsWith('ECONN') ||
- error.code.startsWith('EPIPE')
+ error.code.startsWith('EPIPE') ||
+ error.code.startsWith('ECANCELED')
)
){
if(GlobalData.verbose){
| 8 |
diff --git a/token-metadata/0x4690D8F53E0d367f5b68f7F571e6eb4b72D39ACe/metadata.json b/token-metadata/0x4690D8F53E0d367f5b68f7F571e6eb4b72D39ACe/metadata.json "symbol": "WNRZ",
"address": "0x4690D8F53E0d367f5b68f7F571e6eb4b72D39ACe",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/screens/EventsScreen/FilterHeader.test.js b/src/screens/EventsScreen/FilterHeader.test.js @@ -3,6 +3,8 @@ import React from "react";
import { shallow } from "enzyme";
import FilterHeader from "./FilterHeader";
import type { Props as ComponentProps } from "./FilterHeader";
+import FilterHeaderButton from "./FilterHeaderButton";
+import FilterHeaderCategories from "./FilterHeaderCategories";
const render = (
props: ComponentProps = {
@@ -79,3 +81,52 @@ describe("renders correctly", () => {
expect(output).toMatchSnapshot();
});
});
+
+describe("filter buttons", () => {
+ it("calls onFilterCategoriesPress when users presses categories filter button", () => {
+ const mock = jest.fn();
+ const output = render({
+ dateFilter: null,
+ selectedCategories: new Set(),
+ onFilterCategoriesPress: mock,
+ onFilterButtonPress: () => {},
+ onDateFilterButtonPress: () => {},
+ numTagFiltersSelected: 0
+ });
+ output.find(FilterHeaderCategories).prop("onFilterPress")();
+
+ expect(mock).toBeCalledWith();
+ });
+
+ it("calls onDateFilterButtonPress when users presses date filter button", () => {
+ const mock = jest.fn();
+ const output = render({
+ dateFilter: null,
+ selectedCategories: new Set(),
+ onFilterCategoriesPress: () => {},
+ onFilterButtonPress: () => {},
+ onDateFilterButtonPress: mock,
+ numTagFiltersSelected: 0
+ });
+ const button = output.find(FilterHeaderButton).at(0);
+ button.simulate("press");
+
+ expect(mock).toBeCalledWith();
+ });
+
+ it("calls onFilterButtonPress when users presses attribute filter button", () => {
+ const mock = jest.fn();
+ const output = render({
+ dateFilter: null,
+ selectedCategories: new Set(),
+ onFilterCategoriesPress: () => {},
+ onFilterButtonPress: mock,
+ onDateFilterButtonPress: () => {},
+ numTagFiltersSelected: 0
+ });
+ const button = output.find(FilterHeaderButton).at(1);
+ button.simulate("press");
+
+ expect(mock).toBeCalledWith();
+ });
+});
| 0 |
diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml @@ -149,6 +149,10 @@ jobs:
- name: Checkout master branch
run: git checkout master
+ - name: Set Staging Version
+ run: |
+ echo "STAGING_VERSION=$(npm run print-version --silent)" >> $GITHUB_ENV
+
- name: Create Pull Request
# Version: 2.4.3
uses: repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d
@@ -157,5 +161,5 @@ jobs:
destination_branch: staging
pr_label: automerge
github_token: ${{ secrets.OS_BOTIFY_TOKEN }}
- pr_title: Update version to $(npm run print-version --silent) on staging
- pr_body: Update version to $(npm run print-version --silent)
+ pr_title: Update version to ${{ env.STAGING_VERSION }} on staging
+ pr_body: Update version to ${{ env.STAGING_VERSION }}
| 12 |
diff --git a/common/stores/account-store.js b/common/stores/account-store.js @@ -22,7 +22,13 @@ var controller = {
if (isInvite) {
return controller.onLogin();
} else {
- return data.post(`${Project.api}organisations/?format=json`, {name: organisation_name})
+ var opts = {};
+ if (ConfigStore.model && ConfigStore.model.free_tier && ConfigStore.model.free_tier.enabled) {
+ opts.free_to_use_subscription = true;
+ } else {
+ opts.subscription_date = moment();
+ }
+ return data.post(`${Project.api}organisations/?format=json`, Object.assign({}, {name: organisation_name}, opts))
.then(() => controller.onLogin())
}
})
| 12 |
diff --git a/src/components/FmaMap/index.js b/src/components/FmaMap/index.js @@ -14,8 +14,8 @@ class FmaMap extends Component {
console.log('layer', layer);
console.log('feature', feature);
console.log(this);
- if (feature.properties && feature.properties.fireblocks) {
- layer.bindPopup(`<span>${feature.properties.fireblocks[0].gid}</span>`);
+ if (feature.properties && feature.properties.fma_id) {
+ layer.bindPopup(`<span>This is totally FMA #${feature.properties.fma_id}!</span>`);
}
}
render() {
| 3 |
diff --git a/docs/axes/radial/linear.md b/docs/axes/radial/linear.md @@ -76,14 +76,12 @@ This example sets up a chart with a y axis that creates ticks at `0, 0.5, 1, 1.5
```javascript
let options = {
- scales: {
- yAxes: [{
+ scale: {
ticks: {
max: 5,
min: 0,
stepSize: 0.5
}
- }]
}
};
```
| 1 |
diff --git a/src/navigator/view/ItemView.js b/src/navigator/view/ItemView.js @@ -132,9 +132,11 @@ module.exports = Backbone.View.extend({
*/
handleEdit(e) {
e && e.stopPropagation();
+ const em = this.em;
const inputEl = this.getInputName();
inputEl[inputProp] = true;
inputEl.focus();
+ em && em.setEditing(1);
},
/**
@@ -142,10 +144,12 @@ module.exports = Backbone.View.extend({
*/
handleEditEnd(e) {
e && e.stopPropagation();
+ const em = this.em;
const inputEl = this.getInputName();
const name = inputEl.textContent;
inputEl[inputProp] = false;
this.model.set({ name });
+ em && em.setEditing(1);
},
/**
| 1 |
diff --git a/src/cn.js b/src/cn.js k && (envusr[k] = v);
}
const env = {
+ SINGLETRACE: '1',
...envusr,
APLK0: 'default',
AUTOCOMPLETE_PREFIXSIZE: '0',
CLASSICMODE: '1',
- SINGLETRACE: '1',
RIDE_SPAWNED: '1',
};
if (x.subtype === 'ssh') {
| 11 |
diff --git a/services/importer/lib/importer/downloader.rb b/services/importer/lib/importer/downloader.rb @@ -73,8 +73,6 @@ module CartoDB
attr_reader :source_file, :etag, :last_modified, :http_response_code, :datasource
- TMP_IMPORTER_PATH = '/tmp/importer'.freeze
-
def initialize(user_id, url, http_options = {}, options = {})
raise UploadError unless user_id && url
@@ -84,8 +82,6 @@ module CartoDB
@options = options
@downloaded_bytes = 0
-
- FileUtils.mkdir_p(TMP_IMPORTER_PATH)
end
def run(_available_quota_in_bytes = nil)
@@ -118,6 +114,19 @@ module CartoDB
private
+ DEFAULT_TMP_FILE_DIRECTORY = '/tmp/imports'.freeze
+
+ def tmp_file_directory
+ return @tmp_file_directory if @tmp_file_directory
+
+ directory = Cartodb.get_config(:importer, 'unp_temporal_folder') ||
+ DEFAULT_TMP_FILE_DIRECTORY
+
+ FileUtils.mkdir_p(directory) unless File.directory?(directory)
+
+ @tmp_file_directory = directory
+ end
+
def size_limit_in_bytes
@size_limit_in_bytes ||= [@user.max_import_file_size, @user.remaining_quota].compact.min
end
@@ -176,7 +185,7 @@ module CartoDB
def typhoeus_options
verify_ssl = @http_options.fetch(:verify_ssl_cert, false)
- cookiejar = Tempfile.new('cookiejar_', TMP_IMPORTER_PATH).path
+ cookiejar = Tempfile.new('cookiejar_', tmp_file_directory).path
{
cookiefile: cookiejar,
@@ -194,7 +203,7 @@ module CartoDB
FILENAME_PREFIX = 'importer_'.freeze
def download_and_store
- file = Tempfile.new(FILENAME_PREFIX, TMP_IMPORTER_PATH, encoding: 'ascii-8bit')
+ file = Tempfile.new(FILENAME_PREFIX, tmp_file_directory, encoding: 'ascii-8bit')
bound_request(file).run
| 4 |
diff --git a/src/screens/application/container/applicationContainer.js b/src/screens/application/container/applicationContainer.js @@ -258,7 +258,7 @@ class ApplicationContainer extends Component {
const { currentAccount } = this.props;
const postUrl = postUrlParser(url);
- const { author, permlink } = postUrl;
+ const { author, permlink } = postUrl || {};
try {
if (author) {
| 9 |
diff --git a/packages/@uppy/core/src/_variables.scss b/packages/@uppy/core/src/_variables.scss @@ -16,6 +16,19 @@ $color-yellow: #ffd600 !default;
$color-green: #1bb240 !default;
$color-blue: #2275d7 !default;
+// Shades of gray
+// @todo: replace all current grays with them
+$gray-50: #fafafa;
+$gray-100: #f4f4f4;
+$gray-200: #eaeaea;
+$gray-300: #dfdfdf;
+$gray-400: #bbb;
+$gray-500: #939393;
+$gray-600: #777;
+$gray-700: #525252;
+$gray-800: #333;
+$gray-900: #1f1f1f;
+
$color-uppy-pink: #eb2177;
// Sizes
| 0 |
diff --git a/src/tests/controllers/tribe3Messages.test.ts b/src/tests/controllers/tribe3Messages.test.ts @@ -122,7 +122,7 @@ export async function tribe3Msgs(t, node1, node2, node3) {
name: 'testChannel2',
owner_pubkey: node1.pubkey,
}
- console.log(tribe)
+
const tribeSeverAddChannelResponse = await http.post(
node1.external_ip + '/tribe_channel',
makeArgs(node1, createChannelBody)
@@ -131,6 +131,7 @@ export async function tribe3Msgs(t, node1, node2, node3) {
node1.external_ip + '/tribe_channel',
makeArgs(node1, createChannelBody2)
)
+ console.log(tribeSeverAddChannelResponse, tribeSeverAddChannelResponse2)
/*t.true(
tribeSeverAddChannelResponse.id == 0,
'First tribe added should have an id of 0'
@@ -139,12 +140,22 @@ export async function tribe3Msgs(t, node1, node2, node3) {
tribeSeverAddChannelResponse2.id == 1,
'Second tribe added should have an id of 1'
)*/
- console.log(tribeSeverAddChannelResponse, tribeSeverAddChannelResponse2)
//Here we get the tribe which should have the correct channels
const r = await getCheckTribe(t, node1, tribe.id)
const channelTribe = await getTribeByUuid(t, r)
- console.log(channelTribe)
+ console.log(
+ tribeSeverAddChannelResponse.response.id,
+ channelTribe.channels[0].id
+ )
+ t.true(
+ tribeSeverAddChannelResponse.response.id == channelTribe.channels[0].id,
+ 'First tribe added should have an id of 0'
+ )
+ t.true(
+ channelTribe.channels.length == 2,
+ 'the amount of channels in this new tribe should be 2'
+ )
//NODE3 SENDS A TEXT MESSAGE IN TRIBE
const text4 = randomText()
| 3 |
diff --git a/lib/grammars/javascript.js b/lib/grammars/javascript.js @@ -5,7 +5,7 @@ import GrammarUtils from '../grammar-utils';
const babel = path.join(__dirname, '../..', 'node_modules', '.bin', 'babel');
-const args = ({ filepath }) => ['-c', `${babel} --filename '${babel}' < '${filepath}'| node`];
+const args = ({ filepath }) => ['-c', `'${babel}' --filename '${babel}' < '${filepath}'| node`];
exports.Dart = {
'Selection Based': {
| 1 |
diff --git a/packages/core/src/commands/build.js b/packages/core/src/commands/build.js @@ -17,9 +17,9 @@ import getPath from "../utils/getPath";
const debug = require("debug")("phenomic:core:commands:build");
-const content = "content";
+const contentFolder = "content";
const getContentPath = (config: PhenomicConfig) =>
- getPath(path.join(config.path, content));
+ getPath(path.join(config.path, contentFolder));
let lastStamp = Date.now();
async function getContent(db, config: PhenomicConfig) {
@@ -57,7 +57,7 @@ async function getContent(db, config: PhenomicConfig) {
);
} catch (e) {
log.warn(
- `no '${content}' folder found. Please create and put files in this folder if you want the content to be accessible (eg: markdown or JSON files). `
+ `no '${contentFolder}' folder found. Please create and put files in this folder if you want the content to be accessible (eg: markdown or JSON files). `
);
}
}
| 10 |
diff --git a/articles/protocols/saml/index.html b/articles/protocols/saml/index.html @@ -119,10 +119,4 @@ title: SAML
</li>
</ul>
</li>
- <li>
- <i class="icon icon-budicon-715"></i><a href="/protocols/saml/idp-initiated-sso">IdP-Initiated SSO</a>
- <p>
- This article explains how to set up Identity Provider initiated Single Sign On.
- </p>
- </li>
</ul>
| 2 |
diff --git a/tests/.eslintrc.js b/tests/.eslintrc.js module.exports = {
"parserOptions": {
"ecmaVersion": 2017,
+ },
+ "rules": {
+ // console.info allowed to report on long going tasks or valuable debug information
+ "no-console": ["error", { allow: ["info"] }]
}
};
| 11 |
diff --git a/packages/rmw-shell/cra-template-rmw/template/functions/db/groupChatMessages/onCreate.f.js b/packages/rmw-shell/cra-template-rmw/template/functions/db/groupChatMessages/onCreate.f.js import * as functions from 'firebase-functions'
import admin from 'firebase-admin'
+const runtimeOpts = {
+ timeoutSeconds: 540,
+ memory: '2GB',
+}
+
export default functions
.region('europe-west1')
+ .runWith(runtimeOpts)
.database.ref('/group_chat_messages/{groupUid}/{messageUid}')
.onCreate(async (eventSnapshot, context) => {
- const { timestamp, params } = context
- const { groupUid, messageUid } = params
+ const { params } = context
+ const { groupUid } = params
if (context.authType === 'ADMIN') {
return null
@@ -19,7 +25,6 @@ export default functions
image,
location,
audio,
- authorUid,
created,
authorPhotoUrl,
authorName,
@@ -88,12 +93,14 @@ export default functions
})
})
+ try {
await admin.messaging().sendAll(messages)
+ } catch (error) {
+ console.warn(error)
+ }
} else {
console.log('No tokens found')
}
-
- await admin.messaging().sendAll(messages)
} else {
const members = []
| 3 |
diff --git a/source/swap/package.json b/source/swap/package.json "verify": "truffle run verify"
},
"devDependencies": {
- "@airswap/constants": "0.3.4",
+ "@airswap/constants": "0.3.5",
"@airswap/test-utils": "0.1.6",
"@airswap/tokens": "0.1.4",
"@airswap/utils": "0.3.11",
| 3 |
diff --git a/token-metadata/0x7968bc6a03017eA2de509AAA816F163Db0f35148/metadata.json b/token-metadata/0x7968bc6a03017eA2de509AAA816F163Db0f35148/metadata.json "symbol": "HGET",
"address": "0x7968bc6a03017eA2de509AAA816F163Db0f35148",
"decimals": 6,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/js/start.js b/js/start.js @@ -194,8 +194,8 @@ function isOnboardingNeeded() {
.done(() => {
onboardingNeededDeferred.resolve(false);
})
- .fail((xhr) => {
- const jqXhr = xhr.length ? xhr[0] : xhr;
+ .fail((xhr, e) => {
+ const jqXhr = xhr && xhr.length ? xhr[0] : xhr || e;
if (profileFailed || settingsFailed) {
const retryOnboardingModelsDialog = new Dialog({
| 9 |
diff --git a/app/views/faq.scala.html b/app/views/faq.scala.html <div class="row">
<div class="col-sm-12">
<p>
- Great! We really appreciate your help! It would be very helpful if you could use our tool to <i>audit accessibility of neighborhoods.</i>
+ Thanks for chipping in! You can help us out by using our tool to <i>audit the accessibility of neighborhoods.</i>
By accessibility audit, we mean:
</p>
<ol>
<li>
- Click <a href='@routes.AuditController.audit'>Start Auditing</a>.
+ Click <a href='@routes.AuditController.audit'>Start Mapping</a>.
</li>
<li>
- Take an interactive tutorial to learn how to use our tool (if you haven't taken one before).
+ Take an interactive tutorial to learn how to use our tool (if you haven't taken it before).
</li>
<li>
Walk along the streets and explore the neighborhood to find and label accessibility features.
</li>
</ol>
<p>
- Please watch the following video to see the demo of how the accessibility audit works:
+ Please watch the following video to see a demo of how an accessibility audit works:
</p>
</div>
<div class="video col-sm-12" style="text-align:center">
</div>
<div class="faq-item">
- <h2 class="question" id="can-i-select-a-neighborhood-to-audit">Can I select a neighborhood to audit?</h2>
+ <h2 class="question" id="can-i-select-a-neighborhood-to-audit">Can I pick which neighborhood I audit?</h2>
<div class="row">
<div class="col-sm-12">
<p>
- Yes! Please follow the following steps:
+ Yes! Just follow these steps:
</p>
<ol>
<li>
</div>
<div class="faq-item">
- <h2 class="question" id="what-to-do-when-navigation-arrow-disappears">What to do when navigation arrow disappears?</h2>
+ <h2 class="question" id="what-to-do-when-navigation-arrow-disappears">What to do when the navigation arrow disappears?</h2>
<div class="row">
<div class="col-sm-12">
<p>
- Sometimes during auditing, you would have noticed that the navigation arrows go missing, especially, while walking straight.
+ Sometimes while auditing, you may have noticed that the navigation arrows go missing, especially while walking straight.
Worry not, there is a simple solution! <br/><br/>
- Just double click on the street to move ahead and you are all set!
+ Just double click on the street to move ahead and you are all set! <br/><br/>
+ And if you are still stuck, you can always use the Jump button on the left.
</p>
</div>
</p>
<p>
So, <i>why</i> does it work like this? Well, the answer is kind of complicated but the short answer is:
- the Google Street View interface is akin to a 3-dimensional interface similar to walking in the real world.
+ the Google Street View interface is akin to a 3-dimensional interface, similar to walking in the real world.
When you place a label, we convert the 3D position of the label to a 2D lat/long position. However, once you take a
step to a new location, we cannot accurately recompute the label's position in 3D for that new view. See, we told
you it was kind of complicated. :)
</div>
<div class="faq-item">
- <h2 class="question" id="are-there-keyboard-shortcuts-for-the-image-labeling-interface">Are there keyboard shortcuts for the image labeling interface?</h2>
+ <h2 class="question" id="are-there-keyboard-shortcuts-for-the-image-labeling-interface">Are there keyboard shortcuts?</h2>
<div class="row">
<div class="col-sm-12">
<div class="spacer10"></div>
<th><kbd>Enter</kbd></th>
<td>Close label rating</td>
</tr>
+ <tr>
+ <th></th>
+ <th><kbd>Esc</kbd></th>
+ <td>Close label rating</td>
+ </tr>
<tr>
<th>Interface Control</th>
<th><kbd>Z</kbd></th>
| 3 |
diff --git a/lib/xmlSchemaFaker.js b/lib/xmlSchemaFaker.js @@ -47,7 +47,7 @@ function convertSchemaToXML(name, schema, attribute, indentChar, indent) {
attributes.push(`${key}="${propVal}"`);
}
else {
- childNodes += propVal === undefined ? '' : propVal;
+ childNodes += _.isString(propVal) ? propVal : '';
}
});
if (attributes.length > 0) {
| 9 |
diff --git a/src/components/select/Select.js b/src/components/select/Select.js @@ -115,6 +115,9 @@ export default class SelectComponent extends Field {
if (this.isHtmlRenderMode()) {
this.triggerUpdate();
}
+
+ // Get the template keys for this select component.
+ this.getTemplateKeys();
}
get dataReady() {
@@ -473,9 +476,50 @@ export default class SelectComponent extends Field {
return defaultValue;
}
+ getTemplateKeys() {
+ this.templateKeys = [];
+ if (this.options.readOnly && this.component.template) {
+ const keys = this.component.template.match(/({{\s*(.*?)\s*}})/g);
+ if (keys) {
+ keys.forEach((key) => {
+ const propKey = key.match(/{{\s*item\.(.*?)\s*}}/);
+ if (propKey && propKey.length > 1) {
+ this.templateKeys.push(propKey[1]);
+ }
+ });
+ }
+ }
+ }
+
+ get shouldLoad() {
+ // Live forms should always load.
+ if (!this.options.readOnly) {
+ return true;
+ }
+
+ // If there are template keys, then we need to see if we have the data.
+ if (this.templateKeys && this.templateKeys.length) {
+ // See if we already have the data we need.
+ return this.templateKeys.reduce((shouldLoad, key) => {
+ return shouldLoad || !_.has(this.dataValue, key);
+ }, false);
+ }
+
+ // Return that we should load.
+ return true;
+ }
+
loadItems(url, search, headers, options, method, body) {
options = options || {};
+ // See if we should load items or not.
+ if (!this.shouldLoad) {
+ this.isScrollLoading = false;
+ this.loading = false;
+ this.itemsLoadedResolve();
+ return;
+ }
+
// See if they have not met the minimum search requirements.
const minSearch = parseInt(this.component.minSearch, 10);
if (
@@ -830,7 +874,7 @@ export default class SelectComponent extends Field {
}
get active() {
- return !this.component.lazyLoad || this.activated || this.options.readOnly;
+ return !this.component.lazyLoad || this.activated;
}
render() {
@@ -1402,6 +1446,7 @@ export default class SelectComponent extends Field {
!this.active &&
!this.selectOptions.length &&
hasValue &&
+ this.shouldLoad &&
this.visible && (this.component.searchField || this.component.valueProperty);
}
| 7 |
diff --git a/services/importer/lib/importer/downloader.rb b/services/importer/lib/importer/downloader.rb @@ -17,7 +17,7 @@ require_relative '../../../../lib/carto/url_validator'
require_relative '../helpers/quota_check_helpers.rb'
# NOTE: Beware that some methods and some parameters are kept since this class is supposed to be
-# interchangeable with CartoDB::Importer2::DatasourceDownloader. A better way to have managed
+# interchangeable with CartoDB::Importer2::DatasourceDownloader. A better way to have
# managed this might have been through inheritance, since Ruby doesn't provide interfaces.
# The out-facing methods this class must implement for this purpose are:
# - supported_extensions
| 2 |
diff --git a/src/components/SideNav.js b/src/components/SideNav.js -import React, { useState } from "react"
+import React, { useState, useEffect } from "react"
import styled from "styled-components"
import { motion } from "framer-motion"
import Icon from "./Icon"
import Link from "./Link"
+// To display item as a collapsable directory vs. a link,
+// add a `path` property (of the directory), not a `to` property
const links = [
{
title: "README",
@@ -12,7 +14,7 @@ const links = [
},
{
title: "Foundational topics",
- to: "/developers/",
+ path: "/developers/docs/",
items: [
{
title: "Blockchain basics",
@@ -26,40 +28,6 @@ const links = [
title: "Web2 vs Web3",
to: "/developers/docs/web2-vs-web3/",
},
- {
- title: "Programming languages",
- to: "/developers/docs/programming-languages/",
- items: [
- {
- title: "Delphi",
- to: "/developers/docs/programming-languages/delphi/",
- },
- {
- title: ".NET",
- to: "/developers/docs/programming-languages/dot-net/",
- },
- {
- title: "Golang",
- to: "/developers/docs/programming-languages/golang/",
- },
- {
- title: "Java",
- to: "/developers/docs/programming-languages/java/",
- },
- {
- title: "Javascript",
- to: "/developers/docs/programming-languages/javascript/",
- },
- {
- title: "Python",
- to: "/developers/docs/programming-languages/python/",
- },
- {
- title: "Rust",
- to: "/developers/docs/programming-languages/rust/",
- },
- ],
- },
{
title: `Accounts`,
to: `/developers/docs/accounts/`,
@@ -100,7 +68,7 @@ const links = [
},
{
title: "Ethereum stack",
- to: "/developers/",
+ path: "/developers/docs/",
items: [
{
title: "Intro to the stack",
@@ -152,11 +120,45 @@ const links = [
title: "Development environments",
to: "/developers/docs/IDEs/",
},
+ {
+ title: "Programming languages",
+ to: "/developers/docs/programming-languages/",
+ items: [
+ {
+ title: "Delphi",
+ to: "/developers/docs/programming-languages/delphi/",
+ },
+ {
+ title: ".NET",
+ to: "/developers/docs/programming-languages/dot-net/",
+ },
+ {
+ title: "Golang",
+ to: "/developers/docs/programming-languages/golang/",
+ },
+ {
+ title: "Java",
+ to: "/developers/docs/programming-languages/java/",
+ },
+ {
+ title: "Javascript",
+ to: "/developers/docs/programming-languages/javascript/",
+ },
+ {
+ title: "Python",
+ to: "/developers/docs/programming-languages/python/",
+ },
+ {
+ title: "Rust",
+ to: "/developers/docs/programming-languages/rust/",
+ },
+ ],
+ },
],
},
{
title: "Advanced",
- to: "/developers/",
+ path: "/developers/docs/",
items: [
{
title: "Token standards",
@@ -220,7 +222,6 @@ const LinkContainer = styled.div`
justify-content: space-between;
padding: 0.5rem 1rem 0.5rem 2rem;
&:hover {
- color: ${(props) => props.theme.colors.primary};
background-color: ${(props) => props.theme.colors.ednBackground};
}
`
@@ -235,22 +236,40 @@ const SideNavLink = styled(Link)`
color: ${(props) => props.theme.colors.primary};
}
`
+const SideNavGroup = styled.div`
+ width: 100%;
+ cursor: pointer;
+`
const NavItem = styled.div``
-// TODO inner links flash on navigation...
-// Some issue w/ re-render on route change?
const NavLink = ({ item, path }) => {
- const isLinkInPath = path.includes(item.to)
+ const isLinkInPath = path.includes(item.to) || path.includes(item.path)
const [isOpen, setIsOpen] = useState(isLinkInPath)
+ useEffect(() => {
+ // Only set on items that contain a link
+ // Otherwise items w/ `path` would re-open every path change
+ if (item.to) {
+ const shouldOpen = path.includes(item.to) || path.includes(item.path)
+ setIsOpen(shouldOpen)
+ }
+ }, [path])
+
if (item.items) {
return (
<NavItem>
<LinkContainer>
+ {item.to && (
<SideNavLink to={item.to} isPartiallyActive={false}>
{item.title}
</SideNavLink>
+ )}
+ {!item.to && (
+ <SideNavGroup onClick={() => setIsOpen(!isOpen)}>
+ {item.title}
+ </SideNavGroup>
+ )}
<IconContainer
onClick={() => setIsOpen(!isOpen)}
variants={{
@@ -291,6 +310,10 @@ const NavLink = ({ item, path }) => {
)
}
+// TODO set tree state based on if current path is a child
+// of the given parent. Currently all `path` items defaul to open
+// and they only collapse when clicked on.
+// e.g. solution: https://github.com/hasura/gatsby-gitbook-starter/blob/5c165af40e48fc55eb06b45b95c84eb64b17ed32/src/components/sidebar/tree.js
const SideNav = ({ path }) => {
return (
<Aside>
| 11 |
diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js @@ -12,6 +12,7 @@ import _ from 'underscore';
import lodashGet from 'lodash/get';
import {withOnyx} from 'react-native-onyx';
import lodashIntersection from 'lodash/intersection';
+import moment from 'moment';
import styles, {getButtonBackgroundColorStyle, getIconFillColor} from '../../../styles/styles';
import themeColors from '../../../styles/themes/default';
import TextInputFocusable from '../../../components/TextInputFocusable';
@@ -268,6 +269,16 @@ class ReportActionCompose extends React.Component {
return this.props.translate('reportActionCompose.writeSomething');
}
+ /**
+ * Get timezone's UTC offset in minutes
+ *
+ * @param {String} [timezone]
+ * @return {Number}
+ */
+ getTimezoneOffset(timezone) {
+ return moment().tz(timezone).utcOffset();
+ }
+
/**
* Focus the composer text input
* @param {Boolean} [shouldelay=false] Impose delay before focusing the composer
@@ -456,7 +467,7 @@ class ReportActionCompose extends React.Component {
&& !hasMultipleParticipants
&& reportRecipient
&& reportRecipientTimezone
- && currentUserTimezone.selected !== reportRecipientTimezone.selected;
+ && this.getTimezoneOffset(currentUserTimezone.selected) !== this.getTimezoneOffset(reportRecipientTimezone.selected);
// Prevents focusing and showing the keyboard while the drawer is covering the chat.
const isComposeDisabled = this.props.isDrawerOpen && this.props.isSmallScreenWidth;
| 7 |
diff --git a/test/jasmine/tests/select_test.js b/test/jasmine/tests/select_test.js @@ -1228,6 +1228,90 @@ describe('Test select box and lasso in general:', function() {
.then(done);
});
+ describe('should return correct range data on dragmode *select*', function() {
+ var specs = [{
+ axType: 'linear',
+ rng: [-0.6208, 0.8375]
+ }, {
+ axType: 'log',
+ rng: [0.2394, 6.8785]
+ }, {
+ axType: 'date',
+ rng: ['2000-01-20 19:48', '2000-04-06 01:48']
+ }, {
+ axType: 'category',
+ rng: [undefined, undefined]
+ }, {
+ axType: 'multicategory',
+ rng: [undefined, undefined]
+ }]
+
+ specs.forEach(function(s) {
+ it('- @flaky on ' + s.axType + ' axes', function(done) {
+ var gd = createGraphDiv();
+
+ Plotly.plot(gd, [], {
+ xaxis: {type: s.axType},
+ dragmode: 'select',
+ width: 400,
+ height: 400
+ })
+ .then(function() {
+ resetEvents(gd);
+ drag(selectPath);
+ return selectedPromise;
+ })
+ .then(function() {
+ expect(selectedData.range.x).toBeCloseToArray(s.rng, 2);
+ })
+ .catch(failTest)
+ .then(done);
+ });
+ });
+ });
+
+ describe('should return correct range data on dragmode *lasso*', function() {
+ var specs = [{
+ axType: 'linear',
+ pts: [5.883, 5.941, 6, 6]
+ }, {
+ axType: 'log',
+ pts: [764422.2742, 874312.4580, 1000000, 1000000]
+ }, {
+ axType: 'date',
+ pts: ['2000-12-25 21:36', '2000-12-28 22:48', '2001-01-01', '2001-01-01']
+ }, {
+ axType: 'category',
+ pts: [undefined, undefined, undefined, undefined]
+ }, {
+ axType: 'multicategory',
+ pts: [undefined, undefined, undefined, undefined]
+ }]
+
+ specs.forEach(function(s) {
+ it('- @flaky on ' + s.axType + ' axes', function(done) {
+ var gd = createGraphDiv();
+
+ Plotly.plot(gd, [], {
+ xaxis: {type: s.axType},
+ dragmode: 'lasso',
+ width: 400,
+ height: 400
+ })
+ .then(function() {
+ resetEvents(gd);
+ drag(lassoPath);
+ return selectedPromise;
+ })
+ .then(function() {
+ expect(selectedData.lassoPoints.x).toBeCloseToArray(s.pts, 2);
+ })
+ .catch(failTest)
+ .then(done);
+ });
+ });
+ });
+
it('@flaky should have their selection outlines cleared during *axrange* relayout calls', function(done) {
var gd = createGraphDiv();
var fig = Lib.extendDeep({}, mock);
| 0 |
diff --git a/lib/components/fields/fields.js b/lib/components/fields/fields.js @@ -50,7 +50,7 @@ export default createReactClass({
// Want to move to fieldset with legend, but doing a little backward-compatible
// hacking here, only converting child `fields` without keys.
- const isGroup = !!((field.parent && field.key === '') || field.key == null);
+ const isGroup = !!(field.parent && (field.key === '' || field.key == null));
const classes = _.extend({}, this.props.classes);
| 1 |
diff --git a/examples/gallery/src/line-layer.html b/examples/gallery/src/line-layer.html <head>
<title>deck.gl LineLayer Example</title>
- <script src="https://unpkg.com/deck.gl@latest/deckgl.min.js"></script>
-
+ <script src="https://unpkg.com/deck.gl@^7.0.0/dist.min.js"></script>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.js"></script>
<style type="text/css">
height: 100vh;
margin: 0;
}
+ #tooltip:empty {
+ display: none;
+ }
+ #tooltip {
+ font-family: Helvetica, Arial, sans-serif;
+ position: absolute;
+ padding: 4px;
+ margin: 8px;
+ background: rgba(0, 0, 0, 0.8);
+ color: #fff;
+ max-width: 300px;
+ font-size: 10px;
+ z-index: 9;
+ pointer-events: none;
+ }
</style>
</head>
- <body></body>
+ <body>
+ <div id="tooltip"></div>
+ </body>
<script type="text/javascript">
- const {DeckGL, LineLayer} = deck;
- function getColor(d) {
- const z = d.start[2];
- const r = z / 10000;
-
- return [255 * (1 - r * 2), 128 * r, 255 * r, 255 * (1 - r)];
- }
+ const {DeckGL, LineLayer} = deck;
new DeckGL({
mapboxApiAccessToken: '<mapbox-access-token>',
new LineLayer({
id: 'line',
data: 'https://raw.githubusercontent.com/uber-common/deck.gl-data/master/examples/line/heathrow-flights.json',
- fp64: false,
+ pickable: true,
getSourcePosition: d => d.start,
getTargetPosition: d => d.end,
getColor: d => getColor(d),
- getStrokeWidth: 5
+ getWidth: 8,
+ onHover: updateTooltip,
})
]
});
+
+ function getColor(d) {
+ const z = d.start[2];
+ const r = z / 10000;
+ return [255 * (1 - r * 2), 128 * r, 255 * r, 255 * (1 - r)];
+ }
+
+ function updateTooltip({x, y, object}) {
+ const tooltip = document.getElementById('tooltip');
+ if (object) {
+ tooltip.style.top = `${y}px`;
+ tooltip.style.left = `${x}px`;
+ tooltip.innerHTML = `Flight ${object.name}`;
+ } else {
+ tooltip.innerHTML = '';
+ }
+ }
+
</script>
</html>
| 0 |
diff --git a/edit.js b/edit.js @@ -32,6 +32,7 @@ import {
getNextMeshId,
makePromise,
} from './constants.js';
+import storage from './storage.js';
import alea from './alea.js';
import easing from './easing.js';
import {planet} from './planet.js';
@@ -972,13 +973,14 @@ const geometryWorker = (() => {
const subparcelOffset = callStack.ou32[offset++];
const subparcelSize = callStack.ou32[offset++];
- const x = moduleInstance.HEAP32[subparcelOffset/Uint32Array.BYTES_PER_ELEMENT];
- const y = moduleInstance.HEAP32[subparcelOffset/Uint32Array.BYTES_PER_ELEMENT + 1];
- const z = moduleInstance.HEAP32[subparcelOffset/Uint32Array.BYTES_PER_ELEMENT + 2];
+ // const x = moduleInstance.HEAP32[subparcelOffset/Uint32Array.BYTES_PER_ELEMENT];
+ // const y = moduleInstance.HEAP32[subparcelOffset/Uint32Array.BYTES_PER_ELEMENT + 1];
+ // const z = moduleInstance.HEAP32[subparcelOffset/Uint32Array.BYTES_PER_ELEMENT + 2];
const index = moduleInstance.HEAP32[subparcelOffset/Uint32Array.BYTES_PER_ELEMENT + 3];
-
- // XXX save subparcel here
- // console.log('update subparcel', x, y, z, index, subparcelSize);
+ storage.setRaw(`subparcel:${index}`, moduleInstance.HEAPU8.slice(subparcelOffset, subparcelOffset + subparcelSize))
+ /* .then(() => {
+ console.log('set raw ok', x, y, z, `subparcel:${index}`);
+ }); */
},
[--messageIndex]: function updateGeometry(offset) {
{
@@ -2389,15 +2391,16 @@ const geometryWorker = (() => {
const numLoadedCoordsOffset = neededCoordsOffset + Uint32Array.BYTES_PER_ELEMENT*2;
const numGenerateCoordsOffset = neededCoordsOffset + Uint32Array.BYTES_PER_ELEMENT*3;
+ (async () => {
for (let i = 0; i < numAddedCoords; i++) {
- const x = moduleInstance.HEAP32[addedCoordsOffset/Uint32Array.BYTES_PER_ELEMENT + i*4];
- const y = moduleInstance.HEAP32[addedCoordsOffset/Uint32Array.BYTES_PER_ELEMENT + i*4 + 1];
- const z = moduleInstance.HEAP32[addedCoordsOffset/Uint32Array.BYTES_PER_ELEMENT + i*4 + 2];
+ // const x = moduleInstance.HEAP32[addedCoordsOffset/Uint32Array.BYTES_PER_ELEMENT + i*4];
+ // const y = moduleInstance.HEAP32[addedCoordsOffset/Uint32Array.BYTES_PER_ELEMENT + i*4 + 1];
+ // const z = moduleInstance.HEAP32[addedCoordsOffset/Uint32Array.BYTES_PER_ELEMENT + i*4 + 2];
const index = moduleInstance.HEAP32[addedCoordsOffset/Uint32Array.BYTES_PER_ELEMENT + i*4 + 3];
- // XXX load subparcel here
- // console.log('got x y z', x, y, z, index);
+ const uint8Array = await storage.getRaw(`subparcel:${index}`)
+ console.log('got subarray', `subparcel:${index}`, uint8Array);
}
-
+ })().then(() => {
moduleInstance.HEAPU32[numGenerateCoordsOffset/Uint32Array.BYTES_PER_ELEMENT] = numAddedCoords;
moduleInstance._finishUpdate(
@@ -2406,6 +2409,7 @@ const geometryWorker = (() => {
geometrySet,
neededCoordsOffset
);
+ });
}
}
| 0 |
diff --git a/core/i18n.js b/core/i18n.js * Node attributes that define how node content will be localized.
*
* There're following supported attributes:
- * - i18n: replace value of `innerHTML` property by localized text;
+ * - i18n: replace value of `textContent` property by localized text;
* - i18n-title: replace value of `title` attribute by localized text;
* - i18n-placeholder: replace value of `placeholder` attribute by localized text.
*
const I18N_ATTRS = ['i18n', 'i18n-title', 'i18n-placeholder'];
$(() => {
+ const domParser = new DOMParser();
+
localizePage();
/**
@@ -69,7 +71,19 @@ $(() => {
switch (attr) {
case 'i18n':
- node.innerHTML = text;
+ if (hasHtmlTags(text)) {
+ let nodes = makeNodes(text);
+ if (nodes) {
+ nodes.forEach((n) => {
+ node.appendChild(n);
+ });
+ } else {
+ // Fallback
+ node.textContent = text;
+ }
+ } else {
+ node.textContent = text;
+ }
break;
case 'i18n-title':
@@ -82,4 +96,27 @@ $(() => {
}
}
}
+
+ /**
+ * Create array of nodes which can be applied to node to be translated.
+ * @param {String} rawHtml String contains HTML code
+ * @return {Array} Array of nodes from given text
+ */
+ function makeNodes(rawHtml) {
+ let html = `<div>${rawHtml}</div>`;
+
+ let body = domParser.parseFromString(html, 'text/html').body;
+ return [...body.firstChild.childNodes].filter((a) => {
+ return a.nodeType === a.TEXT_NODE || a.tagName === 'A';
+ });
+ }
+
+ /**
+ * Check if given text contains HTML tags
+ * @param {String} text String supposed to have HTML tags
+ * @return {Boolean} Check result
+ */
+ function hasHtmlTags(text) {
+ return /<.+?>/.test(text);
+ }
});
| 11 |
diff --git a/src/views/studio/studio.scss b/src/views/studio/studio.scss @@ -76,7 +76,7 @@ $radius: 8px;
padding: 0;
margin: 0;
}
- .studio-description:disabled {
+ .studio-description:disabled, .studio-description-text {
background: $ui-blue-10percent;
}
.studio-description-text {
| 12 |
diff --git a/src/utilities/WorldStateClient.js b/src/utilities/WorldStateClient.js @@ -153,7 +153,7 @@ export default class WorldStateClient {
this.#logger.error(`invalid request: ${endpoint} not an ENDPOINTS.WORLDSTATE or ENDPOINTS.SEARCH`);
return undefined;
}
- return fetch(`${apiBase}/${endpoint}?language=${language}&ts=${Date.now()}`, {
+ return fetch(`${apiBase}/${endpoint}/?language=${language}&ts=${Date.now()}`, {
headers: {
platform,
'Accept-Language': language,
@@ -169,7 +169,7 @@ export default class WorldStateClient {
*/
async riven(query, platform) {
this.#logger.silly(`searching rivens for ${query}`);
- return fetch(`${apiBase}/${platform}/rivens/search/${encodeURIComponent(query)}`);
+ return fetch(`${apiBase}/${platform}/rivens/search/${encodeURIComponent(query)}/`);
}
/**
@@ -181,7 +181,9 @@ export default class WorldStateClient {
*/
async search(endpoint, query, language) {
this.#logger.silly(`searching ${endpoint} for ${query}`);
- return fetch(`${apiBase}/${endpoint}/search/${encodeURIComponent(query.toLowerCase())}?language=${language}`);
+ return fetch(
+ `${apiBase}/${endpoint}/search/${encodeURIComponent(query.toLowerCase())}/?language=${language || 'en'}`
+ );
}
/**
| 1 |
diff --git a/src/screens/FilterModal/component.test.js b/src/screens/FilterModal/component.test.js @@ -159,4 +159,84 @@ describe("FilterModal", () => {
const header = output.find("Header");
expect(header.props().showClear).toBe(false);
});
+
+ it("dispatches new filter when checkbox checked", () => {
+ const navigation = {
+ addListener: () => {}
+ };
+ const eventFilters = {
+ price: new Set()
+ };
+ const onChangeSpy = jest.fn();
+ const output = shallow(
+ <FilterModal
+ navigation={navigation}
+ applyButtonText="Show 26 events"
+ onChange={onChangeSpy}
+ onApply={() => {}}
+ onCancel={() => {}}
+ eventFilters={eventFilters}
+ numTagFiltersSelected={eventFilters.price.size}
+ numEventsSelected={1}
+ />
+ );
+
+ output.instance().handleCheckboxChange("price", "free");
+
+ expect(onChangeSpy).toHaveBeenCalledWith({ price: new Set(["free"]) });
+ });
+
+ it("dispatches filter removed when checkbox unchecked", () => {
+ const navigation = {
+ addListener: () => {}
+ };
+ const eventFilters = {
+ price: new Set(["free"])
+ };
+ const onChangeSpy = jest.fn();
+ const output = shallow(
+ <FilterModal
+ navigation={navigation}
+ applyButtonText="Show 26 events"
+ onChange={onChangeSpy}
+ onApply={() => {}}
+ onCancel={() => {}}
+ eventFilters={eventFilters}
+ numTagFiltersSelected={eventFilters.price.size}
+ numEventsSelected={1}
+ />
+ );
+
+ output.instance().handleCheckboxChange("price", "free");
+
+ expect(onChangeSpy).toHaveBeenCalledWith({ price: new Set() });
+ });
+
+ it("calls on apply and goes back in navigation when apply button pressed", () => {
+ const navigation = {
+ addListener: () => {},
+ goBack: jest.fn()
+ };
+ const eventFilters = {
+ price: new Set(["free"])
+ };
+ const onApplySpy = jest.fn();
+ const output = shallow(
+ <FilterModal
+ navigation={navigation}
+ applyButtonText="Show 26 events"
+ onChange={() => {}}
+ onApply={onApplySpy}
+ onCancel={() => {}}
+ eventFilters={eventFilters}
+ numTagFiltersSelected={eventFilters.price.size}
+ numEventsSelected={1}
+ />
+ );
+
+ output.find("Button").simulate("Press");
+
+ expect(onApplySpy).toHaveBeenCalled();
+ expect(navigation.goBack).toHaveBeenCalled();
+ });
});
| 7 |
diff --git a/sirepo/package_data/static/js/sirepo.js b/sirepo/package_data/static/js/sirepo.js @@ -911,6 +911,9 @@ SIREPO.app.factory('frameCache', function(appState, panelState, requestSender, $
m = m[frameReport in m ? frameReport : c];
var f = SIREPO.APP_SCHEMA.frameIdFields;
f = f[frameReport in f ? frameReport : c];
+ if (! f) {
+ throw new Error('frameReport=' + frameReport + ' missing from schema frameIdFields');
+ }
// POSIT: same as sirepo.sim_data._FRAME_ID_SEP
return v.concat(
f.map(function (a) {return m[a];})
| 7 |
diff --git a/build/transpile.js b/build/transpile.js @@ -175,6 +175,7 @@ const pythonRegexes = [
[ /this\.stringToBinary\s*\((.*)\)/g, '$1' ],
[ /this\.stringToBase64\s/g, 'base64.b64encode' ],
[ /this\.base64ToBinary\s/g, 'base64.b64decode' ],
+ [ /\.shift\s*\(\)/g, '.pop (0)' ],
// insert common regexes in the middle (critical)
].concat (commonRegexes).concat ([
@@ -290,6 +291,8 @@ const phpRegexes = [
[ /this\.stringToBase64/g, 'base64_encode' ],
[ /this\.base64ToBinary/g, 'base64_decode' ],
[ /this\.deepExtend/g, 'array_replace_recursive'],
+ [ /(\w+)\.shift\s*\(\)/g, 'array_shift ($1)' ],
+ [ /(\w+)\.pop\s*\(\)/g, 'array_pop ($1)' ],
// insert common regexes in the middle (critical)
].concat (commonRegexes).concat ([
| 4 |
diff --git a/definitions/npm/humps_v2.x.x/flow_v0.104.x-/test_humps_v2.x.x.js b/definitions/npm/humps_v2.x.x/flow_v0.104.x-/test_humps_v2.x.x.js @@ -15,7 +15,8 @@ import {
describe("tests", () => {
it("errors", () => {
- // $FlowExpectedError
+ // $FlowExpectedError[incompatible-call]
+ // $FlowExpectedError[incompatible-cast]
(camelize(42): number);
});
| 1 |
diff --git a/userscript.user.js b/userscript.user.js @@ -9111,8 +9111,24 @@ var $$IMU_EXPORT$$;
}
if (domain === "imgsrv.piclick.me") {
+ // http://imgsrv.piclick.me/publish.php?pid=1319
+ // https://imgsrv.piclick.me/cimg/1319.jpg
+ newsrc = src.replace(/\/publish\.php\?(?:.*&)?pid=([0-9]+)(?:[?#].*)?$/, "/cimg/$1.jpg");
+ if (newsrc !== src)
+ return newsrc;
+
// http://imgsrv.piclick.me/cimg/163x220xN_477539.jpg
- return src.replace(/\/cimg\/[0-9]+x[0-9]+x/, "/cimg/");
+ // https://imgsrv.piclick.me/cimg/N_477539.jpg
+ // https://imgsrv.piclick.me/cimg/477539.jpg -- same
+ newsrc = src.replace(/\/cimg\/+[0-9]+x[0-9]+x/, "/cimg/");
+ if (newsrc !== src)
+ return newsrc;
+
+ // https://imgsrv.piclick.me/cimg/N_477539.jpg
+ // https://imgsrv.piclick.me/cimg/477539.jpg
+ newsrc = src.replace(/\/cimg\/+N_/, "/cimg/");
+ if (newsrc !== src)
+ return newsrc;
}
if (domain_nowww === "slate.com") {
| 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.