Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP -- inline widgets & block editing modals #301

Merged
merged 167 commits into from
Jan 25, 2017
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
e0aca6b
wip pm 0.11.1
forresto Oct 10, 2016
23c342f
onChange
forresto Oct 11, 2016
66bdcf0
redo fixed menu
forresto Oct 19, 2016
195ecaf
update deps
forresto Nov 1, 2016
6af9191
Merge branch 'master' into pm-0-11-1
forresto Nov 1, 2016
409f816
up deps
forresto Nov 1, 2016
7ffbd0b
lint: give up on :deciduous_tree: comma-style
forresto Nov 1, 2016
2e658b5
old pm :ghost:
forresto Nov 1, 2016
a6c9fa5
up deps
forresto Dec 11, 2016
e5d8d8d
Merge branch 'master' into pm-0-11-1
forresto Dec 12, 2016
c7b5b41
up deps
forresto Dec 12, 2016
b7778d4
deps
forresto Dec 16, 2016
609a5db
eslint dangle
forresto Dec 16, 2016
a819594
eslint fix fixture
forresto Dec 16, 2016
944c3b4
inline media start :heart:
forresto Dec 16, 2016
d19ef9d
lint tweaks
forresto Dec 16, 2016
2419259
:tada: react widgets inline :relieved:
forresto Dec 16, 2016
c5d59fc
fix textarea-autosize initial height
forresto Dec 19, 2016
0c9620b
widgets inline :boom: #289
forresto Dec 20, 2016
3b71d5d
removeEventListener cleanup
forresto Dec 20, 2016
1fb2eb2
keymap command schema shuffle
forresto Dec 20, 2016
f68a2e2
rename EdSchema
forresto Dec 20, 2016
95d335e
keymap order fix li split
forresto Dec 20, 2016
f3d516c
insert from menu
forresto Dec 20, 2016
68e9e09
_replaceBlock and _insertBlocks
forresto Dec 20, 2016
be0a166
iframe key
forresto Dec 20, 2016
068fb12
cover safety
forresto Dec 20, 2016
ebcfbab
wrong state :flushed:
forresto Dec 21, 2016
744f34f
fixed-menu-hack new plugin
forresto Dec 21, 2016
43d5944
plugin destroy
forresto Dec 21, 2016
32eadb4
_insertBlocks expects array
forresto Dec 21, 2016
28a68ba
plugins/placeholder naïve
forresto Dec 21, 2016
917f883
plugins/share-url
forresto Dec 21, 2016
8c3e916
lint
forresto Dec 21, 2016
b9c9f2b
hide hints for now
forresto Dec 21, 2016
abe8c24
less renders for MediaNodeView
forresto Dec 21, 2016
f1e8a25
bad-behaving plugin!
forresto Dec 22, 2016
66214fb
plugins/placeholder decorations
forresto Dec 22, 2016
742dbb8
edStuff for plugin options
forresto Dec 22, 2016
ead53ae
:thought_balloon:
forresto Dec 22, 2016
b60b70d
rename some args
forresto Dec 22, 2016
07ff54e
fix a widget glitch
forresto Dec 22, 2016
f1902cb
focusedIndex default 0
forresto Dec 22, 2016
bd5f888
cleanup
forresto Dec 22, 2016
287b40c
move onMount
forresto Dec 22, 2016
4edc124
hr for "fold"
forresto Dec 22, 2016
3e823e7
start to fix tests :confetti_ball:
forresto Dec 22, 2016
798ad7f
fixed-menu-hack w/ pm 016
forresto Jan 2, 2017
9d9a84c
fix reinit fixed-menu-hack
forresto Jan 2, 2017
a25b215
boundSpaceContent
forresto Jan 2, 2017
310c3c0
boundSpaceContent :expressionless:
forresto Jan 2, 2017
d59757a
init with lastMenuHeight = 0
forresto Jan 2, 2017
e74ca47
don't need =>
forresto Jan 2, 2017
a95a085
placeholder for headings
forresto Jan 2, 2017
ee4939b
fix share-url store call
forresto Jan 2, 2017
9f5b675
update commands-interface
forresto Jan 2, 2017
9563285
patch deps
forresto Jan 2, 2017
5ad6ccd
GridToDoc spec: height and focus out
forresto Jan 2, 2017
c8747e5
remove PluginContentHints spec
forresto Jan 2, 2017
dad53a1
fix PluginPlaceholder spec
forresto Jan 2, 2017
4094f5a
PluginWidget spec
forresto Jan 2, 2017
17d3dad
PluginKey to get store from state
forresto Jan 3, 2017
c5cb65d
spec ed.execCommand
forresto Jan 3, 2017
78eacb8
lint
forresto Jan 3, 2017
3540521
2.0.0-0
forresto Jan 3, 2017
b162ef3
v2.0.0-0 prerelease changes
forresto Jan 3, 2017
adc6600
BREAKING -- use onMount
forresto Jan 5, 2017
59bf7ef
2.0.0-1
forresto Jan 5, 2017
df9de37
fix menuBar: false
forresto Jan 5, 2017
26c3c84
2.0.0-2
forresto Jan 5, 2017
40b8960
bump imgflo-url
forresto Jan 5, 2017
5af22ab
actually, state
forresto Jan 5, 2017
aa738a9
changes 2.0.0-3
forresto Jan 5, 2017
43b46fe
2.0.0-3
forresto Jan 5, 2017
547d4cc
disable _convertToFullPost
forresto Jan 6, 2017
2507d76
pm17
forresto Jan 6, 2017
e230f6a
pm17 change event
forresto Jan 6, 2017
8659a80
unused plugins
forresto Jan 6, 2017
b218e9e
pm17 plugins/placeholder
forresto Jan 6, 2017
d655688
pm17 store
forresto Jan 6, 2017
7f60fd5
pm17 plugins/share-url
forresto Jan 6, 2017
bc05e22
pm17 plugins/commands-interface
forresto Jan 6, 2017
b793f7f
pm17 execCommand
forresto Jan 6, 2017
1ebb224
pm17 _removeMediaBlock
forresto Jan 6, 2017
da6437b
up deps
forresto Jan 10, 2017
736432c
spec for empty content
forresto Jan 10, 2017
94795ff
url modal attached to menu
forresto Jan 10, 2017
410f237
prefill url-like selection; fix #288
forresto Jan 10, 2017
1fd65e5
lint
forresto Jan 10, 2017
0358d29
changes 2.0.0-4
forresto Jan 10, 2017
6bca820
2.0.0-4
forresto Jan 10, 2017
e0b501f
dist/.nojekyll for demo
forresto Jan 11, 2017
47282d6
Fix link menu form position
forresto Jan 11, 2017
8678b1a
React issue, `confirm` prop on `a`
forresto Jan 11, 2017
6c194de
don't listen focus to dismiss
forresto Jan 11, 2017
5747954
lint
forresto Jan 11, 2017
eb9282a
fix file drop
forresto Jan 11, 2017
df8c9ae
lint
forresto Jan 11, 2017
060124c
changes 2.0.0-5
forresto Jan 11, 2017
2da1962
2.0.0-5
forresto Jan 11, 2017
e76d211
Fixed menu hack only on iOS
forresto Jan 11, 2017
ff5b597
drop util tweaks
forresto Jan 12, 2017
50fb09f
don't need resize on focus
forresto Jan 12, 2017
630c238
lint
forresto Jan 12, 2017
038b3c5
no inline react textarea
forresto Jan 13, 2017
1f6cae5
revert widget view stuff
forresto Jan 13, 2017
485db1c
smaller images
forresto Jan 13, 2017
c73932b
Revert "revert widget view stuff"
forresto Jan 13, 2017
929c189
widget view unsalv cover fields
forresto Jan 13, 2017
7b91c2f
style tweaks
forresto Jan 16, 2017
560bb26
default block view: flex it
forresto Jan 17, 2017
eefd3da
widget border cleanup
forresto Jan 17, 2017
fffde87
widget select and move cursor
forresto Jan 17, 2017
16b9070
up deps
forresto Jan 18, 2017
eae8353
fix tests
forresto Jan 18, 2017
38636ec
lint
forresto Jan 18, 2017
a0983de
media click to select node
forresto Jan 18, 2017
a6266db
modal starting to work
forresto Jan 18, 2017
64b7371
open and close modal
forresto Jan 19, 2017
e5664c4
lint
forresto Jan 19, 2017
01d671f
modal bg click close
forresto Jan 19, 2017
92783ab
view failed, progress
forresto Jan 19, 2017
f5ce529
update inline view from modal editor
forresto Jan 19, 2017
1dc839d
big cta
forresto Jan 19, 2017
71da251
Merge pull request #304 from the-grid/refactor/editor-modals
Jan 19, 2017
b853751
ios position hack for modal
forresto Jan 19, 2017
3d9f9c1
changes 2.0.0-7 prerelease
forresto Jan 19, 2017
83eab99
2.0.0-6
forresto Jan 19, 2017
900d363
fix changes
forresto Jan 19, 2017
b638925
don't type over node
forresto Jan 19, 2017
319bf25
2.0.0-7
forresto Jan 19, 2017
2265f09
Merge branch 'master' into pm-0-11-1
forresto Jan 19, 2017
998efb5
update iframe tests
forresto Jan 19, 2017
238cf3c
lint
forresto Jan 19, 2017
5fe4859
fix node select focus bug
forresto Jan 19, 2017
a90a9b9
modal bg more alpha
forresto Jan 19, 2017
2d5b976
changes 2.0.0-8
forresto Jan 19, 2017
3f5c1be
2.0.0-8
forresto Jan 19, 2017
e1690a9
fix blur
forresto Jan 20, 2017
34e79b8
default coverPrefs
forresto Jan 20, 2017
a8e2340
don't select node on edit mouse
forresto Jan 20, 2017
bcbe8c9
widget style shuffle
forresto Jan 20, 2017
3b21c2e
refactor modal
forresto Jan 20, 2017
60570a8
scroll margin for footer
forresto Jan 20, 2017
4d6e16b
enter to close menu and modal
forresto Jan 20, 2017
42b1670
no select draggable
forresto Jan 20, 2017
934ecc0
iframe drag handle
forresto Jan 20, 2017
48b900d
select unsupported
forresto Jan 20, 2017
02d2cb7
delete block wording and close
forresto Jan 20, 2017
262c2db
simplify onMouseDown select
forresto Jan 20, 2017
3b02255
iframe widget name
forresto Jan 20, 2017
3fdd583
link 'Starts with http'
forresto Jan 20, 2017
6e65def
changes 2.0.0-9 prerelease
forresto Jan 21, 2017
2e8da44
2.0.0-9
forresto Jan 21, 2017
f4bf5c8
node v7.4.0
forresto Jan 21, 2017
259f53b
2.0.0-10
forresto Jan 21, 2017
1fcd890
Merge featureFlags from 1.4.x
forresto Jan 24, 2017
8df5b53
lint
forresto Jan 24, 2017
10973b4
ed.version; close #306
forresto Jan 24, 2017
4388f20
don't break layout with long url
forresto Jan 24, 2017
567c56a
url input
forresto Jan 24, 2017
8f44bcd
show type & link icon
forresto Jan 24, 2017
32af88e
make hr easier to tap #302
forresto Jan 24, 2017
ce0e454
attribution view
forresto Jan 24, 2017
909aa6c
changes
forresto Jan 24, 2017
4e8231c
2.0.0-11
forresto Jan 24, 2017
052aba5
changes 2.0.0
forresto Jan 25, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{ "parser": "babel-eslint"
, "ecmaFeatures": { "modules": true }
, "env":
{ "browser": true
, "node": true
, "es6": true
}
, "rules":
{ "no-multiple-empty-lines": [2, {"max": 2, "maxEOF": 1}]
, "no-console": 2
, "comma-style": [2, "first"]
, "camelcase": 0
, "indent": 0
}
, "plugins": ["react"]
, "extends": ["standard", "plugin:react/recommended"]
}
{
"parser": "babel-eslint",
"ecmaFeatures": { "modules": true },
"env": {
"browser": true,
"node": true,
"es6": true
},
"rules": {
"no-multiple-empty-lines": [2, {"max": 2, "maxEOF": 1}],
"comma-dangle": [2, "always-multiline"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not have done it in the same PR tho 😳

"no-console": 2,
"camelcase": 0
},
"plugins": ["react"],
"extends": ["standard", "plugin:react/recommended"]
}
78 changes: 39 additions & 39 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ function setup (options) {
apiJSON.value = JSON.stringify(options.initialContent, null, 2)
}
const props =
{ initialContent: (options.initialContent || [])
, onChange: () => { console.log('change') }
, onMount: () => { console.log('mount') }
, onShareFile: onShareFileDemo
, onShareUrl: onShareUrlDemo
, onRequestCoverUpload: onRequestCoverUploadDemo
, onPlaceholderCancel: onPlaceholderCancelDemo
, onCommandsChanged: (commands) => {}
, onDropFiles: onDropFilesDemo
, onDropFileOnBlock: onDropFileOnBlockDemo
, imgfloConfig: null
, widgetPath: './node_modules/'
, coverPrefs: { filter: false }
, menuBar: true
, ref:
{ initialContent: (options.initialContent || []),
onChange: () => { console.log('change') },
onMount: () => { console.log('mount') },
onShareFile: onShareFileDemo,
onShareUrl: onShareUrlDemo,
onRequestCoverUpload: onRequestCoverUploadDemo,
onPlaceholderCancel: onPlaceholderCancelDemo,
onCommandsChanged: (commands) => {},
onDropFiles: onDropFilesDemo,
onDropFileOnBlock: onDropFileOnBlockDemo,
imgfloConfig: null,
widgetPath: './node_modules/',
coverPrefs: { filter: false },
menuBar: true,
ref:
function (mounted) {
ed = mounted
console.log(ed)
window.ed = ed
}
},
}

mountApp(container, props)
Expand Down Expand Up @@ -113,10 +113,10 @@ function filesUploadSim (index, files) {
const updatedBlocks = ids.map(function (id, index) {
ed.updateProgress(id, {progress: null})
return (
{ id
, type: 'image'
, metadata: {title: names[index]}
}
{ id,
type: 'image',
metadata: {title: names[index]},
}
)
})
ed.setContent(updatedBlocks)
Expand All @@ -142,29 +142,29 @@ function onShareUrlDemo (share) {
function () {
console.log('Share: mount block')
ed.setContent([
{ id: block
, type: 'article'
, metadata:
{ title: 'Shared article title'
, description: `Simulated share from ${url}`
}
}
{ id: block,
type: 'article',
metadata:
{ title: 'Shared article title',
description: `Simulated share from ${url}`,
},
},
])
window.setTimeout(function () {
console.log('Share: mount block + cover')
ed.setContent([
{ id: block
, type: 'article'
, metadata:
{ title: 'Shared article title + cover'
, description: `Simulated share from ${url}`
}
, cover:
{ src: 'http://meemoo.org/images/meemoo-illo-by-jyri-pieniniemi-400.png'
, width: 400
, height: 474
}
}
{ id: block,
type: 'article',
metadata:
{ title: 'Shared article title + cover',
description: `Simulated share from ${url}`,
},
cover:
{ src: 'http://meemoo.org/images/meemoo-illo-by-jyri-pieniniemi-400.png',
width: 400,
height: 474,
},
},
])
}, 1000)
}
Expand Down
Loading