NOTE: This guide is ONLY for devs who don't want to edit their
yarn.lock
file by hand. If you don't care about that please carry on.
So you've pulled the latest master
git checkout master
git pull
let UserContext = React.createContext(); | |
class App extends React.Component { | |
state = { | |
user: null, | |
setUser: user => { | |
this.setState({ user }); | |
} | |
}; |
# If you don't do this you will have to add the host IP in INTERNAL_IPS = ('127.0.0.1',) | |
# And it will change, then you will have to change INTERNAL_IPS again. | |
def show_toolbar(request): | |
if request.is_ajax(): | |
return False | |
return True | |
DEBUG_TOOLBAR_CONFIG = { | |
'SHOW_TOOLBAR_CALLBACK': 'config.local.show_toolbar', |
NOTE: This guide is ONLY for devs who don't want to edit their
yarn.lock
file by hand. If you don't care about that please carry on.
So you've pulled the latest master
git checkout master
git pull
import { URLS, PATH_NAME } from '../../src/constants/path' | |
import ENDPOINTS from '../../src/constants/endpoints' | |
// *********************************************** | |
// This example commands.js shows you how to | |
// create various custom commands and overwrite | |
// existing commands. | |
// | |
// For more comprehensive examples of custom | |
// commands please read more here: | |
// https://on.cypress.io/custom-commands |
/// <reference types="Cypress" /> | |
import { URLS, PATH_NAME } from '../../src/constants/path' | |
const projectId = 3 | |
const ids = { | |
layer: 'layer-add', | |
} | |
describe('Project', () => { |
/// <reference types="Cypress" /> | |
import { URLS, PATH_NAME } from '../../src/constants/path' | |
const projectId = 3 | |
const notExistProjectId = 9999 | |
const ids = { | |
close: 'close', | |
title: 'form-title', | |
subtitle: 'form-subtitle', |
import get from 'lodash/get' | |
import { isDevelopment } from 'utils/isDevelopment' | |
export const TEST_ID = { | |
components: { | |
LayerCard: { | |
image: 'components.LayerCard.image', | |
vector: 'components.LayerCard.vector', | |
cad: 'components.LayerCard.cad', | |
xyz: 'components.LayerCard.xyz', |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Chrome Canary", | |
"type": "chrome", | |
"request": "launch", | |
"url": "http://localhost:3000", | |
"webRoot": "${workspaceRoot}/src", | |
"sourceMapPathOverrides": { |
Cheng Lou, a former member of the React team, gave an incredible talk at React Europe 2016 entitled "On the Spectrum of Abstraction". That talk is available for viewing here: https://www.youtube.com/watch?v=mVVNJKv9esE
It's only a half-hour, but it is mind-blowing. It's worth re-watching two or three times, to let the ideas sink in.
I just rewatched the talk for some research, and wrote down a summary that's semi-transcript-ish. I didn't see any other transcripts for this talk, other than the auto-generated closed captions, so I wanted to share for reference.
// моожет быть либо id либо layer_id | |
// id может быть {'layer_id': 2} или {'label_id': 2} | |
// сунуть первым в лейбл с -- top_id (всегда int) - label_id; либо null (или вообще не приходит) - чтобы сунуть в корень на самый верх | |
// left_id может быть {'layer_id': 2} или {'label_id': 2} - узел с left_id будет НАД узлом с передаваемым id | |
// rename | |
/api/labels/5/ PATCH {'id': 1, 'name': 'NEW NAME AHAHA'} // новое имя | |
//move | |
/api/labels/5/ PUT {'id': {'layer_id': 2}, 'top_id': 3} |