782 Commits

Author SHA1 Message Date
Shawn Erquhart
cd0254407e migrate Block.create to specify children 2017-10-04 15:48:33 -04:00
Shawn Erquhart
a5c1bb2bff migrate to new slate packages 2017-10-04 15:48:33 -04:00
Shawn Erquhart
a5b053e1c3 remove deprecated terse serialization option 2017-10-04 15:48:32 -04:00
Shawn Erquhart
99673ee3cc support code blocks with multiple text nodes 2017-10-04 15:48:32 -04:00
Shawn Erquhart
bbf165d3b0 migrate text nodes to use ranges 2017-10-04 15:48:32 -04:00
Shawn Erquhart
7a219bb833 migrate from Raw serializer to fromJSON/toJSON 2017-10-04 15:48:32 -04:00
Shawn Erquhart
155a0f972e migrate from onDocumentChange to onChange 2017-10-04 15:48:32 -04:00
Shawn Erquhart
2448ed918a remove undo/redo override, fixed in 0.22 2017-10-04 15:48:32 -04:00
Shawn Erquhart
af2eb78e2b migrate from transform API to change API 2017-10-04 15:48:32 -04:00
Darrel O'Pry
2617621a47 Remove unused urlize 2017-10-04 12:37:54 -04:00
Caleb
57202376ba Update tests.
Thanks @dopry!
2017-10-03 20:27:42 -06:00
Caleb
793afc8b73 Remove mutation from sanitizeIRI. 2017-10-03 20:27:30 -06:00
Caleb
fdc4054fbd Remove recursion for sanitizeIRI replacement checking. 2017-10-03 19:21:58 -06:00
Caleb
451c69cb87 Fix alternate replacement not always working in sanitizeSlug. 2017-10-03 18:46:12 -06:00
Caleb
b8006bbcbe Update slug sanitization errors. 2017-10-03 18:11:45 -06:00
Darrel O'Pry
ddcf009fc6 add sanitizeSlug tests. 2017-10-03 19:28:28 -04:00
Caleb
2b64fbfba6 Allow empty options object for sanitizeSlug. 2017-10-03 16:16:24 -06:00
Caleb
716f55cd8e Make sure sanitizeIRI replacement character is safe. 2017-10-03 16:15:53 -06:00
Caleb
476ff2e1ab Add tests for sanitizeIRI. 2017-10-03 16:15:52 -06:00
Caleb
f40f58b7dd Add default replacment to sanitizeIRI. 2017-10-03 16:15:52 -06:00
Caleb
be28f895bc Document slug sanitizing functions. 2017-10-03 16:15:51 -06:00
Caleb
8fb326ff2b Make sanitizeSlug immutable.
Thanks @erquhart!
2017-10-03 16:15:42 -06:00
Caleb
72492749d9 Move slug sanitizer to a seperate function. 2017-10-03 13:03:28 -06:00
Caleb
4e5a004010 Make ucschars regex smaller. 2017-10-03 13:03:27 -06:00
Caleb
9bc65cd0ac Re-implement standard slugification with IRIs instead of URIs. 2017-10-03 13:03:26 -06:00
Caleb
8a2b4fc843 Sanitize entire slug instead of just parts. 2017-10-03 13:03:26 -06:00
Caleb
d895112f9d Replace spaces in slugs/filenames with dashes. 2017-10-03 13:03:25 -06:00
Caleb
d21de7e82e Remove periods from filenames/slugs. 2017-10-03 13:03:25 -06:00
Caleb
51b89cc84b Switch from slug to sanitize-filename. 2017-10-03 13:03:22 -06:00
Caleb
5bb9784807 Update react-toolbox CSS to be a full copy. 2017-10-02 19:31:07 -06:00
Shawn Erquhart
8ebfd675ba update to react-toolbox 2.0 beta 2017-10-02 19:31:06 -06:00
Caleb
2ac54cb778 Merge pull request #643 from netlify/upgrade-ui-deps
Upgrade UI dependencies.
2017-10-02 18:55:34 -06:00
Caleb
9075a87c9d Upgrade react-notifications. 2017-10-02 16:44:32 -06:00
Caleb
9053c1841f Upgrade react-transition-group. 2017-10-02 16:43:30 -06:00
Caleb
b80c417429 Switch to a smaller/faster TOML parser. 2017-10-01 17:21:23 -06:00
Shawn Erquhart
d1b25851fd Merge pull request #629 from netlify/editor-fast-follow
editor fast follow
2017-09-29 13:05:27 -04:00
Caleb
cd35289dbc Upgrade depreciated transitions addon to react-transition-group.
v1 of `react-transition-group` is a drop-in replacement.
2017-09-28 13:27:05 -06:00
Shawn Erquhart
e2232e1067 improve markdown entity escaping perf 2017-09-26 16:35:01 -04:00
Shawn Erquhart
3a7594722c fix file collection persist (#628) 2017-09-26 13:20:03 -07:00
Shawn Erquhart
516a5e4c7f improve markdown editor serialization debounce 2017-09-26 15:52:50 -04:00
Shawn Erquhart
9e0d7696ee stop remark from decoding HTML entities 2017-09-26 15:27:34 -04:00
Shawn Erquhart
d3c12db8ef fix soft break support 2017-09-26 14:50:56 -04:00
Shawn Erquhart
7bcb16d5e6 fix nested field updates 2017-09-26 14:50:56 -04:00
Shawn Erquhart
fddbf8f7f0 disable auto-conversion of markdown urls to links 2017-09-26 14:50:56 -04:00
Shawn Erquhart
30a762cec1 improve markdown entity escaping for visual editor 2017-09-26 14:50:56 -04:00
Shawn Erquhart
e25ec098f6 fix editor parsing of styled inline code 2017-09-26 14:50:56 -04:00
Shawn Erquhart
70a4a51b97 add inline image support for editor 2017-09-26 14:50:56 -04:00
Shawn Erquhart
e937e8e626 handle markdown styled inline nodes
Slate does not allow inline nodes like links and
images to have marks (like strong, emphasis). This
commit changes the parsers to process these nodes
as if they were text nodes so that marks are
handled.
2017-09-26 14:50:56 -04:00
Shawn Erquhart
2d3bf9b3fc fix verbose markdown entity output
Because we convert markdown to an AST, the literal input
cannot be reconstructed, so we have to default to improving
received markdown rather than degrading it. This fix
implements smart MDAST parsing to ensure that adjacent
nodes with the same styling (strong, emphasis, etc) are
grouped together rather than separated (which results in
verbose output).
2017-09-26 14:50:56 -04:00
Shawn Erquhart
91590a2f25 remove pedantic markdown parsing 2017-09-26 14:50:56 -04:00
Shawn Erquhart
e54dee4220 allow links to be wrapped in marks 2017-09-26 14:50:56 -04:00
Shawn Erquhart
cd111f3a3d distinguish between newline and soft break in editor 2017-09-26 14:50:56 -04:00
Darrel O'Pry
1f06885a69 Add code coverage output generation to npm test (#610) 2017-09-20 12:23:40 -07:00
Shawn Erquhart
1def72e93b Merge pull request #601 from tech4him1/upgrade-gray-matter
Switch back to `gray-matter` for front-matter parsing.
2017-09-19 12:38:51 -04:00
Shawn Erquhart
1fa949395f Add branch selection support for git gateway (#618) 2017-09-18 14:56:49 -07:00
Caleb
2c8e8bece0 Fix collections breaking if folder has trailing slash. 2017-09-18 08:27:49 -06:00
Caleb
9f40edaf52 Re-add ability to parse frontmatter like ---json. 2017-09-15 19:22:04 -06:00
Caleb
335dd15e6d Fix JSON parser for gray-matter. 2017-09-15 19:22:04 -06:00
Caleb
ebf91a9800 Switch back to gray-matter for front-matter parsing. 2017-09-15 19:22:04 -06:00
Caleb
ab8226ce63 Infer front-matter type on our own. 2017-09-15 19:22:04 -06:00
Shawn Erquhart
d349c3d3b1 Merge pull request #590 from netlify/update-depreciated-deps
Upgrade Depreciated React Dependencies
2017-09-15 16:18:24 -04:00
Shawn Erquhart
63b874e295 Merge pull request #576 from netlify/entry-disable-save
Disable "Save" button when entry has not been changed.
2017-09-15 16:12:34 -04:00
Benaiah Mischenko
9f4951fcf2 Fix entry deletion on non-master branches 2017-09-14 17:32:18 -07:00
Caleb
6e356e81da Update tests for EntryEditorToolbar 2017-09-11 14:25:23 -06:00
Caleb
87f942e73b Rename hasChanged to enableSave for the editor Save button. 2017-09-11 14:08:07 -06:00
Caleb
5e9112ec71 Upgrade to seperate create-react-class library.
`React.createClass` was split off/depreciated as of 15.5.0:
https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.createclass
2017-09-09 20:18:02 -06:00
Caleb
654f844b86 Upgrade to seperate React prop-types library.
`propTypes` was seperated/depreciated from React as of 15.5.0:
https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.proptypes
2017-09-09 20:16:19 -06:00
Caleb
df3d8754c8 Show user avatar for git-gateway backend as well. 2017-09-08 09:02:48 -06:00
Shawn Erquhart
cd6162c3d2 git gateway implementation tweaks 2017-09-06 18:28:20 -07:00
Mathias Biilmann Christensen
bea470518e Make sure we always set a name on commits 2017-09-06 18:14:59 -07:00
Mathias Biilmann Christensen
2e4dfb33b6 Add explicit sign in button for netlify identity 2017-09-06 17:58:32 -07:00
Mathias Biilmann Christensen
aaa9d2ab95 Make Neltify CMS work with Netlify Identity Widget
When Netlify CMS uses the git-gateway backend, it will check for a

  window.netlifyIdentity

object and use that to handle the whole auth flow.

This also sets defaults for the git-gateway endpoint, that means it
can be used in templates with zero configuration and fit with a
one-click deploy to Netlify approach.

Netlify Identity itself is based on our open-source GoTrue microservice,
and Netlify's Git Gateway project is completely open-source as well.

The git-gateway backend will work with Netlify without any setup, but can
also be configured to work with any selfhosted GoTrue and Git Gateway
instances.
2017-09-06 13:52:11 -07:00
Mathias Biilmann Christensen
36f2596a9e Use netlify identity widget for auth if present 2017-09-06 13:50:02 -07:00
Shawn Erquhart
128588fd69 auth and asset setup tweaks 2017-09-06 09:35:31 -07:00
Mathias Biilmann Christensen
0b793cbc65 Fix reference to window.identity 2017-09-05 19:30:03 -07:00
Mathias Biilmann Christensen
1a25b2c6b3 Better handling of roles and names 2017-09-05 16:48:51 -07:00
Mathias Biilmann Christensen
a6b1b3f0a7 Fix open tag in auth page 2017-09-05 14:15:40 -07:00
Mathias Biilmann Christensen
bba34e5979 Use identity widget for auth if present 2017-09-05 14:07:56 -07:00
Mathias Biilmann Christensen
890ee3d7e3 Update old netlify-auth-js to gotrue-js 2017-09-05 13:24:16 -07:00
Mathias Biilmann Christensen
d6443036df Fix asset store uploads with no file type 2017-09-04 23:26:25 -07:00
Mathias Biilmann Christensen
30aa880ed2 Make sure there's a form so enter logs in for netlify auth 2017-09-04 23:24:57 -07:00
Caleb
75aa52a650 Disable Save button when entry has not been changed. 2017-09-02 19:24:37 -06:00
Shawn Erquhart
75023d9f74 close rte heading block on enter keydown 2017-09-01 15:16:51 -04:00
Shawn Erquhart
c25a7c4abb debounce markdown editor change handler 2017-09-01 15:16:51 -04:00
Shawn Erquhart
4821959951 remove markdown widget serializers 2017-09-01 15:16:51 -04:00
Shawn Erquhart
6ed11a7da7 update markdown parsing tests 2017-08-31 12:06:54 -04:00
Shawn Erquhart
e408dcc27e add markdown editor soft break support 2017-08-31 11:03:08 -04:00
Shawn Erquhart
e43edf67b9 Merge pull request #567 from netlify/escape-markdown
escape markdown entities entered as literal text
2017-08-30 10:44:43 -04:00
bruce-one
5dfc0f0f24 Number editor return number. (#541)
Adding support for `min`, `max`, `step` on the input element and adding
`valueType` for specifying the return type, so the `NumberControl` can
return actual numbers.
2017-08-29 19:30:05 -07:00
Shawn Erquhart
8e805cabd8 escape markdown entities entered as literal text 2017-08-29 17:54:52 -04:00
Caleb
74662cb4bd Do not close entry if it failed to save or delete. 2017-08-29 12:22:48 -06:00
Shawn Erquhart
0ea62e0f9d fix rte pasted links with leading/trailing spaces 2017-08-25 16:45:01 -04:00
Shawn Erquhart
317a876891 fix html paste for visual editor 2017-08-25 16:36:24 -04:00
Shawn Erquhart
9c0b7262ef fix small code issues in RTE implementation 2017-08-25 16:36:22 -04:00
Shawn Erquhart
3d83325afc add node type check to avoid errors in rte 2017-08-25 16:35:25 -04:00
Shawn Erquhart
2bb67321f9 fix visual editor heading line height 2017-08-25 16:35:24 -04:00
Shawn Erquhart
18b98fc1c9 remove superfluous deps, update yarn.lock 2017-08-25 16:35:23 -04:00
Shawn Erquhart
d84b156b0a update existing serialization tests 2017-08-25 16:31:09 -04:00
Shawn Erquhart
cf2b7be25f refactor and document rte serializers 2017-08-25 16:31:09 -04:00
Shawn Erquhart
406ae57d3e add blockquote rte button 2017-08-25 16:31:09 -04:00