{"action":"created","issue":{"url":"https://api.github.com/repos/cotto89/ISMEditor/issues/13","repository_url":"https://api.github.com/repos/cotto89/ISMEditor","labels_url":"https://api.github.com/repos/cotto89/ISMEditor/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/cotto89/ISMEditor/issues/13/comments","events_url":"https://api.github.com/repos/cotto89/ISMEditor/issues/13/events","html_url":"https://github.com/cotto89/ISMEditor/issues/13","id":160136290,"number":13,"title":"EditorStore","user":{"login":"cotto89","id":11910950,"avatar_url":"https://avatars.githubusercontent.com/u/11910950?v=3","gravatar_id":"","url":"https://api.github.com/users/cotto89","html_url":"https://github.com/cotto89","followers_url":"https://api.github.com/users/cotto89/followers","following_url":"https://api.github.com/users/cotto89/following{/other_user}","gists_url":"https://api.github.com/users/cotto89/gists{/gist_id}","starred_url":"https://api.github.com/users/cotto89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cotto89/subscriptions","organizations_url":"https://api.github.com/users/cotto89/orgs","repos_url":"https://api.github.com/users/cotto89/repos","events_url":"https://api.github.com/users/cotto89/events{/privacy}","received_events_url":"https://api.github.com/users/cotto89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cotto89/ISMEditor/milestones/2","html_url":"https://github.com/cotto89/ISMEditor/milestones/v0.01","labels_url":"https://api.github.com/repos/cotto89/ISMEditor/milestones/2/labels","id":1821187,"number":2,"title":"v0.01","description":null,"creator":{"login":"cotto89","id":11910950,"avatar_url":"https://avatars.githubusercontent.com/u/11910950?v=3","gravatar_id":"","url":"https://api.github.com/users/cotto89","html_url":"https://github.com/cotto89","followers_url":"https://api.github.com/users/cotto89/followers","following_url":"https://api.github.com/users/cotto89/following{/other_user}","gists_url":"https://api.github.com/users/cotto89/gists{/gist_id}","starred_url":"https://api.github.com/users/cotto89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cotto89/subscriptions","organizations_url":"https://api.github.com/users/cotto89/orgs","repos_url":"https://api.github.com/users/cotto89/repos","events_url":"https://api.github.com/users/cotto89/events{/privacy}","received_events_url":"https://api.github.com/users/cotto89/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":5,"state":"open","created_at":"2016-06-11T04:57:48Z","updated_at":"2016-06-19T06:18:33Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-06-14T09:29:50Z","updated_at":"2016-06-19T15:38:19Z","closed_at":null,"body":"Store\r\n======\r\n\r\n* EditorState\r\n* Stateの更新処理\r\n* [idea]Immutable.js\r\n\r\nstate\r\n-------\r\n\r\n```js\r\nthis.state = {\r\n  caretPosition: [0, 0], // not work\r\n  readOnly: false,\r\n  raw: '',\r\n  blocks: [\r\n    {\r\n       id: NodeBlock_1,\r\n       isFocusing: false,\r\n       raw: \"# heading\",\r\n       node: {...}\r\n    }\r\n  ],\r\n};\r\n    ....\r\n]\r\n```\r\n\r\n# ActionHandler\r\n\r\n* [x] onUpdateNodeBlock\r\n* [x] addEmptyNodeBlockOrNewLine\r\n* [x] addEmptyNodeBlock\r\n* [x] addNewLine\r\n* [x] onRemoveNodeBlock\r\n* [x] onRefleshNodeBlock\r\n* [ ] onUndo / onRedo\r\n* [x] onFocusNodeBlock / onBlurNodeBlock\r\n* [ ] onToggleEditorEditableMode\r\n\r\n\r\n## onUpdateNodeBlock({id, text})\r\n\r\n* 全体のrawの更新\r\n* NodeBlockのrawを更新\r\n\r\n## onAddNodeBlock(id?)\r\n\r\n* idがあればidの次のNodeBlockの次にemptyNodeBlockを追加\r\n* idがなければNodeBlocksの最後に追加\r\n\r\n## onRemoveNodeBlock(id)\r\n\r\n* idのNodeBlockを削除\r\n\r\n## onRefleshNodeBlock\r\n\r\n* rawからEditorStateを再生成\r\n\r\ncutやpasteが発生した場合にNodeBlockを跨いでの更新になることが予想されるので全体をparserで再計算する。\r\n\r\n\r\n## onUndo / onRedo\r\n\r\nalt-utils/TImeTravelだとfocus/blur等のpayloadまで捕捉されてしまうので、実装を参考に適切なpayloadだけをsnapshot/bootstrapする。\r\n\r\n## onFocusNodeBlock / onBlurNodeBlock\r\n\r\n* isFocusingのtoggle\r\n\r\n## onToggleEditorEditableMode\r\n\r\n* ISMEditor自体のcontentEditable属性のtoggle"},"comment":{"url":"https://api.github.com/repos/cotto89/ISMEditor/issues/comments/227003774","html_url":"https://github.com/cotto89/ISMEditor/issues/13#issuecomment-227003774","issue_url":"https://api.github.com/repos/cotto89/ISMEditor/issues/13","id":227003774,"user":{"login":"cotto89","id":11910950,"avatar_url":"https://avatars.githubusercontent.com/u/11910950?v=3","gravatar_id":"","url":"https://api.github.com/users/cotto89","html_url":"https://github.com/cotto89","followers_url":"https://api.github.com/users/cotto89/followers","following_url":"https://api.github.com/users/cotto89/following{/other_user}","gists_url":"https://api.github.com/users/cotto89/gists{/gist_id}","starred_url":"https://api.github.com/users/cotto89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cotto89/subscriptions","organizations_url":"https://api.github.com/users/cotto89/orgs","repos_url":"https://api.github.com/users/cotto89/repos","events_url":"https://api.github.com/users/cotto89/events{/privacy}","received_events_url":"https://api.github.com/users/cotto89/received_events","type":"User","site_admin":false},"created_at":"2016-06-19T15:38:18Z","updated_at":"2016-06-19T15:38:18Z","body":"# addEmptyNodeBlockOrNewLine, addEmptyNodeBlock, addNewLine\r\n\r\n* 改行判定処理\r\n\r\naddEmptyNodeBlockOrNewLineでvalidationを実施してaddEmptyNodeBlockとaddNewLineを判断している\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"cotto89"}}