code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/plots/gl3d/scene.js b/src/plots/gl3d/scene.js @@ -990,11 +990,11 @@ proto.updateFx = function(dragmode, hovermode) { }; function flipPixels(pixels, w, h) { - for(var j = 0, k = h - 1; j < k; ++j, --k) { - for(var i = 0; i < w; ++i) { - for(var l = 0; l < 4; ++l) { - var a = 4 * (w * j + i) + l; - var b = 4 * (w * k + i) + l; + for(var i = 0, q = h - 1; i < q; ++i, --q) { + for(var j = 0; j < w; ++j) { + for(var k = 0; k < 4; ++k) { + var a = 4 * (w * i + j) + k; + var b = 4 * (w * q + j) + k; var tmp = pixels[a]; pixels[a] = pixels[b]; pixels[b] = tmp;
10
diff --git a/lambda/fulfillment/lib/middleware/5_cache.js b/lambda/fulfillment/lib/middleware/5_cache.js @@ -7,7 +7,7 @@ var util=require('./util') module.exports=async function cache(req,res){ console.log("Entering Cache Middleware") console.log("response:" + JSON.stringify(res)) - res.out.sessionAttributes.cachedOutput= res.out.response + res.session.cachedOutput= res.response console.log("edited response:" + JSON.stringify(res)) return {req,res} }
1
diff --git a/src/libs/KeyboardShortcut/index.js b/src/libs/KeyboardShortcut/index.js @@ -177,15 +177,19 @@ function getShortcutModifiers(modifiers) { } /** - * Module storing the different keyboard shortcut + * This module configures a global keyboard event handler. * - * We are using a push/pop model where new event are pushed at the end of an - * array of events. When the event occur, we trigger the callback of the last - * element. This allow us to replace shortcut from a page to a dialog without - * having the page having to handle that logic. + * It uses a stack to store event handlers for each key combination. Some additional details: * - * This is also following the convention of the PubSub module. - * The "subClass" is used by pages to bind /unbind with no worries + * - By default, new handlers are pushed to the top of the stack. If you pass a >0 priority when subscribing to the key event, + * then the handler will get pushed further down the stack. This means that priority of 0 is higher than priority 1. + * + * - When a key event occurs, we trigger callbacks for that key starting from the top of the stack. + * By default, events do not bubble, and only the handler at the top of the stack will be executed. + * Individual callbacks can be configured with the shouldBubble parameter, to allow the next event handler on the stack execute. + * + * - Each handler has a unique callbackID, so calling the `unsubscribe` function (returned from `subscribe`) will unsubscribe the expected handler, + * regardless of its position in the stack. */ const KeyboardShortcut = { subscribe,
7
diff --git a/app/components/Summary/index.js b/app/components/Summary/index.js @@ -19,6 +19,8 @@ import { createStructuredSelector } from 'reselect'; import { makeSelectActiveNetwork, makeSelectAccount } from 'containers/NetworkClient/selectors'; import AccountCircle from '@material-ui/icons/AccountCircle'; +import Announcement from '@material-ui/icons/Announcement'; +import Warning from "components/Typography/Warning.jsx"; // core components import GridContainer from 'components/Grid/GridContainer'; import GridItem from 'components/Grid/GridItem'; @@ -49,6 +51,10 @@ function Summary(props) { </h5> </CardHeader> <CardBody> + <Warning> + <h6>Having connectivity issues or Scatter not appearing when transacting?</h6> + <h5><Announcement/>Please ensure you have updated to the latest Scatter Desktop</h5> + </Warning> <ResourceTable account={account} /> </CardBody> </Card>
0
diff --git a/src/content/en/fundamentals/performance/user-centric-performance-metrics.md b/src/content/en/fundamentals/performance/user-centric-performance-metrics.md @@ -2,7 +2,7 @@ project_path: /web/fundamentals/_project.yaml book_path: /web/fundamentals/_book.yaml description: User-centric Performance Metrics -{# wf_updated_on: 2018-02-02 #} +{# wf_updated_on: 2018-02-06 #} {# wf_published_on: 2017-06-01 #} {# wf_tags: performance #} {# wf_blink_components: Blink>PerformanceAPIs #} @@ -470,7 +470,7 @@ The attribution property will tell you what frame context was responsible for the long task, which is helpful in determining if third party iframe scripts are causing issues. Future versions of the spec are planning to add more granularity and expose script URL, line, and column number, which will be very helpful in -determine if your own scripts are causing slowness. +determining if your own scripts are causing slowness. ### Tracking input latency @@ -599,8 +599,8 @@ If you're tracking goal completions or ecommerce conversions in analytics, you could create reports that explore any correlations between these and the app's performance metrics. For example: -* Do users with faster interactive times buy more stuff? Do users who experience -* more long tasks during the checkout flow drop off at higher rates? +* Do users with faster interactive times buy more stuff? +* Do users who experience more long tasks during the checkout flow drop off at higher rates? If correlations are found, it'll be substantially easier to make the business case that performance is important and should be prioritized.
1
diff --git a/server/preprocessing/other-scripts/summarize.R b/server/preprocessing/other-scripts/summarize.R @@ -36,12 +36,11 @@ create_cluster_labels <- function(clusters, metadata, lang, weightingspec, top_n, stops, taxonomy_separator="/") { nn_corpus <- get_cluster_corpus(clusters, metadata, stops, taxonomy_separator) - tolower_flag <- if (lang == "ger") FALSE else TRUE nn_tfidf <- TermDocumentMatrix(nn_corpus, control = list( tokenize = SplitTokenizer, weighting = function(x) weightSMART(x, spec="ntn"), bounds = list(local = c(2, Inf)), - tolower = tolower_flag + tolower = TRUE )) tfidf_top <- apply(nn_tfidf, 2, function(x) {x2 <- sort(x, TRUE);x2[x2>0]}) empty_tfidf <- which(apply(nn_tfidf, 2, sum)==0)
2
diff --git a/src/screens/transfer/screen/delegateScreen.js b/src/screens/transfer/screen/delegateScreen.js @@ -4,7 +4,6 @@ import { WebView } from 'react-native-webview'; import { injectIntl } from 'react-intl'; import Slider from '@esteemapp/react-native-slider'; import get from 'lodash/get'; -import ActionSheet from 'react-native-actionsheet'; // Constants import AUTH_TYPE from '../../../constants/authType'; @@ -28,6 +27,7 @@ import { vestsToHp } from '../../../utils/conversions'; // Styles import styles from './transferStyles'; +import { OptionsModal } from '../../../components/atoms'; class DelegateScreen extends Component { constructor(props) { @@ -222,7 +222,7 @@ class DelegateScreen extends Component { </MainButton> </View> </View> - <ActionSheet + <OptionsModal ref={this.startActionSheet} options={[ intl.formatMessage({ id: 'alert.confirm' }),
14
diff --git a/src/components/Map.jsx b/src/components/Map.jsx @@ -18,13 +18,11 @@ const maps = Object.fromEntries(rawMapData.map((mapData) => { function Map() { let {currentMap} = useParams(); - console.log(currentMap); - return <img alt = {`Map of ${maps[currentMap].displayText}`} className = "map-image" title = {`Map of ${maps[currentMap].displayText}`} - src = {`${process.env.PUBLIC_URL}${maps[currentMap].image}`} + src = {`${maps[currentMap].image}`} /> }
4
diff --git a/Apps/Sandcastle/gallery/Particle System Weather.html b/Apps/Sandcastle/gallery/Particle System Weather.html snowParticleSize * 2.0, snowParticleSize * 2.0 ); - const snowUpdate = function (particle, dt) { let snowGravityScratch = new Cesium.Cartesian3(); + const snowUpdate = function (particle, dt) { snowGravityScratch = Cesium.Cartesian3.normalize( particle.position, snowGravityScratch if (distance > snowRadius) { particle.endColor.alpha = 0.0; } else { - particle.endColor.alpha = - 1.0 / - (distance / snowRadius + 0.1); + particle.endColor.alpha = 1.0 / (distance / snowRadius + 0.1); } };
3
diff --git a/new-client/src/plugins/DocumentHandler/panelMenu/PanelList.js b/new-client/src/plugins/DocumentHandler/panelMenu/PanelList.js @@ -54,7 +54,7 @@ class PanelList extends React.PureComponent { <List style={{ position: "static" }} disablePadding - id="panelmenu" + id={`panellist_${level}`} role="navigation" component="nav" >
12
diff --git a/app/components/layout/Navigation/MyBuilds/index.js b/app/components/layout/Navigation/MyBuilds/index.js @@ -2,6 +2,7 @@ import React from 'react'; import Relay from 'react-relay'; import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; import classNames from 'classnames'; +import { hour } from 'metrick/duration'; import PusherStore from '../../../../stores/PusherStore'; import Button from '../../../shared/Button'; @@ -160,7 +161,7 @@ class BuildsDropdown extends React.Component { export default Relay.createContainer( CachedStateWrapper( BuildsDropdown, - { validLength: 60 * 60 * 1000 /* 1 hour */ } + { validLength: 1::hour } ), { initialVariables: {
14
diff --git a/blots/scroll.js b/blots/scroll.js @@ -166,7 +166,7 @@ class Scroll extends ScrollBlot { } mutations = mutations.filter(({ target }) => { const blot = this.find(target, true); - return blot && blot.scroll === this; + return blot && blot.scroll === this && !blot.updateContent; }); if (mutations.length > 0) { this.emitter.emit(Emitter.events.SCROLL_BEFORE_UPDATE, source, mutations);
8
diff --git a/jobs/starlink.js b/jobs/starlink.js @@ -2,7 +2,7 @@ const got = require('got'); const { CookieJar } = require('tough-cookie'); const Moment = require('moment-timezone'); const MomentRange = require('moment-range'); -const { getSatelliteInfo } = require('tle.js/dist/tlejs.cjs'); +const { getSatelliteInfo } = require('tle.js'); const { logger } = require('../middleware/logger'); const API = process.env.SPACEX_API;
1
diff --git a/generators/server/templates/entity/src/main/java/package/service/mapper/EntityMapper.java.ejs b/generators/server/templates/entity/src/main/java/package/service/mapper/EntityMapper.java.ejs @@ -109,9 +109,17 @@ public interface <%= entityClass %>Mapper extends EntityMapper<<%= dtoClass %>, @Mapping(target = "<%= field.propertyName %>", source = "<%= field.propertyName %>") <%_ } _%> <%_ if (!relatedField.id) { _%> + <%_ if (relatedField.mapstructExpression) { _%> + @Mapping(target = "<%= relatedField.propertyName %>", expression = "<%- relatedField.mapstructExpression %>") + <%_ } else { _%> @Mapping(target = "<%= relatedField.propertyName %>", source = "<%= relatedField.propertyName %>") <%_ } _%> + <%_ } _%> + <%_ if (relatedField.mapstructExpression) { _%> + <%- otherEntity.dtoClass %> toDto<%= this._.upperFirst(mapperName) %>(<%- otherEntity.persistClass %> s); + <%_ } else { _%> <%- otherEntity.dtoClass %> toDto<%= this._.upperFirst(mapperName) %>(<%- otherEntity.persistClass %> <%= otherEntity.persistInstance %>); + <%_ } _%> <%_ if (collection) { %> <%_ const collectionMapperName = otherEntity.entityInstance + this._.upperFirst(relatedField.propertyName) + 'Set'; _%>
11
diff --git a/lib/console_web/controllers/router/device_controller.ex b/lib/console_web/controllers/router/device_controller.ex @@ -109,6 +109,11 @@ defmodule ConsoleWeb.Router.DeviceController do multi_buy_value: 1, preferred_hotspots: preferred_hotspots_addresses } + true -> + %{ + multi_buy_value: 1, + preferred_hotspots: [] + } end end _ -> @@ -127,6 +132,11 @@ defmodule ConsoleWeb.Router.DeviceController do multi_buy_value: 1, preferred_hotspots: preferred_hotspots_addresses } + true -> + %{ + multi_buy_value: 1, + preferred_hotspots: [] + } end end
9
diff --git a/Gruntfile.js b/Gruntfile.js @@ -42,7 +42,7 @@ module.exports = function (grunt) { grunt.registerTask("test-node", "Run all the node tests in the tests directory", - ["clean", "exec:generateConfig", "exec:generateNodeIndex", "exec:generateConfig", "exec:nodeTests"]); + ["clean", "exec:generateConfig", "exec:generateNodeIndex", "exec:nodeTests"]); grunt.registerTask("docs", "Compiles documentation in the /docs directory.",
2
diff --git a/stubs/simpleConfig.stub.js b/stubs/simpleConfig.stub.js module.exports = { - theme: { - // Some useful comment - }, - variants: { - // Some useful comment - }, - plugins: [ - // Some useful comment - ] + theme: {}, + variants: {}, + plugins: [] }
2
diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx @@ -246,7 +246,6 @@ export default class Footer extends Component { onClick={this.layoutBtnClickhandler.bind(this, 1)} id="layoutBtn1" class="mode-btn hide-on-mobile" - style="display: none" aria-label="Switch to layout with preview on right" > <svg viewBox="0 0 100 100" style="transform:rotate(-90deg)"> @@ -257,7 +256,6 @@ export default class Footer extends Component { onClick={this.layoutBtnClickhandler.bind(this, 2)} id="layoutBtn2" class="mode-btn hide-on-mobile" - style="display: none" aria-label="Switch to layout with preview on bottom" > <svg viewBox="0 0 100 100"> @@ -268,7 +266,6 @@ export default class Footer extends Component { onClick={this.layoutBtnClickhandler.bind(this, 3)} id="layoutBtn3" class="mode-btn hide-on-mobile" - style="display: none" aria-label="Switch to layout with preview on left" > <svg viewBox="0 0 100 100" style="transform:rotate(90deg)">
11
diff --git a/.travis.yml b/.travis.yml @@ -36,7 +36,7 @@ deploy: skip_cleanup: true email: "[email protected]" api_key: - secure: "Z3FK6bm4RfQEIRXZ1lBNzQkVIoHpivThr9U+XBHmsBgIfdrK/XUnzs/slugo+NIz8nPiGmMx4gxyJonBCLHDGb1ysky2aEWTl26c0teaF4DeQEjWC1ZaGzv8MV1/GkUamnr1qouXjyUhyEAp33rd8ccN9Rq3QNYB/qLDcA9/FCme7JCW6sCd4zWO0LGEYMJEMc2FzAUkqhqsI05hegGhSDgKXRn5PmLARek4yHD+Hx7pstaTeQIy0WoGJjdzoB3iJIMmo/hWZGzZafktUOh223c5qzx4zMpDRNmMngBUw6R94nKd4KvplYRgB87Y3L/aiVU4CF+axwLmK8RPaC1wbJnlHf06zxHPdiFmsY/zKPpNel+nOnxzRrF5l2KMU4TU6gug3s9Jnzp9T5UMfhp0jW3YkxHGeuOPOeE1i0lTUWUGWrPHLQquAhLfkr2zxaU4ETk/y85hq9W4LAy0ENEDVXX2jP7FnI4Z1fdpmljpmVNJR+outPg6t+Coqgvil7v7XpMtDm8lKQanVYuxwmkb/ncOWFRWuM2j5zIEg3CHnFDcJ9bYrfKRg0b0tb/2BWD14pQnV76goVwzJQYVzdPc8TKIYJw2BZ1Nh9c0iruQVebe/6l1FX9fDCkz8VMmltni61/LxZrf8y0NT1YaU1raeNY2dH5UWvEa9p72FPMI6Eg=" + secure: "UnDQL3Kh+GK2toL0TK3FObO0ujVssU3Eg4BBuYdjwLB81GhiGE5/DTh7THdZPOpbLo6wQeOwfZDuMeKC1OU+0Uf4NsdYFu1aq6xMO20qBQ4qUfgsyiK4Qgywj9gk0p1+OFZdGAZ/j1CNRAaF71XQIY6iV84c+SO4WoizXYrNT0Jh4sr2DA4/97G2xmJtPi0qOzYrJ09R56ZUozmqeik5G0pMRIuJRbpjS/7bZXV+N7WV0ombZc9RkUaetbabEVOLQ+Xx5YAIVq+VuEeMe9VBSnxY/FfCLmy1wJsjGzpLCyBI9nbrG4nw8Wgc2m8NfK9rcpIvBTGner9r2j60NVDkZ8kLZPrqXhq6AZMwa+oz6K5UQCqRo2RRQzSGwXxg67HY5Tcq+oNmjd+DqpPg4LZ3eGlluyP5XfG+hpSr9Ya4d8q8SrUWLxkoLHI6ZKMtoKFbTCSSQPiluW5hsZxjz3yDkkjsJw64M/EM8UyJrgaXqDklQu+7rBGKLfsK6os7RDiqjBWpQ7gwpo8HvY0O8yqEAabPz+QGkanpjcCOZCXFbSkzWxYy37RMAPu88iINVZVlZE4l+WJenCpZY95ueyy0mG9cyMSzVRPyX6A+/n4H6VMFPFjpGDLTD588ACEjY1lmHfS/eXwXJcgqPPD2gW0XdRdUheU/ssqlfCfGWQMTDXs=" on: tags: true branch: master
3
diff --git a/lib/plugins/aws/package/compile/events/apiGateway/lib/usagePlan.js b/lib/plugins/aws/package/compile/events/apiGateway/lib/usagePlan.js @@ -5,7 +5,7 @@ const BbPromise = require('bluebird'); module.exports = { compileUsagePlan() { - if (this.serverless.service.provider.apiKeys) { + if (this.serverless.service.provider.usagePlan || this.serverless.service.provider.apiKeys) { this.apiGatewayUsagePlanLogicalId = this.provider.naming.getUsagePlanLogicalId(); _.merge(this.serverless.service.provider.compiledCloudFormationTemplate.Resources, { [this.apiGatewayUsagePlanLogicalId]: {
11
diff --git a/generation/package.json b/generation/package.json "author": "DanielMSchmidt <[email protected]>", "license": "MIT", "lint-staged": { - "*.{js,json,css,md}": ["prettier --write", "git add"] + "*.{js,json,css,md}": [ + "prettier --write", + "git add" + ] }, "devDependencies": { "babel-generator": "^6.25.0", "babel-types": "^6.25.0", "download-file-sync": "^1.0.4", - "husky": "^0.14.3", "jest": "^20.0.4", "lerna": "2.0.0-rc.4", "lint-staged": "^6.0.0", "remove": "^0.1.5" }, "jest": { - "coveragePathIgnorePatterns": ["<rootDir>/index.js"], + "coveragePathIgnorePatterns": [ + "<rootDir>/index.js" + ], "resetMocks": true, "resetModules": true, "coverageThreshold": {
2
diff --git a/src/components/topic/summary/TopicStoryStatsContainer.js b/src/components/topic/summary/TopicStoryStatsContainer.js @@ -59,7 +59,12 @@ TopicStoryStatsContainer.propTypes = { }; const mapStateToProps = state => ({ - fetchStatus: state.topics.selected.summary.geocodedStoryTotals.fetchStatus, // TODO: respect all the statuses + fetchStatus: [ + state.topics.selected.summary.geocodedStoryTotals.fetchStatus, + state.topics.selected.summary.englishStoryTotals.fetchStatus, + state.topics.selected.summary.undateableStoryTotals.fetchStatus, + state.topics.selected.summary.themedStoryTotals.fetchStatus, + ], geocodedCounts: state.topics.selected.summary.geocodedStoryTotals.counts, englishCounts: state.topics.selected.summary.englishStoryTotals.counts, undateableCount: state.topics.selected.summary.undateableStoryTotals.counts,
4
diff --git a/assets/js/modules/analytics/datastore/properties.test.js b/assets/js/modules/analytics/datastore/properties.test.js @@ -29,9 +29,6 @@ import { } from 'tests/js/utils'; import * as fixtures from './__fixtures__'; import { MODULES_ANALYTICS_4 } from '../../analytics-4/datastore/constants'; -import * as modulesAnalytics from '../'; - -import { createRegistry } from '@wordpress/data'; describe( 'modules/analytics properties', () => { let registry; @@ -310,45 +307,6 @@ describe( 'modules/analytics properties', () => { expect( properties[ 2 ].name ).toBe( 'troubled-tipped.example.com' ); expect( properties[ 3 ].displayName ).toBe( 'www.elasticpress.io' ); } ); - - it( 'returns only ua properties when ga4 datastore not available ', async () => { - // only register this module - const newRegistry = createRegistry(); - - [ - modulesAnalytics, - ].forEach( ( { registerStore } ) => registerStore?.( newRegistry ) ); - - registry = newRegistry; - // Receive empty settings to prevent unexpected fetch by resolver. - registry.dispatch( STORE_NAME ).receiveGetSettings( {} ); - - const testAccountID = fixtures.profiles[ 0 ].accountId; // eslint-disable-line sitekit/acronym-case - const accountID = testAccountID; - - registry.dispatch( STORE_NAME ).receiveGetProperties( - [ - { - // eslint-disable-next-line sitekit/acronym-case - accountId: '151753095', - id: 'UA-151753095-1', - name: 'rwh', - }, - { - // eslint-disable-next-line sitekit/acronym-case - accountId: '151753095', - id: 'UA-151753095-1', - name: 'troubled-tipped.example.com', - }, - - ], - { accountID } - ); - - const properties = registry.select( STORE_NAME ).getPropertiesIncludingGA4( testAccountID ); - - expect( properties ).toHaveLength( 2 ); - } ); } ); describe( 'getPropertyByID', () => {
2
diff --git a/assets/js/modules/thank-with-google/components/setup/index.js b/assets/js/modules/thank-with-google/components/setup/index.js * limitations under the License. */ -export { default as SetupForm } from './SetupForm'; export { default as SetupMain } from './SetupMain'; export { default as SetupCreatePublication } from './SetupCreatePublication'; export { default as SetupCustomize } from './SetupCustomize';
2
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,38 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master where X.Y.Z is the semver of most recent plotly.js release. +## [1.46.0] -- 2019-04-01 + +### Added +- New `waterfall` trace type [#3531, #3708] +- New `sunburst` trace type [#3594] +- Add attributes `node.x` and `node.y` to `sankey` traces [#3583] +- Implement `connectgaps` on `surface` traces [#3638] +- Implement `hovertemplate` for `box` and `violin` points [#3685] + +### Changed +- Display hover labels above modebar, ensuring that the hover labels + are always visible within the graph div [#3589, #3678] + +### Fixed +- Fix horizontal legend item wrapping by pushing overflowed items to newline [#3628] +- Fix erroneous gap for histogram under relative `barmode` [#3652] +- Fix position of overlapping grouped bars within trace [#3680] +- Fix `violin` `bandwidth` logic for traces with identical values in sample [#3626] +- Fix `violin` trace `scalegroup` description [#3687] +- Fix stacked scatter for groupby traces [#3692] +- Fix outside text on empty items in `bar` traces under `textposition: 'outside'` [#3701] +- Fix `pie` un-hover event emission after updates [#3662, 3690] +- Fix `scatter` line decimation algo for filled trace with far-away data points [#3696] +- Fix `heatmap` and `contour` computation for traces with category coordinates containing `0` [#3691] +- Fix zoom interactions on gl3d subplots using an orthographic projection [#3601] +- Fix miscellaneous gl3d camera on-initialization bugs [#3585] +- Fix `surface` contour line rendering in some Firefox versions [#3670] +- Fix rendering of marker points and gl3d subplots on date axes (or with coordinates close to 64K floating limits) + for WebGL-based traces on some iOS devices [#3666, #3672, #3674, #3676] +- Fix center-aligned hover labels positioning [#3681] + + ## [1.45.3] -- 2019-03-19 ### Fixed
3
diff --git a/README.md b/README.md SqueakJS: A Squeak VM for the Web and Node.js ============================================= -SqueakJS is an HTML5 runtime engine for [Squeak][squeak]</a> Smalltalk written in pure JavaScript by Bert Freudenberg. +SqueakJS is an HTML5 runtime engine for [Squeak][squeak]</a> Smalltalk written in pure JavaScript by Vanessa Freudenberg. The interpreter core is divided in a number of "vm.\*.js" modules, internal plugins in "vm.plugins.\*.js" modules and external plugins in the "plugins" directory. The Just-in-Time compiler is optional ("jit.js") and can be easily replaced with your own. There are a number of interfaces: @@ -79,7 +79,7 @@ Contributions are very welcome! Things to work on ----------------- -SqueakJS is intended to run any Squeak image. It can already load anything from the original 1996 Squeak release to the latest 2016 release. But various pieces (primitives in various plugins) are still missing, in particular media support (MIDI, 3D graphics). Also, it would be nice to make it work on as many browsers as possible, especially on mobile touch devices. +SqueakJS is intended to run any Squeak image. It can already load any 32-bit image from the original 1996 Squeak release to the latest Cog-Spur release. But various pieces (primitives in various plugins) are still missing, in particular media support (MIDI, 3D graphics). Also, we should add support for loading 64-bit Spur images (converting to 32 bits on load), and execute SISTA byecode. And, it would be nice to make it work on as many browsers as possible, especially on mobile touch devices. As for optimizing I think the way to go is an optimizing JIT compiler. The current JIT is very simple and does not optimize at all. Since we can't access or manipulate the JavaScript stack, we might want that compiler to inline as much as possible, but keep the call sequence flat so we can return to the browser at any time. Even better (but potentially more complicated) is actually using the JavaScript stack, just like Eliot's Stack VM uses the C stack. To make BitBlt fast, we could probably use WebGL. @@ -89,24 +89,25 @@ Better Networking would be interesting, too. The SocketPlugin currently does all There's a gazillion exciting things to do :) - -- Bert Freudenberg + -- Vanessa Freudenberg [squeak]: http://squeak.org/ - [repo]: https://github.com/bertfreudenberg/SqueakJS + [repo]: https://github.com/codefrau/SqueakJS [vm-dev]: http://lists.squeakfoundation.org/mailman/listinfo/vm-dev - [homepage]: http://bertfreudenberg.github.io/SqueakJS/ - [run]: http://bertfreudenberg.github.io/SqueakJS/run/ - [mini]: http://bertfreudenberg.github.io/SqueakJS/demo/simple.html - [etoys]: http://bertfreudenberg.github.io/SqueakJS/etoys/ - [scratch]: http://bertfreudenberg.github.io/SqueakJS/scratch/ - [ws]: http://bertfreudenberg.github.io/SqueakJS/ws/ - [dist]: http://bertfreudenberg.github.io/SqueakJS/dist/ - [zip]: https://github.com/bertfreudenberg/SqueakJS/archive/master.zip + [homepage]: http://squeak.js.org/ + [run]: http://squeak.js.org/run/ + [mini]: http://squeak.js.org/demo/simple.html + [etoys]: http://squeak.js.org/etoys/ + [scratch]: http://squeak.js.org/scratch/ + [ws]: http://squeak.js.org/ws/ + [dist]: http://squeak.js.org/dist/ + [zip]: https://github.com/codefrau/SqueakJS/archive/master.zip [pullreq]: https://help.github.com/articles/using-pull-requests Changelog --------- + 2020-04-08: renamed github account to "codefrau" 2020-01-26: 0.9.8 split into modules (ErikOnBike), fixes 2019-01-03: 0.9.7 minor fixes 2018-03-13: 0.9.6 minor fixes
10
diff --git a/generators/server/templates/src/test/java/package/web/rest/UserResourceIT.java.ejs b/generators/server/templates/src/test/java/package/web/rest/UserResourceIT.java.ejs @@ -534,7 +534,6 @@ class UserResourceIT <% if (databaseTypeCassandra) { %>extends AbstractCassandra <%_ } _%> <%_ } _%> } -<%_ } _%> @Test <%_ if (databaseTypeSql && !reactive) { _%>
2
diff --git a/src/botPage/bot/TradeEngine/Proposal.js b/src/botPage/bot/TradeEngine/Proposal.js @@ -29,6 +29,10 @@ export default Engine => proposal.contractType === contractType && proposal.purchaseReference === this.getPurchaseReference() ) { + // Below happens when a user has had one of the proposals return + // with a ContractBuyValidationError. We allow the logic to continue + // to here cause the opposite proposal may still be valid. Only once + // they attempt to purchase the errored proposal we will intervene. if (proposal.error) { const { error } = proposal.error.error; const { code, message } = error; @@ -64,7 +68,23 @@ export default Engine => requestProposals() { Promise.all( this.proposalTemplates.map(proposal => - doUntilDone(() => this.api.subscribeToPriceForContractProposal(proposal)) + doUntilDone(() => + this.api.subscribeToPriceForContractProposal(proposal).catch(error => { + // We intercept ContractBuyValidationError as user may have specified + // e.g. a DIGITUNDER 0 or DIGITOVER 9, while one proposal may be invalid + // the other is valid. We will error on Purchase rather than here. + if (error && error.name === 'ContractBuyValidationError') { + this.data.proposals.push({ + ...error.error.echo_req, + ...error.error.echo_req.passthrough, + error, + }); + return null; + } + + throw error; + }) + ) ) ).catch(e => this.$scope.observer.emit('Error', e)); }
9
diff --git a/types/index.d.ts b/types/index.d.ts @@ -258,7 +258,9 @@ export interface Column<RowData extends object> { validate?: ( rowData: RowData ) => { isValid: boolean; helperText?: string } | string | boolean; - render?: (data: RowData, type: 'row' | 'group') => React.ReactNode; + render?: + | ((data: RowData, type: 'row') => React.ReactNode) // The normal render of the table cell + | ((data: string, type: 'group') => React.ReactNode); // The render for the group wording // A function to be called for each column during the csv export to manipulate the exported data exportTransformer?: (row: RowData) => unknown; searchable?: boolean;
7
diff --git a/devices/cleode.js b/devices/cleode.js const exposes = require('../lib/exposes'); -const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee}; -const tz = require('../converters/toZigbee'); const reporting = require('../lib/reporting'); const e = exposes.presets; +const extend = require('../lib/extend'); module.exports = [ { @@ -10,8 +9,7 @@ module.exports = [ model: 'ZPLUG_Boost', vendor: 'CLEODE', description: 'ZPlug boost', - fromZigbee: [fz.on_off], - toZigbee: [tz.on_off], + extend: extend.switch(), exposes: [e.switch(), e.power()], configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1);
7
diff --git a/packages/node_modules/@node-red/nodes/locales/de/storage/10-file.html b/packages/node_modules/@node-red/nodes/locales/de/storage/10-file.html aber typischerweise 64k (Linux/Mac) oder 41k (Windows).</p> <p>Bei Aufteilung in mehrere Nachrichten besitzt jede eine <code>parts</code>-Eigenschaft, welche eine komplette Nachrichten-Sequenz bildet.</p> - <p>Fehler sollten mittels <span style="background-color:Gainsboro">catch</span>-Nodes abgefangen und behandelt werden.</p> + <p>Fehler sollten mittels catch-Nodes abgefangen und behandelt werden.</p> </script>
2
diff --git a/test/integration/builder/selects.js b/test/integration/builder/selects.js @@ -1255,6 +1255,9 @@ module.exports = function(knex) { } const rowName = 'row for skipLocked() test #1'; + await knex('test_default_table') + .delete() + .where({ string: rowName }); await knex('test_default_table').insert([ { string: rowName, tinyint: 1 }, { string: rowName, tinyint: 2 }, @@ -1265,10 +1268,10 @@ module.exports = function(knex) { await trx('test_default_table') .where({ string: rowName }) .orderBy('tinyint', 'asc') - .first() - .forUpdate(); + .forUpdate() + .first(); - // try to lock the next available row + // try to lock the next available row from outside of the transaction return await knex('test_default_table') .where({ string: rowName }) .orderBy('tinyint', 'asc') @@ -1290,6 +1293,9 @@ module.exports = function(knex) { } const rowName = 'row for skipLocked() test #2'; + await knex('test_default_table') + .delete() + .where({ string: rowName }); await knex('test_default_table').insert([ { string: rowName, tinyint: 1 }, { string: rowName, tinyint: 2 }, @@ -1301,18 +1307,18 @@ module.exports = function(knex) { .where({ string: rowName }) .forUpdate(); - // try to aquire the lock on one more row (which isn't available) + // try to aquire the lock on one more row (which isn't available) from another transaction return await knex('test_default_table') .where({ string: rowName }) .forUpdate() .skipLocked() - .limit(1); + .first(); }); - expect(res).to.be.empty; + expect(res).to.be.undefined; }); - it('forUpdate().noWait() should throw immediately when a row is locked', async function() { + it('forUpdate().noWait() should throw an error immediately when a row is locked', async function() { if ( knex.client.driverName !== 'pg' && knex.client.driverName !== 'mysql' @@ -1321,22 +1327,26 @@ module.exports = function(knex) { } const rowName = 'row for noWait() test'; + await knex('test_default_table') + .delete() + .where({ string: rowName }); await knex('test_default_table').insert([ { string: rowName, tinyint: 1 }, { string: rowName, tinyint: 2 }, ]); - const promise = knex.transaction(async (trx) => { - // select and lock only the first row from this test + try { + await knex.transaction(async (trx) => { + // select and lock the first row from this test // note: MySQL may lock both rows depending on how the results are fetched await trx('test_default_table') .where({ string: rowName }) .orderBy('tinyint', 'asc') - .first() - .forUpdate(); + .forUpdate() + .first(); - // try to lock it again (and fail) - await trx('test_default_table') + // try to lock it again (it should fail here) + await knex('test_default_table') .where({ string: rowName }) .orderBy('tinyint', 'asc') .forUpdate() @@ -1344,8 +1354,12 @@ module.exports = function(knex) { .first(); }); - // catch the expected errors - promise.catch((err) => { + // fail the test if the query finishes with no errors + throw new Error( + 'The query should have been cancelled when trying to select a locked row with .noWait()' + ); + } catch (err) { + // check if we got the correct error from each db switch (knex.client.driverName) { case 'pg': expect(err.message).to.contain('could not obtain lock on row'); @@ -1364,14 +1378,7 @@ module.exports = function(knex) { // unsupported database throw err; } - }); - - // fail the test if the transaction succeeds - promise.then(() => { - expect( - 'The query should have been cancelled when trying to select a locked row with .noWait()' - ).to.be.false; - }); + } }); }); };
1
diff --git a/etc/src/appcfg.js b/etc/src/appcfg.js @@ -7,12 +7,13 @@ const fs = require('fs'); const path = require('path'); // Return the value of an element -const element = (content, elements) => { +const element = (content, elements, cfgFile) => { let result = content; for(let element of elements) { result = result[element]; if (result === undefined) { - console.error('Element', element, 'not found in path', elements.join('.')); + console.error('Element %s not found in path %s for manifest %s', + element, elements.join('.'), cfgFile); process.exit(1); } } @@ -46,7 +47,7 @@ const runCLI = () => { } const appConfig = config.applications[0]; - console.log(element(appConfig, elements)); + console.log(element(appConfig, elements, cfgFile)); }); };
7
diff --git a/apps.json b/apps.json "version": "0.01", "description": "Emojis & Espruino: broadcast Unicode emojis via Bluetooth Low Energy.", "icon": "emojuino.png", + "type": "app", "tags": "emoji", "supports" : [ "BANGLEJS2" ], + "allow_emulator": true, "readme": "README.md", "storage": [ { "name": "emojuino.app.js", "url": "emojuino.js" },
11
diff --git a/packages/vulcan-forms/lib/FormWrapper.jsx b/packages/vulcan-forms/lib/FormWrapper.jsx @@ -54,15 +54,19 @@ class FormWrapper extends PureComponent { const schema = this.getSchema(); const fields = this.props.fields; + const viewableFields = _.filter(_.keys(schema), fieldName => !!schema[fieldName].viewableBy); const insertableFields = _.filter(_.keys(schema), fieldName => !!schema[fieldName].insertableBy); const editableFields = _.filter(_.keys(schema), fieldName => !!schema[fieldName].editableBy); // get all editable/insertable fields (depending on current form type) - let relevantFields = this.getFormType() === 'new' ? insertableFields : editableFields; + let queryFields = this.getFormType() === 'new' ? insertableFields : editableFields; + // for the mutations's return value, also get non-editable but viewable fields (such as createdAt, userId, etc.) + let mutationFields = this.getFormType() === 'new' ? _.unique(insertableFields.concat(viewableFields)) : _.unique(insertableFields.concat(editableFields)); // if "fields" prop is specified, restrict list of fields to it if (typeof fields !== "undefined" && fields.length > 0) { - relevantFields = _.intersection(relevantFields, fields); + queryFields = _.intersection(queryFields, fields); + mutationFields = _.intersection(mutationFields, fields); } // resolve any array field with resolveAs as fieldName{_id} @@ -72,26 +76,35 @@ class FormWrapper extends PureComponent { - array field with no resolver -> fieldName - array field with a resolver -> fieldName{_id} */ - relevantFields = relevantFields.map(fieldName => { + const mapFieldNameToField = fieldName => { const field = this.getSchema()[fieldName] return field.resolveAs && field.type.definitions[0].type === Array ? `${fieldName}{_id}` // if it's a custom resolver, add a basic query to its _id : fieldName; // else just ask for the field name - }); + } + queryFields = queryFields.map(mapFieldNameToField); + mutationFields = mutationFields.map(mapFieldNameToField); - // generate fragment based on the fields that can be edited. Note: always add _id. - const generatedFragment = gql` + // generate query fragment based on the fields that can be edited. Note: always add _id. + const generatedQueryFragment = gql` + fragment ${fragmentName} on ${this.props.collection.typeName} { + _id + ${queryFields.join('\n')} + } + ` + // generate mutation fragment based on the fields that can be edited and/or viewed. Note: always add _id. + const generatedMutationFragment = gql` fragment ${fragmentName} on ${this.props.collection.typeName} { _id - ${relevantFields.join('\n')} + ${mutationFields.join('\n')} } ` // get query & mutation fragments from props or else default to same as generatedFragment // note: mutationFragment should probably always be specified in props return { - queryFragment: this.props.queryFragment || generatedFragment, - mutationFragment: this.props.mutationFragment || generatedFragment, + queryFragment: this.props.queryFragment || generatedQueryFragment, + mutationFragment: this.props.mutationFragment || generatedMutationFragment, }; }
7
diff --git a/UserReviewBanHelper.user.js b/UserReviewBanHelper.user.js // @description Display users' prior review bans in review, Insert review ban button in user review ban history page, Load ban form for user if user ID passed via hash // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 5.5.1 +// @version 5.5.2 // // @include */review/close* // @include */review/reopen* const messageCharLimit = 2000; const defaultBanMessage = `A number of your [recent reviews](https://${location.hostname}/users/current?tab=activity&sort=reviews) were incorrect. We suspect that you are not giving each task adequate attention. Please pay more attention to each review in future.`; - const permaBanMessage = `Due to your [poor review history](https://${location.hostname}/users/current?tab=activity&sort=reviews) as well as no signs of improvement after many review bans, you won't be able to use any of the review queues on the site any longer.`; + const permaBanMessage = `Due to your [poor review history](https://${location.hostname}/users/current?tab=activity&sort=reviews) as well as no signs of improvement after many review suspensions, you won't be able to use any of the review queues on the site any longer.`; // Use {POSTLINK} and {QUEUENAME} placeholders const cannedMessages = {
10
diff --git a/src/configuration/default-values.js b/src/configuration/default-values.js @@ -24,7 +24,8 @@ export const DEFAULT_TYPESCRIPT_COMPILER_OPTIONS = { noImplicitAny: false, module: 1 /* ts.ModuleKind.CommonJS */, target: 2 /* ES6 */, - suppressOutputPathCheck: true + suppressOutputPathCheck: true, + skipLibCheck: true }; export const TYPESCRIPT_COMPILER_NON_OVERRIDABLE_OPTIONS = ['module', 'target'];
7
diff --git a/src/pages/settings/Profile/ProfilePage.js b/src/pages/settings/Profile/ProfilePage.js @@ -239,7 +239,7 @@ class ProfilePage extends Component { inputID="firstName" name="fname" label={this.props.translate('common.firstName')} - defaultValue={currentUserDetails.firstName} + defaultValue={lodashGet(currentUserDetails, 'firstName', '')} placeholder={this.props.translate('profilePage.john')} /> </View> @@ -248,7 +248,7 @@ class ProfilePage extends Component { inputID="lastName" name="lname" label={this.props.translate('common.lastName')} - defaultValue={currentUserDetails.lastName} + defaultValue={lodashGet(currentUserDetails, 'lastName', '')} placeholder={this.props.translate('profilePage.doe')} /> </View>
4
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-masthead/sprk-masthead.stories.ts b/angular/projects/spark-angular/src/lib/components/sprk-masthead/sprk-masthead.stories.ts @@ -95,7 +95,7 @@ export const defaultStory = () => ({ class="sprk-c-Masthead__logo" xmlns="http://www.w3.org/2000/svg" width="365.4" - height="101.35" + height="48" viewBox="0 0 365.4 101.35" > <title>spark-red-full-outlines</title> @@ -327,7 +327,7 @@ export const extended = () => ({ class="sprk-c-Masthead__logo" xmlns="http://www.w3.org/2000/svg" width="365.4" - height="101.35" + height="48" viewBox="0 0 365.4 101.35" > <title>spark-red-full-outlines</title>
3
diff --git a/OurUmbraco.Site/macroScripts/repository-view-project.cshtml b/OurUmbraco.Site/macroScripts/repository-view-project.cshtml var packageRepoService = new PackageRepositoryService(umbracoHelper, umbracoHelper.MembershipHelper, ApplicationContext.Current.DatabaseContext); //This doesn't matter what we set it to so long as it's below 7.5 since that is the version we introduce strict dependencies var currUmbracoVersion = new Version(4, 0, 0); - var packageDetails = packageRepoService.GetDetails(Project.ProjectGuid, currUmbracoVersion); + var packageDetails = packageRepoService.GetDetails(Project.ProjectGuid, currUmbracoVersion, false); if (packageDetails == null) {
1
diff --git a/src/ios/BranchSDK.m b/src/ios/BranchSDK.m - (void)disableTracking:(CDVInvokedUrlCommand*)command { - bool enabled = [[command.arguments objectAtIndex:0] boolValue] == YES; + bool enabled = [[command.arguments objectAtIndex:0] boolValue]; [Branch setTrackingDisabled:enabled]; CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:enabled];
2
diff --git a/docs/developer-guide/using-lighting.md b/docs/developer-guide/using-lighting.md @@ -4,6 +4,13 @@ A deck.gl lighting effect is a visual approximation of environment illumination To enable lighting in deck.gl, it is required that both the lighting effect and material instances are properly instantiated. +<iframe height="450" style="width: 100%;" scrolling="no" title="deck.gl LightingEffect Demo" src="https://codepen.io/vis-gl/embed/ZZwrZz/?height=450&theme-id=light&default-tab=result" frameborder="no" allowtransparency="true" allowfullscreen="true"> + See the Pen <a href='https://codepen.io/vis-gl/pen/ZZwrZz/'>deck.gl LightingEffect Demo</a> by vis.gl + (<a href='https://codepen.io/vis-gl'>@vis-gl</a>) on <a href='https://codepen.io'>CodePen</a>. +</iframe> + +*Interactive demo of LightingEffect* + ## Constructing A Lighting Effect Instance A [LightingEffect](/docs/effects/lighting-effect.md) can be instantiated with a `lights` object:
0
diff --git a/src/index.md b/src/index.md @@ -8,6 +8,7 @@ layout: index A web framework for building virtual reality experiences </h1> -<h2 class="intro"> - With HTML and Entity-Component ecosystem. Works on Vive, Rift, desktop, mobile platforms. -</h2> +<div class="intro"> + <p>Make WebVR with HTML and Entity-Component</p> + <p>Works on Vive, Rift, desktop, mobile platforms</p> +</div>
7
diff --git a/bin/nightscout.sh b/bin/nightscout.sh @@ -153,10 +153,10 @@ openaps use ns shell upload treatments.json recently/combined-treatments.json status - ns-status get-status - status - get NS status preflight - NS preflight - temp_targets - Get temp target treatments from Nightscout (last 6 hours) - Last 6 hours will be fetched + temp_targets [expr] - Get temp target treatments from Nightscout + expr is used with date -d, default is -24hours. carb_history [expr] - Get treatments with carbs from Nightscout - Last 6 hours will be fetched + expr is used with date -d, default is -24hours. EOF extra_ns_help } @@ -291,10 +291,12 @@ ns) | openaps use $zone rezone --astimezone --date dateString - ;; temp_targets) - exec ns-get host $NIGHTSCOUT_HOST treatments.json "find[created_at][\$gte]=$(date -d \"6 hours ago\" -Iminutes -u)&find[eventType][\$regexp]=Target" + expr=${1--24hours} + exec ns-get host $NIGHTSCOUT_HOST treatments.json "find[created_at][\$gte]=$(date -d $expr -Iminutes)&find[eventType]=Temporary+Target" ;; carb_history) - exec ns-get host $NIGHTSCOUT_HOST treatments.json "find[created_at][\$gte]=$(date -d \"6 hours ago\" -Iminutes)&find[carbs][\$exists]=true" + expr=${1--24hours} + exec ns-get host $NIGHTSCOUT_HOST treatments.json "find[created_at][\$gte]=$(date -d $expr -Iminutes)&find[carbs][\$exists]=true" ;; *) echo "Unknown request:" $OP
13
diff --git a/package.json b/package.json "eslint-plugin-promise": "^4.0.1", "eslint-plugin-standard": "^4.0.0", "eth-gas-reporter": "0.2.6", - "ganache-cli": "6.7.0", + "ganache-cli": "^6.4.1", "glob": "^7.1.3", "mkdirp": "^0.5.1", "prettier": "^1.14.2",
13
diff --git a/runtime/scripts/part.js b/runtime/scripts/part.js @@ -231,7 +231,6 @@ Part.prototype = /** @lends Numbas.parts.Part.prototype */ { tryGetAttribute(this.settings,this.xml,adaptiveMarkingNode,['penalty','strategy'],['adaptiveMarkingPenalty','variableReplacementStrategy']); var variableReplacementsNode = this.xml.selectSingleNode('adaptivemarking/variablereplacements'); var replacementNodes = variableReplacementsNode.selectNodes('replace'); - this.settings.hasVariableReplacements = replacementNodes.length>0; for(var i=0;i<replacementNodes.length;i++) { var n = replacementNodes[i]; var vr = {} @@ -389,6 +388,7 @@ Part.prototype = /** @lends Numbas.parts.Part.prototype */ { part: part, must_go_first: must_go_first }; + this.settings.hasVariableReplacements = true; this.settings.errorCarriedForwardReplacements.push(vr); }, /** The base marking script for this part.
12
diff --git a/includes/Modules/Subscribe_With_Google.php b/includes/Modules/Subscribe_With_Google.php @@ -62,23 +62,6 @@ final class Subscribe_With_Google extends Module new SinglePost( $is_amp ); } - /** - * Returns all module information data for passing it to JavaScript. - * - * @since 1.0.0 - * - * @return array Module information data. - */ - public function prepare_info_for_js() { - $info = parent::prepare_info_for_js(); - - $info['provides'] = array( - __( 'Generate revenue through your content by adding subscriptions or contributions to your publication', 'google-site-kit' ), - ); - - return $info; - } - /** * Checks whether the module is connected. *
2
diff --git a/assets/src/Header.js b/assets/src/Header.js @@ -13,12 +13,8 @@ export default class Header extends Component { constructor(props) { super(props); this.state = { - menuAnchorElement: null, borrowedBooksCount: 0, }; - - this._handleMenuClick = this._handleMenuClick.bind(this); - this._handleMenuClose = this._handleMenuClose.bind(this); } componentDidMount() { @@ -30,14 +26,6 @@ export default class Header extends Component { }); } - _handleMenuClick(event) { - this.setState({ menuAnchorElement: event.currentTarget }); - } - - _handleMenuClose() { - this.setState({ menuAnchorElement: null }); - } - render() { return ( <AppBar className="header">
2
diff --git a/js/webviews.js b/js/webviews.js @@ -51,6 +51,11 @@ function getViewBounds () { } function captureCurrentTab () { + if (webviews.placeholderRequests.length > 0) { + // capturePage doesn't work while the view is hidden + return + } + ipc.send('getCapture', { id: tabs.getSelected(), width: Math.round(window.innerWidth / 10), @@ -74,6 +79,14 @@ function onPageLoad (e) { var tab = webviews.getTabFromContents(_this) var url = _this.getURL() + // capture a preview image if a new page has been loaded + if (tab === tabs.getSelected() && tabs.get(tab).url !== url) { + setTimeout(function () { + // sometimes the page isn't visible until a short time after the did-finish-load event occurs + captureCurrentTab() + }, 100) + } + // if the page is an error page, the URL is really the value of the "url" query parameter if (url.startsWith(webviews.internalPages.error) || url.startsWith(webviews.internalPages.crash)) { url = new URLSearchParams(new URL(url).search).get('url') @@ -92,15 +105,6 @@ function onPageLoad (e) { } tabBar.rerenderTab(tab) - - // capture a preview image if necessary - - if (tab === tabs.getSelected() && tabs.get(tab).url && tabs.get(tab).url !== 'about:blank' && !tabs.get(tab).previewImage) { - setTimeout(function () { - // sometimes the page isn't visible until a short time after the did-finish-load event occurs - captureCurrentTab() - }, 100) - } }, 0) } @@ -392,10 +396,6 @@ ipc.on('view-ipc', function (e, data) { }) setInterval(function () { - if (webviews.placeholderRequests.length > 0) { - // capturePage doesn't work while the view is hidden - return - } captureCurrentTab() }, 30000)
7
diff --git a/userscript.user.js b/userscript.user.js @@ -31015,6 +31015,11 @@ var $$IMU_EXPORT$$; // https://static.wikia.nocookie.net/klonoa/images/7/7c/Fix_pk_bsc.jpg/revision/latest/scale-to-width-down/350?cb=20090113193248 // https://static.wikia.nocookie.net/klonoa/images/7/7c/Fix_pk_bsc.jpg/revision/latest/?cb=20090113193248 // https://static.wikia.nocookie.net/klonoa/images/7/7c/Fix_pk_bsc.jpg/revision/latest/?format=original + // thanks to Liz on discord: + // https://static.wikia.nocookie.net/b177d35a-d5b0-4dc1-a869-a099e4a9cb1d/scale-to-width/48 + // https://static.wikia.nocookie.net/b177d35a-d5b0-4dc1-a869-a099e4a9cb1d + // https://static.wikia.nocookie.net/322dfe61-5d0b-461c-ad01-216d01c7b0ec/thumbnail/width/400/height/400 + // https://static.wikia.nocookie.net/322dfe61-5d0b-461c-ad01-216d01c7b0ec //return src.replace(/(\/images\/[^/]*\/.*)\/scale-to-width-down\/[0-9]*/, "$1"); obj = { url: src @@ -31024,6 +31029,10 @@ var $$IMU_EXPORT$$; obj.filename = match[1]; } + newsrc = src.replace(/(:\/\/[^/]+\/+[-a-f0-9]{10,})\/+.*$/, "$1"); + if (newsrc !== src) + return newsrc; + newsrc = src.replace(/(\/revision\/[^/?#]+\/*)(?:[?#].*)?$/, "$1?format=original"); if (newsrc !== src) { obj.url = newsrc;
7
diff --git a/src/api/user.js b/src/api/user.js @@ -141,7 +141,7 @@ export default ({ config, db }) => { }) /** - * POST for changing user's password + * POST for changing user's password (old, keep for backward compatibility) */ userApi.post('/changePassword', (req, res) => { const userProxy = _getProxy(req) @@ -150,7 +150,19 @@ export default ({ config, db }) => { }).catch(err => { apiStatus(res, err, 500) }) + }); + + /** + * POST for changing user's password + */ + userApi.post('/change-password', (req, res) => { + const userProxy = _getProxy(req) + userProxy.changePassword({ token: req.query.token, body: req.body }).then((result) => { + apiStatus(res, result, 200) + }).catch(err => { + apiStatus(res, err, 500) }) + }); return userApi }
10
diff --git a/src/containers/Home.js b/src/containers/Home.js @@ -15,7 +15,7 @@ import theme from '../theme' export default () => ( <Provider theme={theme}> <Head><title>Hack Club</title></Head> - <Nav style={{ position: 'absolute', top: 0 }} cloud /> + <Nav style={{ position: 'absolute', top: 0 }} cloud="true" /> <Bubbles /> <Stripe /> <Features />
1
diff --git a/game.js b/game.js @@ -1365,6 +1365,22 @@ const _bindLocalPlayerTeleport = () => { }; _bindLocalPlayerTeleport(); */ +cameraManager.addEventListener('modechange', e => { + const {mode} = e.data; + const firstPerson = mode === 'firstperson'; + const localPlayer = metaversefileApi.useLocalPlayer(); + if (firstPerson) { + if (!localPlayer.hasAction('firstperson')) { + const aimAction = { + type: 'firstperson', + }; + localPlayer.addAction(aimAction); + } + } else { + localPlayer.removeAction('firstperson'); + } +}); + let lastMouseEvent = null; const gameManager = { menuOpen: 0,
0
diff --git a/README.md b/README.md @@ -193,7 +193,16 @@ Features ======== - [x] glTF 2.0 -- [x] KHR_lights_punctual extension -- [x] KHR_materials_pbrSpecularGlossiness -- [x] KHR_materials_unlit extension -- [x] KHR_texture_transform extension +- [x] [KHR_lights_punctual](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual) +- [x] [KHR_materials_pbrSpecularGlossiness](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness) +- [x] [KHR_materials_unlit](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit) +- [x] [KHR_texture_transform](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_transform) +- [] PBR next + - [x] [KHR_materials_clearcoat](https://github.com/KhronosGroup/glTF/pull/1740) + - [x] [KHR_materials_sheen](https://github.com/KhronosGroup/glTF/pull/1688) (Punctual lights only, IBL in progress) + - [x] [KHR_materials_specular](https://github.com/KhronosGroup/glTF/pull/1741) + - [x] [KHR_lights_image_based & KHR_image_ktx2](https://github.com/KhronosGroup/glTF/pull/1612) (partial support for16 and 32bit SFLOAT) see [glTF-IBL-Sampler](https://github.com/KhronosGroup/glTF-IBL-Sampler) project to generate environments. SH not support yet. + - [] [KHR_materials_thinfilm](https://github.com/KhronosGroup/glTF/pull/1742) + - [] [KHR_materials_transmission](https://github.com/KhronosGroup/glTF/pull/1698) + - [] KHR_materials_anisotropic (Specification pending) +
3
diff --git a/src/broker/index.js b/src/broker/index.js @@ -359,17 +359,14 @@ module.exports = class Broker { const listOffsets = this.lookupRequest(apiKeys.ListOffsets, requests.ListOffsets) const result = await this.connection.send(listOffsets({ replicaId, isolationLevel, topics })) - // Kafka >= 0.11 will return a single `offset` (ListOffsets V2), - // rather than an array of `offsets` (ListOffsets V0). + // ListOffsets >= v1 will return a single `offset` rather than an array of `offsets` (ListOffsets V0). // Normalize to just return `offset`. - result.responses.forEach(response => { - response.partitions.map(partition => { - if (partition.offsets) { - partition.offset = partition.offsets.pop() - delete partition.offsets + for (let response of result.responses) { + response.partitions = response.partitions.map( + ({ offsets, ...partitionData }) => + offsets ? { ...partitionData, offset: offsets.pop() } : partitionData + ) } - }) - }) return result }
14
diff --git a/packages/titus-components/src/navigation/navigation.js b/packages/titus-components/src/navigation/navigation.js @@ -92,7 +92,7 @@ class Navigation extends Component { theme: PropTypes.object.isRequired, items: PropTypes.func, main: PropTypes.func.isRequired, - customComponent: PropTypes.func + headerRight: PropTypes.func } state = { @@ -104,7 +104,7 @@ class Navigation extends Component { render () { const { handleMenuOpen, handleMenuClose } = this - const { classes, title, main, items, theme, customComponent: CustomComponent } = this.props + const { classes, title, main, items, theme, headerRight: HeaderRight } = this.props const { menuOpen } = this.state return ( @@ -130,8 +130,7 @@ class Navigation extends Component { {title} </Typography> - {CustomComponent && <CustomComponent />} - + {HeaderRight && <HeaderRight />} </Toolbar> </AppBar> <Drawer
10
diff --git a/html/.storybook/config.js b/html/.storybook/config.js @@ -5,7 +5,7 @@ import { withA11y } from '@storybook/addon-a11y'; import sparkTheme from '../../storybook-utilities/storybook-theming/storybook-spark-theme'; import 'iframe-resizer/js/iframeResizer.contentWindow.min'; import '!style-loader!css-loader!sass-loader!../../storybook-utilities/storybook-theming/font-loader.scss'; -import '../../storybook-theming/icon-loader'; +import '../../storybook-utilities/icon-loader'; addDecorator(withA11y);
3
diff --git a/layouts/_default/list.html b/layouts/_default/list.html {{- $name := replace .Name "/index" "" -}} {{- $directory_same_name := in ($.Scratch.Get "local_fragments_dirs") (printf "%s%s/" $.Dir (replace $name ".md" "")) -}} {{- $file_same_name := where ($.Scratch.Get "fragments") ".Name" $name -}} - {{- if and (not $file_same_name) (not $directory_same_name) -}} + {{- if and (not $file_same_name) (not $directory_same_name) (ne .Params.fragment "404") -}} {{- $.Scratch.Add "fragments" (slice .) -}} {{- end -}} {{- end -}}
2
diff --git a/src/components/InstructionsErrorBoundary.jsx b/src/components/InstructionsErrorBoundary.jsx @@ -8,22 +8,22 @@ export default class InstructionsErrorBoundary extends React.Component { this.state = {useHighlighting: true}; } - unstable_handleError() { // eslint-disable-line camelcase /* - Highlight.js throws an exception when fed a language it doesn't have - configured. None of the React wrappers we're using catch that error, - and since it gets run in the child React components created from markdown - code sections, these exceptions occur outside the current callstack. - `unstable_handleError` is a kludge for catching exceptions raised in child - renders introduced in React 15 and to be replaced by `componentDidCatch` in - React 16. - <InstructionsErrorBoundary> exists because `unstable_handleError` only - wraps the *initial* mounting of a child -- we need an "error boundary" - component that comes into being in the same mounting phase that - Highlight.js gets run. - In theory this component can be removed and replaced with a - `componentDidCatch` method on the parent when we upgrade to React 16. + * Highlight.js throws an exception when fed a language it doesn't have + * configured. None of the React wrappers we're using catch that error, + * and since it gets run in the child React components created from markdown + * code sections, these exceptions occur outside the current callstack. + * `unstable_handleError` is a kludge for catching exceptions raised in child + * renders introduced in React 15 and to be replaced by `componentDidCatch` + * in React 16. + * <InstructionsErrorBoundary> exists because `unstable_handleError` only + * wraps the *initial* mounting of a child -- we need an "error boundary" + * component that comes into being in the same mounting phase that + * Highlight.js gets run. + * In theory this component can be removed and replaced with a + * `componentDidCatch` method on the parent when we upgrade to React 16. */ + unstable_handleError() { // eslint-disable-line camelcase // eslint-disable-next-line react/no-set-state this.setState({useHighlighting: false}); }
5
diff --git a/shared/js/tab.js b/shared/js/tab.js @@ -27,7 +27,6 @@ const Tracker = require('./tracker') const Score = require('./score') const utils = require('./utils') const Companies = require('./companies') -const tabManager = require('./tabManager') class Tab { constructor(tabData) {
2
diff --git a/src/lib/sb-file-uploader-hoc.jsx b/src/lib/sb-file-uploader-hoc.jsx @@ -13,6 +13,7 @@ import { onLoadedProject, requestProjectUpload } from '../reducers/project-state'; +import {setProjectTitle} from '../reducers/project-title'; import { openLoadingProject, closeLoadingProject @@ -147,20 +148,21 @@ const SBFileUploaderHOC = function (WrappedComponent) { if (this.fileReader) { this.props.onLoadingStarted(); const filename = this.fileToUpload && this.fileToUpload.name; + let loadingSuccess = false; this.props.vm.loadProject(this.fileReader.result) .then(() => { - this.props.onLoadingFinished(this.props.loadingState, true); if (filename) { const uploadedProjectTitle = this.getProjectTitleFromFilename(filename); - this.props.onUpdateProjectTitle(uploadedProjectTitle); + this.props.onSetProjectTitle(uploadedProjectTitle); } + loadingSuccess = true; }) .catch(error => { log.warn(error); - this.props.intl.formatMessage(messages.loadError); - this.props.onLoadingFinished(this.props.loadingState, false); + alert(this.props.intl.formatMessage(messages.loadError)); // eslint-disable-line no-alert }) .then(() => { + this.props.onLoadingFinished(this.props.loadingState, loadingSuccess); // go back to step 7: whether project loading succeeded // or failed, reset file objects this.removeFileObjects(); @@ -188,6 +190,7 @@ const SBFileUploaderHOC = function (WrappedComponent) { loadingState, onLoadingFinished, onLoadingStarted, + onSetProjectTitle, projectChanged, requestProjectUpload: requestProjectUploadProp, userOwnsProject, @@ -215,7 +218,7 @@ const SBFileUploaderHOC = function (WrappedComponent) { loadingState: PropTypes.oneOf(LoadingStates), onLoadingFinished: PropTypes.func, onLoadingStarted: PropTypes.func, - onUpdateProjectTitle: PropTypes.func, + onSetProjectTitle: PropTypes.func, projectChanged: PropTypes.bool, requestProjectUpload: PropTypes.func, userOwnsProject: PropTypes.bool, @@ -248,6 +251,7 @@ const SBFileUploaderHOC = function (WrappedComponent) { }, // show project loading screen onLoadingStarted: () => dispatch(openLoadingProject()), + onSetProjectTitle: title => dispatch(setProjectTitle(title)), // step 4: transition the project state so we're ready to handle the new // project data. When this is done, the project state transition will be // noticed by componentDidUpdate()
5
diff --git a/src/components/IOUConfirmationList.js b/src/components/IOUConfirmationList.js @@ -107,7 +107,7 @@ class IOUConfirmationList extends Component { this.toggleOption = this.toggleOption.bind(this); - const formattedParticipants = this.getParticipantsWithAmount(this.props.participants).map(participant => ({ + const formattedParticipants = _.map(this.getParticipantsWithAmount(this.props.participants), participant => ({ ...participant, selected: true, })); @@ -121,7 +121,7 @@ class IOUConfirmationList extends Component { * @returns {Array} */ getSelectedParticipants() { - return this.state.participants.filter(participant => participant.selected); + return _.filter(this.state.participants, participant => participant.selected); } /** @@ -129,7 +129,7 @@ class IOUConfirmationList extends Component { * @returns {Array} */ getUnselectedParticipants() { - return this.state.participants.filter(participant => !participant.selected); + return _.filter(this.state.participants, participant => !participant.selected); } /** @@ -153,7 +153,7 @@ class IOUConfirmationList extends Component { * @returns {Array} */ getParticipantsWithoutAmount(participants) { - return participants.map(option => _.omit(option, 'descriptiveText')); + return _.map(participants, option => _.omit(option, 'descriptiveText')); } /** @@ -222,7 +222,7 @@ class IOUConfirmationList extends Component { return null; } const selectedParticipants = this.getSelectedParticipants(); - const splits = selectedParticipants.map(participant => ({ + const splits = _.map(selectedParticipants, participant => ({ email: participant.login, // We should send in cents to API
4
diff --git a/modules/keyboard.js b/modules/keyboard.js @@ -432,12 +432,17 @@ function handleBackspace(range, context) { let formats = {}; if (context.offset === 0) { const [prev] = this.quill.getLine(range.index - 1); - if (prev != null && prev.length() > 1) { + if (prev != null) { + if (prev.statics.blotName === 'table') { + this.quill.setSelection(range.index - 1, Quill.sources.USER); + return; + } else if (prev.length() > 1) { const curFormats = line.formats(); const prevFormats = this.quill.getFormat(range.index - 1, 1); formats = DeltaOp.attributes.diff(curFormats, prevFormats) || {}; } } + } // Check for astral symbols const length = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(context.prefix) ? 2 : 1; this.quill.deleteText(range.index - length, length, Quill.sources.USER); @@ -462,6 +467,10 @@ function handleDelete(range, context) { if (context.offset >= line.length() - 1) { const [next] = this.quill.getLine(range.index + 1); if (next) { + if (next.statics.blotName === 'table') { + this.quill.setSelection(range.index + 1, Quill.sources.USER); + return; + } const curFormats = line.formats(); const nextFormats = this.quill.getFormat(range.index, 1); formats = DeltaOp.attributes.diff(curFormats, nextFormats) || {};
9
diff --git a/CommentFlagsHelper.user.js b/CommentFlagsHelper.user.js // Change "dismiss" link to "decline" $('.cancel-comment-flag').text('decline'); - // Start from bottom link (only when more than 5 flags present on page - if($('.messageDivider').length > 5) { + // Start from bottom link (only when more than 3 posts present on page + if($('.flagged-post-row').length > 3) { $('<button>Review from bottom</button>') .click(function() { reviewFromBottom = true; .prependTo('.flag-container'); } - // On any action, hide post immediately + // On delete/dismiss comment action $('.delete-comment, .cancel-comment-flag').click(function() { - $(this).parents('.flagged-post-row').hide(); + + var $post = $(this).parents('.flagged-post-row'); + + // Remove current comment from DOM + $(this).parents('tr.message-divider').next('.comment').addBack().remove(); + + // Remove post immediately if no comments remaining + if($post.find('.comment').length === 0) $post.remove(); }); } .closest('.comment').children().css('background', '#ffc'); }); - // Continue reviewing from bottom of page + // Continue reviewing from bottom of page if previously selected if(reviewFromBottom) { window.scrollTo(0,999999); }
2
diff --git a/docs/_sass/_main.scss b/docs/_sass/_main.scss @@ -59,7 +59,7 @@ html, body { height: 100%; min-height: 100%; - background: $color-white; + background: $color-super-dark-green; } hr { @@ -144,7 +144,7 @@ button { &.success { background-color: $color-green; - color: $color-white; + color: $color-super-dark-green; width: 100%; &:hover {
4
diff --git a/src/editor/model/Editor.js b/src/editor/model/Editor.js @@ -750,57 +750,23 @@ export default Backbone.Model.extend({ const { config } = this; const editor = this.getEditor(); const { editors = [] } = config.grapesjs || {}; - const { - DomComponents, - CssComposer, - UndoManager, - Panels, - Canvas, - Keymaps, - RichTextEditor, - LayerManager, - AssetManager, - BlockManager, - CodeManager, - Commands, - DeviceManager, - I18n, - Modal, - Parser, - SelectorManager, - StorageManager, - StyleManager, - TraitManager - } = this.attributes; this.stopDefault(); - DomComponents.destroy(); - CssComposer.destroy(); - UndoManager.destroy(); - Panels.destroy(); - Canvas.destroy(); - Keymaps.destroy(); - RichTextEditor.destroy(); - LayerManager.destroy(); - AssetManager.destroy(); - BlockManager.destroy(); - CodeManager.destroy(); - Commands.destroy(); - DeviceManager.destroy(); - I18n.destroy(); - Modal.destroy(); - Parser.destroy(); - SelectorManager.destroy(); - StorageManager.destroy(); - StyleManager.destroy(); - TraitManager.destroy(); + this.get('modules') + .slice() + .reverse() + .forEach(mod => mod.destroy()); this.view.remove(); this.stopListening(); this.clear({ silent: true }); this.destroyed = 1; + ['config', 'view', '_previousAttributes', '_events', '_listeners'].forEach( + i => (this[i] = {}) + ); editors.splice(editors.indexOf(editor), 1); $(config.el) .empty() .attr(this.attrsOrig); + console.log(this); }, setEditing(value) {
7
diff --git a/src/settings/_colours-palette.scss b/src/settings/_colours-palette.scss $govuk-colours: ( "purple": #2e358b, - "mauve": #6f72af, - "fuchsia": #912b88, + "light-purple": #6f72af, + "bright-purple": #912b88, "pink": #d53880, - "baby-pink": #f499be, + "light-pink": #f499be, "red": #b10e1e, - "mellow-red": #df3034, + "bright-red": #df3034, "orange": #f47738, "brown": #b58840, "yellow": #ffbf47, - "grass-green": #85994b, + "light-green": #85994b, "green": #006435, "turquoise": #28a197, "light-blue": #2b8cc4,
4
diff --git a/js/coinex.js b/js/coinex.js @@ -190,7 +190,6 @@ module.exports = class coinex extends Exchange { }, 'options': { 'createMarketBuyOrderRequiresPrice': true, - 'defaultType': 'main', }, 'commonCurrencies': { 'ACM': 'Actinium', @@ -624,7 +623,7 @@ module.exports = class coinex extends Exchange { const marketId = market['id']; let accountId = this.safeString2 (params, 'id', 'account_id'); if (accountId === undefined) { - accountId = '0'; // default to main account, note: account id is a required parameter, margin account ID's can be found by calling the getMarginAccount method + accountId = '0'; // default to main account, note: account id is a required parameter, margin account ID's can be found by calling fetchBalance() with 'type'='margin' and a specified market } const request = { 'account_id': accountId, // main account ID: 0, margin account ID: See < Inquire Margin Account Market Info >, future account ID: See < Inquire Future Account Market Info > @@ -637,59 +636,6 @@ module.exports = class coinex extends Exchange { return response; } - async fetchMarginAccount (params = {}) { - const symbol = this.safeString (params, 'market'); - if (symbol === undefined) { - throw new ArgumentsRequired (this.id + ' getMarginAccountId() requires a market argument'); - } - await this.loadMarkets (); - const market = this.market (symbol); - const marketId = market['id']; - const request = { - 'market': marketId, - }; - params = this.omit (params, 'market'); - const response = await this.privateGetMarginAccount (this.extend (request, params)); - // - // { - // code: 0, - // data: { - // "account_id": 126, - // "leverage": 3, - // "market_type": "AAVEUSDT", - // "sell_asset_type": "AAVE", - // "buy_asset_type": "USDT", - // "balance": { - // "sell_type": "0", - // "buy_type": "0" - // }, - // "frozen": { - // "sell_type": "0", - // "buy_type": "0" - // }, - // "loan": { - // "sell_type": "0", - // "buy_type": "0" - // }, - // "interest": { - // "sell_type": "0", - // "buy_type": "0" - // }, - // "can_transfer": { - // "sell_type": "0", - // "buy_type": "0" - // }, - // "warn_rate": "", - // "liquidation_price": "" - // }, - // message: "Success" - // } - // - return { - 'info': response['data'], - }; - } - async fetchOrder (id, symbol = undefined, params = {}) { if (symbol === undefined) { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument');
1
diff --git a/src/prebid.js b/src/prebid.js @@ -758,8 +758,50 @@ $$PREBID_GLOBAL$$.setS2SConfig = function(options) { $$PREBID_GLOBAL$$.getConfig = config.getConfig; /** - * Set Prebid config options - * @param {Object} options + * Set Prebid config options. + * (Added in version 0.27.0). + * + * `setConfig` is designed to allow for advanced configuration while + * reducing the surface area of the public API. For more information + * about the move to `setConfig` (and the resulting deprecations of + * some other public methods), see [the Prebid 1.0 public API + * proposal](https://gist.github.com/mkendall07/51ee5f6b9f2df01a89162cf6de7fe5b6). + * + * #### Troubleshooting your configuration + * + * If you call `pbjs.setConfig` without an object, e.g., + * + * `pbjs.setConfig('debug', 'true'))` + * + * then Prebid.js will print an error to the console that says: + * + * ``` + * ERROR: setConfig options must be an object + * ``` + * + * If you don't see that message, you can assume the config object is valid. + * + * @param {Object} options Global Prebid configuration object. Must be JSON - no JavaScript functions are allowed. + * @param {string} options.bidderSequence The order in which bidders are called. Example: `pbjs.setConfig({ bidderSequence: "fixed" })`. Allowed values: `"fixed"` (order defined in `adUnit.bids` array on page), `"random"`. + * @param {boolean} options.debug Turn debug logging on/off. Example: `pbjs.setConfig({ debug: true })`. + * @param {string} options.priceGranularity The bid price granularity to use. Example: `pbjs.setConfig({ priceGranularity: "medium" })`. Allowed values: `"low"` ($0.50), `"medium"` ($0.10), `"high"` ($0.01), `"auto"` (sliding scale), `"dense"` (like `"auto"`, with smaller increments at lower CPMs), or a custom price bucket object, e.g., `{ "buckets" : [{"min" : 0,"max" : 20,"increment" : 0.1,"cap" : true}]}`. + * @param {boolean} options.enableSendAllBids Turn "send all bids" mode on/off. Example: `pbjs.setConfig({ enableSendAllBids: true })`. + * @param {number} options.bidderTimeout Set a global bidder timeout, in milliseconds. Example: `pbjs.setConfig({ bidderTimeout: 3000 })`. Note that it's still possible for a bid to get into the auction that responds after this timeout. This is due to how [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout) works in JS: it queues the callback in the event loop in an approximate location that should execute after this time but it is not guaranteed. For more information about the asynchronous event loop and `setTimeout`, see [How JavaScript Timers Work](https://johnresig.com/blog/how-javascript-timers-work/). + * @param {string} options.publisherDomain The publisher's domain where Prebid is running, for cross-domain iFrame communication. Example: `pbjs.setConfig({ publisherDomain: "https://www.theverge.com" })`. + * @param {number} options.cookieSyncDelay A delay (in milliseconds) for requesting cookie sync to stay out of the critical path of page load. Example: `pbjs.setConfig({ cookieSyncDelay: 100 })`. + * @param {Object} options.s2sConfig The configuration object for [server-to-server header bidding](http://prebid.org/dev-docs/get-started-with-prebid-server.html). Example: + * ``` + * pbjs.setConfig({ + * s2sConfig: { + * accountId: '1', + * enabled: true, + * bidders: ['appnexus', 'pubmatic'], + * timeout: 1000, + * adapter: 'prebidServer', + * endpoint: 'https://prebid.adnxs.com/pbs/v1/auction' + * } + * }) + * ``` */ $$PREBID_GLOBAL$$.setConfig = config.setConfig;
7
diff --git a/src/generic-provider-views/Browser.js b/src/generic-provider-views/Browser.js @@ -47,7 +47,6 @@ module.exports = (props) => { }], folders: filteredFolders, files: filteredFiles, - isGrid: false, activeRow: props.isActiveRow, sortByTitle: props.sortByTitle, sortByDate: props.sortByDate,
2
diff --git a/react/src/components/buttons/SprkButton.js b/react/src/components/buttons/SprkButton.js @@ -52,20 +52,25 @@ SprkButton.propTypes = { */ additionalClasses: PropTypes.string, /** - * The value supplied will be assigned to the + * Value assigned to the * `data-analytics` attribute on the component. * Intended for an outside * library to capture data. */ analyticsString: PropTypes.string, - /** Children */ + /** Content to render inside of the SprkButton */ children: PropTypes.node, /** - * If `true`, the button styles will be added. + * Applies disabled style and the + * disabled attribute to the element. */ disabled: PropTypes.bool, /** - * Determines what type of element to render. + * Determines what element is rendered. + * If an href is provided and an element is not, + * an anchor tag will be rendered. + * If no href or element is provided, + * it will default to a button. */ element: PropTypes.oneOfType([ PropTypes.string, @@ -73,8 +78,8 @@ SprkButton.propTypes = { PropTypes.func, ]), /** - * The value supplied will be assigned - * to the `data-id` attribute on the + * Value assigned + * to the `data-id` attribute of the * component. This is intended to be * used as a selector for automated * tools. This value should be unique @@ -82,16 +87,18 @@ SprkButton.propTypes = { */ idString: PropTypes.string, /** - * If `true`, will render a spinner - * in the button instead of children. + * Will cause a spinner to be + * rendered in place of the button content. */ loading: PropTypes.bool, /** - * Decides which button variant to render. + * Will render the coresponding button style. */ variant: PropTypes.oneOf(['primary', 'secondary', 'tertiary']), /** - * The `URL` rendered if the `href` is provided. + * If an href is provided and no element is provided, + * an anchor tag will be rendered. + * The actual value is what is applied to the href attribute. */ href: PropTypes.string, };
7
diff --git a/src/apps.json b/src/apps.json "MySQL" ], "headers": { - "link": "rel=\"https://api\\.w\\.org/\"" + "link": "rel=\"https://api\\.w\\.org/\"", + "X-Pingback": "/xmlrpc\\.php$" }, "js": { "wp_username": "" }, "meta": { - "generator": "^WordPress ?([\\d.]+)?\\;version:\\1" + "generator": "^WordPress ?([\\d.]+)?\\;version:\\1", + "shareaholic:wp_version": "" }, "script": "/wp-(?:content|includes)/", "website": "https://wordpress.org"
7
diff --git a/assets/js/googlesitekit/datastore/ui/ui.js b/assets/js/googlesitekit/datastore/ui/ui.js import invariant from 'invariant'; import isPlainObject from 'lodash/isPlainObject'; -const RESET_IN_VIEW = 'RESET_IN_VIEW'; +/** + * Internal dependencies + */ +import Data from 'googlesitekit-data'; +import { CORE_UI } from './constants'; + const SET_VALUES = 'SET_VALUES'; const SET_VALUE = 'SET_VALUE'; @@ -39,11 +44,17 @@ export const actions = { * * @return {Object} Redux-style action. */ - resetInView() { - return { - payload: {}, - type: RESET_IN_VIEW, - }; + *resetInView() { + const registry = yield Data.commonActions.getRegistry(); + + const useInViewResetCount = registry + .select( CORE_UI ) + .getValue( 'useInViewResetCount' ); + + return yield actions.setValue( + 'useInViewResetCount', + useInViewResetCount + 1 + ); }, /** @@ -88,13 +99,6 @@ export const controls = {}; export const reducer = ( state, { type, payload } ) => { switch ( type ) { - case RESET_IN_VIEW: { - return { - ...state, - useInViewResetCount: state.useInViewResetCount + 1, - }; - } - case SET_VALUES: { const { values } = payload;
7
diff --git a/game.js b/game.js @@ -312,7 +312,7 @@ let editedObject = null; */ // const coord = new THREE.Vector3(); // const lastCoord = coord.clone(); -let highlightedWorld = null; +// let highlightedWorld = null; /* const moveMesh = _makeTargetMesh(); moveMesh.visible = false; @@ -2732,7 +2732,7 @@ const weaponsManager = { localPlayer.actions.push(crouchAction); } }, - async destroyWorld() { + /* async destroyWorld() { if (highlightedWorld) { const {name} = highlightedWorld; const res = await fetch(`${worldsHost}/${name}`, { @@ -2741,7 +2741,7 @@ const weaponsManager = { await res.blob(); console.log('deleted', res.status); } - }, + }, */ selectLoadout(index) { _selectLoadout(index); }, @@ -2824,7 +2824,7 @@ const weaponsManager = { }, canStartBuild() { return !world.appManager.grabbedObjects[0] && !highlightedObject; - }, */ + }, async startBuild(mode) { const object = await _loadItemSpec1('./assets/type/object.geo'); object.setMode(mode); @@ -2833,7 +2833,7 @@ const weaponsManager = { }, setBuildMode(mode) { editedObject.setMode(mode); - }, + }, */ isJumping() { return useLocalPlayer().actions.some(action => action.type === 'jump'); },
2
diff --git a/assets/js/components/surveys/CurrentSurvey.stories.js b/assets/js/components/surveys/CurrentSurvey.stories.js @@ -74,7 +74,12 @@ SurveyAnsweredPositiveStory.args = { `survey-${ fixtures.singleQuestionSurvey.session.session_id }`, { answers: [ - { question_ordinal: 1, answer_ordinal: 5 }, + { + question_ordinal: 1, + answer: { + answer: { answer_ordinal: 5 }, + }, + }, ], } );
1
diff --git a/token-metadata/0x0F5D2fB29fb7d3CFeE444a200298f468908cC942/metadata.json b/token-metadata/0x0F5D2fB29fb7d3CFeE444a200298f468908cC942/metadata.json "symbol": "MANA", "address": "0x0F5D2fB29fb7d3CFeE444a200298f468908cC942", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/autoform-api.js b/autoform-api.js @@ -501,14 +501,18 @@ AutoForm.setFieldValue = function autoFormSetFieldValue(fieldName, value, formId }); if (!template) return; - if (!template.inputValues) return; - if (!template.inputValues[fieldName]) return; + + if (!template.inputValues[fieldName]) { + template.inputValues[fieldName] = new Tracker.Dependency(); + } template.inputValues[fieldName].cachedValue = value template.inputValues[fieldName].changed(); - if (!template.formValues) return; - if (!template.formValues[fieldName]) return; + if (!template.formValues[fieldName]) { + template.formValues[fieldName] = new Tracker.Dependency(); + template.formValues[fieldName].isMarkedChanged = true + } template.formValues[fieldName].cachedValue = value template.formValues[fieldName].isMarkedChanged = false
9
diff --git a/generators/entity-client/templates/react/src/main/webapp/app/entities/_entity.tsx b/generators/entity-client/templates/react/src/main/webapp/app/entities/_entity.tsx @@ -141,7 +141,13 @@ export class <%= entityReactName %> extends React.Component<I<%= entityReactName <%_ } _%> <%_ } else { _%> <%_ if (relationshipType === 'many-to-many') { _%> - TODO + { + (<%= entityInstance %>.<%= relationshipFieldNamePlural %>) ? + (<%= entityInstance %>.<%= relationshipFieldNamePlural %>.map((val, j) => + <span key={j}><a>{val.<%= otherEntityField %>}</a>{(j === <%= entityInstance %>.<%= relationshipFieldNamePlural %>.length - 1) ? '' : ', '}</span> + ) + ) : null + } <%_ } else { _%> <%_ if (dto === 'no') { _%> {<%= entityInstance + "." + relationshipFieldName %> ? <%= entityInstance + "." + relationshipFieldName + "." + otherEntityField %> : ''}
9
diff --git a/test/definition.schema.test.js b/test/definition.schema.test.js @@ -976,14 +976,13 @@ describe('enforcer/schema', () => { type: 'object', properties: { y: { - type: 'boolean', - format: 'date' + type: 'taco' } } } } }); - expect(err).to.match(/Property not allowed: format/); + expect(err).to.match(/at: properties > x > properties > y > type\s+Value must be one of/); }); });
1
diff --git a/packages/@uppy/dashboard/src/style.scss b/packages/@uppy/dashboard/src/style.scss overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 10px; + padding: 2px 0; .uppy-size--md & { flex-direction: row; max-width: 600px; overflow-x: initial; margin-top: 30px; + padding-top: 0; } } display: inline-block; text-align: center; border-bottom: 1px solid rgba($color-gray, 0.2); + padding: 0px 2px; .uppy-size--md & { width: initial; margin-bottom: 20px; border-bottom: initial; + padding: 0; } } display: flex; flex-direction: row; align-items: center; - padding: 14px 20px; + padding: 12px 20px; line-height: 1; .uppy-size--md & { - width: 90px; + width: 80px; margin: 0 5px; flex-direction: column; padding: 0; color: $color-cornflower-blue; } + .uppy-DashboardTab-btn:focus { + outline-offset: 0; + } + .uppy-DashboardTab-btn svg { margin-right: 10px;
0
diff --git a/lib/assets/javascripts/new-dashboard/pages/Home/Home.vue b/lib/assets/javascripts/new-dashboard/pages/Home/Home.vue <section class="page page--welcome"> <Welcome /> <MapsSection class="section" /> - <DatasetsSection class="section" /> + <DatasetsSection class="section section--noBorder" /> </section> </template>
2
diff --git a/articles/errors/deprecation-errors.md b/articles/errors/deprecation-errors.md @@ -67,9 +67,6 @@ Click on the **TRY** button. If successful, you should see a screen similar to t | Cause | Resolution | | --- | --- | | You are using a legacy version of embedded Lock or Auth0.js SDK. | [Migrate to Universal Login](/guides/login/migration-embedded-universal) if possible or [upgrade to Lock v11 / Auth0.js v9](/migrations#introducing-lock-v11-and-auth0-js-v9) (Reference guide for [Lock v11](/libraries/lock/v11) and for [Auth0.js v9](/libraries/auth0js/v9)). | -| Calling /login endpoint directly. | Migrate to use a form of the [/authorize endpoint](/api/authentication?http#login) as the start of authentication transactions. | -| Users bookmarking the login URL and trying to initiate login from that bookmarked link at a later time. | Educate users to bookmark instead the place in your app to which they want to return (such as the home page). Depending on your design choices, and if there's no valid session for the user in the app, the app will either start the authorization process or show a login button. | -| Users hitting the back button in the middle of a login transaction. | Educate users to start the login transaction again, starting from the initial login button/link, rather than using the back or forward button. | | Calling the /usernamepassword/login endpoint directly. | Use the Lock or Auth0.js libraries instead. | ### ssodata
3
diff --git a/packages/fether-ui/src/TokenCard/TokenCard.js b/packages/fether-ui/src/TokenCard/TokenCard.js @@ -20,14 +20,18 @@ export const TokenCard = ({ <Card {...otherProps}> <div className='token'> <div className='token_icon'> - {token.logo ? ( + {token && token.logo ? ( <img alt={token.symbol} src={token.logo} /> ) : ( <Placeholder height={20} width={20} /> )} </div> <div className='token_name'> - {token.name ? token.name : <Placeholder height={20} width={100} />} + {token && token.name ? ( + token.name + ) : ( + <Placeholder height={20} width={100} /> + )} </div> <div className='token_balance'> {balance ? ( @@ -35,7 +39,7 @@ export const TokenCard = ({ ) : showBalance ? ( <Placeholder height={20} width={50} /> ) : null} - <span className='token_symbol'>{token.symbol}</span> + <span className='token_symbol'>{token && token.symbol}</span> </div> {children} </div> @@ -53,7 +57,7 @@ TokenCard.propTypes = { logo: PropTypes.string, name: PropTypes.string, symbol: PropTypes.string - }).isRequired + }) }; export default TokenCard;
11
diff --git a/package.json b/package.json "prepare": "npm run build", "build": "rollup -c", "lint": "eslint source", - "fix": "eslint --fix source" + "lintfix": "eslint --fix source", + "fix": "prettier --write source && eslint --fix source" }, "license": "MIT", "repository": {
0
diff --git a/scripts/travis-ci.sh b/scripts/travis-ci.sh @@ -88,7 +88,7 @@ echo " RUN_LINT='npm run lint' SKIP_LINT=false # Mocha framework tests that focus on user interaction -START_KARMA='node_modules/.bin/karma start --single-run' +START_KARMA='npm run test:unit' SKIP_START_KARMA=false # Jest markup & image snapshot tests SNAPSHOT_TESTS='npm run test:snapshot'
4
diff --git a/native/calendar/calendar.react.js b/native/calendar/calendar.react.js @@ -248,17 +248,13 @@ class InnerCalendar extends React.PureComponent { ) { this.scrollToToday(); } + const lastLDWH = prevState.listDataWithHeights; const newLDWH = this.state.listDataWithHeights; - if (lastLDWH && newLDWH) { - if (newLDWH.length < lastLDWH.length) { - // If there are fewer items in our new data, which happens when the - // current calendar query gets reset due to inactivity, let's reset the - // scroll position to the center (today). Once we're done, we can allow - // scrolling logic once again. - setTimeout(() => this.scrollToToday(), 50); - setTimeout(() => this.listShrinking = false, 200); - } else if (newLDWH.length > lastLDWH.length) { + if (!lastLDWH || !newLDWH) { + return; + } + const lastSecondItem = lastLDWH[1]; const newSecondItem = newLDWH[1]; invariant( @@ -266,17 +262,32 @@ class InnerCalendar extends React.PureComponent { lastSecondItem.itemType === "header", "second item in listData should be a header", ); - if ( - dateFromString(newSecondItem.dateString) < - dateFromString(lastSecondItem.dateString) - ) { + const lastStartDate = dateFromString(lastSecondItem.dateString); + const newStartDate = dateFromString(newSecondItem.dateString); + + const lastPenultimateItem = lastLDWH[lastLDWH.length - 2]; + const newPenultimateItem = newLDWH[newLDWH.length - 2]; + invariant( + newPenultimateItem.itemType === "footer" && + lastPenultimateItem.itemType === "footer", + "penultimate item in listData should be a footer", + ); + const lastEndDate = dateFromString(lastPenultimateItem.dateString); + const newEndDate = dateFromString(newPenultimateItem.dateString); + + if (newStartDate > lastStartDate || newEndDate < lastEndDate) { + // If there are fewer items in our new data, which happens when the + // current calendar query gets reset due to inactivity, let's reset the + // scroll position to the center (today). Once we're done, we can allow + // scrolling logic once again. + setTimeout(() => this.scrollToToday(), 50); + setTimeout(() => this.listShrinking = false, 200); + } else if (newStartDate < lastStartDate) { this.updateScrollPositionAfterPrepend(lastLDWH, newLDWH); - } else { + } else if (newEndDate > lastEndDate) { this.loadingNewEntriesFromScroll = false; } } - } - } /** * When prepending list items, FlatList isn't smart about preserving scroll
1
diff --git a/apps/dg/views/component_view.js b/apps/dg/views/component_view.js @@ -458,13 +458,15 @@ DG.ComponentView = SC.View.extend( null, undo: (kViewInEmbeddedMode || kViewInComponentMode) ? DG.TitleBarUndoButton.design({ - layout: {right: kTitleBarHeight, top: 10, width: 24, height: kTitleBarHeight}, + layout: {right: (kViewInEmbeddedMode ? kTitleBarHeight * 3 : kTitleBarHeight), + top: 10, width: 24, height: kTitleBarHeight}, classNames: ['dg-undo'], }) : null, redo: (kViewInEmbeddedMode || kViewInComponentMode) ? DG.TitleBarRedoButton.design({ - layout: {right: 0, top: 4, width: kTitleBarHeight, height: kTitleBarHeight}, + layout: {right: (kViewInEmbeddedMode ? kTitleBarHeight * 2 : 0), + top: 4, width: kTitleBarHeight, height: kTitleBarHeight}, classNames: ['dg-redo'], }) : null,
7
diff --git a/public/student.css b/public/student.css body {color: #333;margin: 2em auto;font: 14px/1.42 "Helvetica Neue", Helvetica, Arial, sans-serif;max-width: 900px;} .answer { border: 1px solid #aaa; padding: 5px; box-sizing: content-box; min-height: 100px; } +.answer img { max-width: 100%; max-height: 1000px; } .list {border: 1px solid #eee;margin-bottom: 10px;} .expanded .list { display: block; } .special-characters { font-size: 12px; padding: 8px 0; display: block; border: none; color: #68b4df; background: none; text-transform: uppercase; }
12
diff --git a/src/elements/element.point.js b/src/elements/element.point.js @@ -24,12 +24,12 @@ defaults._set('global', { function xRange(mouseX) { var vm = this._view; - return vm ? (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hitRadius, 2)) : false; + return vm ? (Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius) : false; } function yRange(mouseY) { var vm = this._view; - return vm ? (Math.pow(mouseY - vm.y, 2) < Math.pow(vm.radius + vm.hitRadius, 2)) : false; + return vm ? (Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius) : false; } module.exports = Element.extend({
7
diff --git a/index.html b/index.html @@ -15769,9 +15769,9 @@ N is the population size. <!--Simple Probability--> <div class="collapse" id="probabilitycollapse"> - <h1>Empirical Probability</h1> + <h1 style="text-align: center; margin-bottom: 20px;">Empirical Probability</h1> <form action=""> - <div class="row"> + <div style="justify-content: center; align-items: center;" class="row"> <div class="col-md-4"> <div class="form-group"> <h5>Enter number of favourable outcomes</h5> @@ -15785,7 +15785,7 @@ N is the population size. </div> </div> </div> - <div class="form-group"> + <div style="text-align: center;" class="form-group"> <button type="button" class="btn btn-light" onclick="computeprobability()"> Solve @@ -15845,10 +15845,10 @@ N is the population size. <!--Joint Probability--> <div class="collapse" id="joint-probabilitycollapse"> - <h1>Joint Probability </h1> - <p>The probability that two events will both occur</p> + <h1 style="text-align: center; margin-bottom:20px;">Joint Probability </h1> + <p style="margin-bottom: 15px;">The probability that two events will both occur</p> <form action=""> - <div class="row"> + <div style="justify-content: center;align-items: center;" class="row"> <div class="col-md-4"> <div class="form-group"> <h5>Enter number of favourable outcomes in case of Event 1</h5> @@ -15862,7 +15862,7 @@ N is the population size. </div> </div> </div> - <div class="row"> + <div style="justify-content: center;align-items: center;" class="row"> <div class="col-md-4"> <div class="form-group"> <h5>Enter number of favourable outcomes in case of Event 2</h5> @@ -15876,7 +15876,7 @@ N is the population size. </div> </div> </div> - <div class="form-group"> + <div style="text-align: center;"class="form-group"> <button type="button" class="btn btn-light" onclick="computejointprobability()"> Solve
7
diff --git a/spritesheet-manager.js b/spritesheet-manager.js @@ -28,10 +28,11 @@ class SpritesheetManager { return spritesheet; } async getSpriteSheetForAppUrl(appUrl, opts) { - // console.log('got spritesheet 1', appUrl, opts); - const spritesheet = await this.getSpriteSheetForAppUrlInternal(appUrl, opts); - // console.log('got spritesheet 2', spritesheet); - // XXX cache this + let spritesheet = this.spritesheetCache.get(appUrl); + if (!spritesheet) { + spritesheet = await this.getSpriteSheetForAppUrlInternal(appUrl, opts); + this.spritesheetCache.set(appUrl, spritesheet); + } return spritesheet; } }
0
diff --git a/demos/axis-autosize.html b/demos/axis-autosize.html stroke: "red", class: "foo", size(self, values, axisIdx, cycleNum) { + let axis = self.axes[axisIdx]; + // bail out, force convergence if (cycleNum > 2) - return self.axes[axisIdx]._size; + return axis._size; + + // find longest value + let maxSize = (values ?? []).reduce((acc, val) => ( + Math.max(acc, self.ctx.measureText(val).width / devicePixelRatio) + ), 0); let dfltSize = 40; - return values == null ? dfltSize : Math.max(dfltSize, values[0].length * 8); + + return axis.gap + axis.ticks.size + Math.max(dfltSize, maxSize); }, } ],
7
diff --git a/docs/guides/place-my-order.md b/docs/guides/place-my-order.md @@ -906,6 +906,40 @@ Now we're ready to create a production build; go ahead and kill your development Our `index.stache` contains a can-import tag for each of the pages we have implemented. These can-imports which have nested html will be progressively loaded; the restaurant list page's JavaScript and CSS will only be loaded when the user visits that page. +### Bundling assets + +Likely you have assets in your project other than your JavaScript and CSS that you will need to deploy to production. Place My Order has these assets saved to another project, you can view them at `node_modules/place-my-order-assets/images`. + +StealTools comes with the ability to bundle all of your static assets into a folder that can be deployed to production by itself. Think if it as a zip file that contains everything your app needs to run in production. + +To use this capability add an option to your build script to enable it. Change: + +```js +var buildPromise = stealTools.build({ + config: __dirname + "/package.json!npm" +}, { + bundleAssets: true +}); +``` + +to: + +```js +var buildPromise = stealTools.build({ + config: __dirname + "/package.json!npm" +}, { + bundleAssets: { + infer: false, + glob: "node_modules/place-my-order-assets/images/**/*" + } +}); +``` + +@highlight 4-7 + +StealTools will find all of the assets you reference in your CSS and copy them to the dist folder. By default StealTools will set your [dest](http://stealjs.com/docs/steal-tools.build.html#dest) to `dist`, and will place the place-my-order-assets images in `dist/node_modules/place-my-order/assets/images`. bundleAssets preserves the path of your assets so that their locations are the same relative to the base url in both development and production. + + ### Bundling your app To bundle our application for production we use the build script in `build.js`. We could also use [Grunt](http://gruntjs.com/) or [Gulp](http://gulpjs.com/), but in this example we just run it directly with Node. Everything is set up already so we run: @@ -1157,39 +1191,6 @@ The Windows application can be opened with Now that we verified that our application works in production, we can deploy it to the web. In this section, we will use [Firebase](https://www.firebase.com/), a service that provides static file hosting and [Content Delivery Network](https://en.wikipedia.org/wiki/Content_delivery_network) (CDN) support, to automatically deploy and serve our application's static assets from a CDN and [Heroku](https://heroku.com) to provide server-side rendering. -### Bundling assets - -Likely you have assets in your project other than your JavaScript and CSS that you will need to deploy to production. Place My Order has these assets saved to another project, you can view them at `node_modules/place-my-order-assets/images`. - -StealTools comes with the ability to bundle all of your static assets into a folder that can be deployed to production by itself. Think if it as a zip file that contains everything your app needs to run in production. - -To use this capability add an option to your build script to enable it. Change: - -```js -var buildPromise = stealTools.build({ - config: __dirname + "/package.json!npm" -}, { - bundleAssets: true -}); -``` - -to: - -```js -var buildPromise = stealTools.build({ - config: __dirname + "/package.json!npm" -}, { - bundleAssets: { - infer: false, - glob: "node_modules/place-my-order-assets/images/**/*" - } -}); -``` - -@highlight 4-7 - -StealTools will find all of the assets you reference in your CSS and copy them to the dist folder. By default StealTools will set your [bundlesPath](http://stealjs.com/docs/System.bundlesPath.html) to `dist/bundles`, and will place the place-my-order-assets images in `dist/node_modules/place-my-order/assets/images`. bundleAssets preserves the path of your assets so that their locations are the same relative to the base url in both development and production. - ### Static hosting on Firebase Sign up for free at [Firebase](https://firebase.google.com/). After you have an account go to [Firebase console](https://console.firebase.google.com/) and create an app called `place-my-order-<user>` where `<user>` is your GitHub username:
5
diff --git a/package.json b/package.json "dependencies": { "babel-core": "^6.18.2", "babel-plugin-transform-amd-system-wrapper": "^0.3.3", - "babel-plugin-transform-cjs-system-wrapper": "^0.5.0", + "babel-plugin-transform-cjs-system-wrapper": "^0.6.0", "babel-plugin-transform-es2015-modules-systemjs": "^6.6.5", "babel-plugin-transform-global-system-wrapper": "^0.3.0", "babel-plugin-transform-system-register": "^0.0.1",
3
diff --git a/src/scripts/ledger.js b/src/scripts/ledger.js @@ -15,6 +15,7 @@ const BECH32PREFIX = `cosmos` export default class Ledger { constructor({ requiredCosmosAppVersion, testModeAllowed, onOutdated }) { + /* istanbul ignore next */ this.checkLedgerErrors = (...args) => checkLedgerErrors( {
8
diff --git a/config/bis_gulputils.js b/config/bis_gulputils.js @@ -28,10 +28,8 @@ let colors=require('colors/safe'), gulpzip = require('gulp-zip'), template=require('gulp-template'), del = require('del'), - gulp=require("gulp"), - pwaconfig=require('../web/pwa/pwa_config.js'); + gulp=require("gulp"); -//console.log(pwaconfig); var getTime=function(nobracket=0) { @@ -193,8 +191,7 @@ var createHTML=function(toolname,outdir,libjs,commoncss) { .pipe(htmlreplace({ 'js': alljs, 'css': bundlecss, - 'manifest' : pwaconfig.manifest, - 'serviceworker' : pwaconfig.serviceworker + 'manifest' : '<link rel="manifest" href="./manifest.json">', })).pipe(gulp.dest(outdir)); };
2
diff --git a/src/primitive.js b/src/primitive.js @@ -346,22 +346,8 @@ var _ = Mavo.Primitive = $.Class({ return this.preEdit; } - this.preEdit = this.preEdit || Mavo.promise(); - - if (!wasEditing) { - // Make element focusable, so it can actually receive focus - if (this.element.tabIndex === -1) { - Mavo.revocably.setAttribute(this.element, "tabindex", "0"); - } - - this.element.classList.add("mv-pending-edit"); - - // Prevent default actions while editing - // e.g. following links etc - if (!this.modes) { - $.bind(this.element, "click.mavo:edit", evt => evt.preventDefault()); - } - + if (!this.preEdit) { + this.preEdit = Mavo.promise(); this.preEdit.then(evt => { $.unbind(this.element, ".mavo:preedit"); @@ -414,6 +400,21 @@ var _ = Mavo.Primitive = $.Class({ }); } + if (!wasEditing) { + // Make element focusable, so it can actually receive focus + if (this.element.tabIndex === -1) { + Mavo.revocably.setAttribute(this.element, "tabindex", "0"); + } + + this.element.classList.add("mv-pending-edit"); + + // Prevent default actions while editing + // e.g. following links etc + if (!this.modes) { + $.bind(this.element, "click.mavo:edit", evt => evt.preventDefault()); + } + } + var events = "mousedown focus dragover dragenter".split(" ").map(e => e + ".mavo:preedit").join(" "); $.bind(this.element, events, evt => this.preEdit.resolve(evt));
1
diff --git a/readme.md b/readme.md @@ -197,75 +197,13 @@ Immer exposes its functionality in 3 different ways: * `import produce from "immer/proxy"`: This build is optimized for modern browser, which support Proxies and other modern language features, and doesn't polyfill things like `Symbol`. Use this if you are targetting a modern environment only * `import produce from "immer/es5"`: Only bundle the ES5 compatible implementation (which of course also works for modern browsers) -## More reducer examples - -Here are some typical reducer examples, take from the Redux [Immutable Update Patterns](https://redux.js.org/docs/recipes/reducers/ImmutableUpdatePatterns.html) page, and their Immer counter part. -These examples are semantically equivalent and produce the exact same state. - -```javascript -// Plain reducer -function insertItem(array, action) { - return [ - ...array.slice(0, action.index), - action.item, - ...array.slice(action.index) - ] -} - -// With immer -function insertItem(array, action) { - return produce(array, draft => { - draft.splice(action.index, 0, action.item) - }) -} - -// Plain reducer -function removeItem(array, action) { - return [ - ...array.slice(0, action.index), - ...array.slice(action.index + 1) - ]; -} - -// With immer -function removeItem(array, action) { - return produce(array, draft => { - draft.splice(action.index, 1) - }) -} - -// Plain reducer -function updateObjectInArray(array, action) { - return array.map( (item, index) => { - if(index !== action.index) { - // This isn't the item we care about - keep it as-is - return item; - } - - // Otherwise, this is the one we want - return an updated value - return { - ...item, - ...action.item - }; - }); -} - -// With immer -function updateObjectInArray(array, action) { - return produce(array, draft => { - draft[action.index] = { ...item, ...action.item} - // Alternatively, since arbitrarily deep updates are supported: - // Object.assign(draft[action.index], action.item) - }) -} -``` - ## Pitfalls -* Currently, Immer only supports plain objects and arrays. PRs are welcome for more language built-in types like `Map` and `Set`. -* Immer only processes native arrays and plain objects (with a prototype of `null` or `Object`). Any other type of value will be treated verbatim! So if you modify a `Map` or `Buffer` or whatever complex object from the draft state, it will be that very same object in both the base state as the next state. In such cases, make sure to always produce fresh instances if you want to keep your state truly immutable. -* Since Immer uses proxies, reading huge amounts of data from state comes with an overhead (especially in the ES5 implementation). If this ever becomes an issue (measure before you optimize!), do the current state analysis before entering the producer function or read from the `currentState` rather than the `draftState` -* Some debuggers (at least Node 6 is known) have trouble debugging when Proxies are in play. Node 8 is known to work correctly. +1. Currently, Immer only supports plain objects and arrays. PRs are welcome for more language built-in types like `Map` and `Set`. +2. Immer only processes native arrays and plain objects (with a prototype of `null` or `Object`). Any other type of value will be treated verbatim! So if you modify a `Map` or `Buffer` (or whatever complex object from the draft state), the changes will be persisted. But, both in your new and old state! So, in such cases, make sure to always produce fresh instances if you want to keep your state truly immutable. +3. For example, working with `Date` objects is no problem, just make sure you never modify them (by using methods like `setYear` on an existing instance). Instead, always create fresh `Date` instances. Which is probably what you were unconsciously doing already. +4. Since Immer uses proxies, reading huge amounts of data from state comes with an overhead (especially in the ES5 implementation). If this ever becomes an issue (measure before you optimize!), do the current state analysis before entering the producer function or read from the `currentState` rather than the `draftState` +5. Some debuggers (at least Node 6 is known) have trouble debugging when Proxies are in play. Node 8 is known to work correctly. ## How does Immer work?
2
diff --git a/pages/search.js b/pages/search.js @@ -52,6 +52,20 @@ const getMeasurements = (query) => { return client.get('/api/v1/measurements', {params}) } +// Handle circular structures when stringifying +const getCircularReplacer = () => { + const seen = new WeakSet() + return (key, value) => { + if (typeof value === 'object' && value !== null) { + if (seen.has(value)) { + return + } + seen.add(value) + } + return value + } +} + const formatError = (error) => { let errorString = '' if (error.code) { @@ -61,7 +75,7 @@ const formatError = (error) => { errorString += ` (${error.errno})` } if (errorString === '') { - errorString = JSON.stringify(error) + errorString = JSON.stringify(error, getCircularReplacer()) } return errorString }
9
diff --git a/app_web/index.html b/app_web/index.html @@ -204,12 +204,6 @@ function getUrlParam(parameter, defaultvalue){ <section> <label class="label">Image Based Lighting</label> <b-field label="Active Environment" class="smallerLabel"> - <!-- <b-select v-model="selectedEnvironment"> - <option v-for="name in Object.keys(environments)" v-bind:native-value="name" v-bind:key="name" value="name"> - {{ environments[name].title }} - </option> - </b-select> --> - <b-dropdown aria-role="list" v-model="selectedEnvironment"> <template #trigger="{ active }"> <b-button
2