- В каком состоянии бекенд?
- В каком состоянии работа над дизайном?
- Какие браузеры поддерживаем?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // <script async src="https://...?lang=ru_RU&load=&onload=_onYandexMapLoaded"></script> | |
| // or use module aload instead of async attribute (github.com/pazguille/aload) | |
| (function () { | |
| var ymapFunctionsStack = []; | |
| var ymapsLoaded = false; | |
| // random postfix to get uniq function name | |
| window._onYandexMapLoaded = function () { | |
| ymapsLoaded = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as pick from 'lodash/pick'; | |
| import * as React from 'react'; | |
| import { MobileWebsiteApi } from '../api/api'; | |
| import { FixedComponentsStore } from '../components/fixed/store'; | |
| import { CookiesUtils } from '../utils/cookies'; | |
| // экспортируем типы контекста, чтобы было удобней импортировать | |
| // import { connect, MobileWebsiteApi } from '../../utils/context_provider'; | |
| export { MobileWebsiteApi, FixedComponentsStore, CookiesUtils }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from 'react' | |
| // TLDR: This component load icons async on client but sync on server | |
| export default class Icon extends React.PureComponent { | |
| constructor(props) { | |
| super(props) | |
| // We should add DefinePlugin to webpack which replace | |
| // process.env.IS_SERVER_SIDE with true or false. | |
| // Then UglifyJS will remove require() in client code so icons won't be loaded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs') | |
| const posthtml = require('posthtml') | |
| function merge(...objs) { | |
| return Object.assign({}, ...objs) | |
| } | |
| function removeAttr(attr, tree) { | |
| tree.match({ attrs: { [attr]: true } }, node => { | |
| return merge(node, { attrs: merge(node.attrs, { [attr]: undefined }) }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Main | |
| console.log : Show a => a -> IO () | |
| console.log = printLn | |
| createComponent : Show a => String -> a -> String | |
| createComponent tag content = "<" ++ tag ++ ">" ++ show content ++ "</" ++ tag ++ ">" | |
| syntax [arr] ".map" [f] = map f arr | |
| syntax [arr] ".forEach" [f] = traverse f arr |
- Нужно предусматривать состояние ошибки для всех действий, требующих запроса на бекенд
- Нужно предусматривать состояние успеха для всех действий
- Нужно предусматривать состояние загрузки для всех действий, которые не выполняются мгновенно
- Или показывать вместо этого успешное выполнение, и предусмотреть переход в состояние ошибки, если ошибка всё же произойдёт
- Для каждого поля должно быть состояние ошибки валидации
- Нельзя оставлять придумывание текстов ошибок на программистов, иначе рождаются монстры типа «Форма не должна иметь пустых полей»
- Должно быть прописано, когда происходит валидация полей: при вводе, при переходе на следующее поле или при отправке формы
- Должно быть прописано, когда исчезает ошибка, полученная при валидации: при фокусе на поле, при изменении текста в поле, при отправке формы или при вводе валидного значения
- Для полей ввода должно быть нарисованно состояние фокуса
- Для кнопок должно быть нарисованно состояние фокуса (focus), наведения (hover), нажатия (active),
I hereby claim:
- I am nitive on github.
- I am maxim_samoilov (https://keybase.io/maxim_samoilov) on keybase.
- I have a public key ASBC725xKuReURyZObjW6ieAuCx7ojFJSPC0iSFPp47AHAo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function addHandler(fn, arg, resolve, reject) { | |
| try { | |
| const result = fn(arg); | |
| if (result instanceof MyPromise) { | |
| result.then(resolve).catch(reject); | |
| } else { | |
| process.nextTick(() => resolve(result)); | |
| } | |
| } catch (err) { | |
| process.nextTick(() => reject(err)); |
OlderNewer