782 Commits

Author SHA1 Message Date
Shawn Erquhart
9dcda7b0b9 organize serializers 2017-08-25 16:31:09 -04:00
Shawn Erquhart
dd51f6365c improve visual editor content styling 2017-08-25 16:31:09 -04:00
Shawn Erquhart
1d654662d2 improve shortcode handling in visual editor 2017-08-25 16:31:09 -04:00
Shawn Erquhart
ca60a6b8c9 update Slate shortcode handling to include paragraph 2017-08-25 16:31:09 -04:00
Shawn Erquhart
9174e56414 refactor remarkToRehypeShortcodes 2017-08-25 16:31:09 -04:00
Shawn Erquhart
be7385de29 refactor remark-shortcodes plugin 2017-08-25 16:31:07 -04:00
Shawn Erquhart
6377d8c73e initial refactor, some bugfixes 2017-08-25 16:30:39 -04:00
Shawn Erquhart
1f961d36cf display images inserted through rte 2017-08-25 16:30:39 -04:00
Shawn Erquhart
336cab2592 fix html whitespace truncation 2017-08-25 16:30:39 -04:00
Shawn Erquhart
750fbf5e3d re-implement visual editor link button 2017-08-25 16:30:39 -04:00
Shawn Erquhart
28ee67c35e eliminate unnecessary editor renders 2017-08-25 16:30:39 -04:00
Shawn Erquhart
de1e36108d allow yaml frontmatter parsing 2017-08-25 16:30:39 -04:00
Shawn Erquhart
7a744bef84 improve list handling 2017-08-25 16:30:39 -04:00
Shawn Erquhart
ae7bd79c7a re-implement visual editor html paste 2017-08-25 16:30:39 -04:00
Shawn Erquhart
82d9bdd7ae port history shortcuts from Slate, force focus 2017-08-25 16:30:39 -04:00
Shawn Erquhart
4ac63954ca fix focus update on toolbar block click 2017-08-25 16:30:39 -04:00
Shawn Erquhart
6443f5d808 allow enter key to make space around void nodes 2017-08-25 16:30:39 -04:00
Shawn Erquhart
fbecc887b8 require images to be parsed as shortcodes 2017-08-25 16:30:39 -04:00
Shawn Erquhart
dbf14a8f7b re-enable shortcode insertion via toolbar 2017-08-25 16:30:38 -04:00
Shawn Erquhart
b7379b019e re-implement shortcode parsing to/from mdast 2017-08-25 16:30:38 -04:00
Shawn Erquhart
c95f06138a fix soft break side effects 2017-08-25 16:30:38 -04:00
Shawn Erquhart
842c2935e9 use mdast instead of html for rte local model
markdown is currently serialized to html at load time,
which makes it near impossible to support arbitrary html
in the markdown. This also means we're stringifying to
html on every change.

This commit moves to Remark's MDAST for local serialization,
including parsing from MDAST to Slates's Raw AST. It brings
much more control over the editing experience and full
support for processing unescaped HTML.
2017-08-25 16:30:37 -04:00
Shawn Erquhart
93687d9157 add shortcodes through rte toolbar 2017-08-25 16:28:18 -04:00
Shawn Erquhart
469a50afa4 add idempotent markdown/html shortcode handling 2017-08-25 16:28:18 -04:00
Shawn Erquhart
63e93d79ca improve rte list handling 2017-08-25 16:28:18 -04:00
Shawn Erquhart
31c997897f fix inline code serializing to blocks 2017-08-25 16:28:18 -04:00
Shawn Erquhart
0e50210dcf close blocks on backspace 2017-08-25 16:28:18 -04:00
Shawn Erquhart
09751efe41 allow raw html in markdown 2017-08-25 16:28:18 -04:00
Shawn Erquhart
f22d09b781 add smart soft breaks for visual editor 2017-08-25 16:28:18 -04:00
Shawn Erquhart
fe3d04b722 streamline raw editor pasting 2017-08-25 16:28:18 -04:00
Shawn Erquhart
24caeadfa4 add list and code toolbar buttons 2017-08-25 16:28:17 -04:00
Shawn Erquhart
ae56ef6dda convert raw editor to Slate 2017-08-25 16:28:17 -04:00
Shawn Erquhart
719c105844 remove logic from raw markdown editor 2017-08-25 16:28:17 -04:00
Shawn Erquhart
b08a9fcaa8 improve Dropbox Paper paste handling 2017-08-25 16:28:17 -04:00
Shawn Erquhart
c49d84b2eb add empty node and Paper emoji unified plugins 2017-08-25 16:28:17 -04:00
Shawn Erquhart
a8fe57e5d6 pre-process visual editor pastes w/ unified 2017-08-25 16:28:17 -04:00
Shawn Erquhart
5a664f8be1 remove prosemirror, reuse unified pipelines 2017-08-25 16:28:17 -04:00
Shawn Erquhart
cba631ba1a improve visual/raw editor consistency 2017-08-25 16:25:30 -04:00
Shawn Erquhart
5cbc76da68 improve rte pasting 2017-08-25 16:24:13 -04:00
Shawn Erquhart
54e77bd80c fix raw editor formatting controls 2017-08-25 16:24:13 -04:00
Shawn Erquhart
faec38ac19 fix raw editor paste parsing 2017-08-25 16:24:13 -04:00
Shawn Erquhart
e0ca24c6d3 add unified config module 2017-08-25 16:24:13 -04:00
Shawn Erquhart
09e631ded7 allow nested widget previews to update 2017-08-25 16:24:13 -04:00
Shawn Erquhart
84ed450ac6 add visual editor serializer source doc 2017-08-25 16:24:13 -04:00
Shawn Erquhart
ffbd8d22cc expose widgetValueSerializer registry 2017-08-25 16:24:13 -04:00
Shawn Erquhart
1c0bb6a877 implement widget data serialization for rte perf 2017-08-25 16:24:13 -04:00
Shawn Erquhart
bc721337de set rte focus after toolbar click 2017-08-25 16:24:13 -04:00
Shawn Erquhart
22a8da11a4 fix rte link serialization 2017-08-25 16:24:13 -04:00
Shawn Erquhart
e682189410 only render editor page controls/previews on change 2017-08-25 16:24:13 -04:00
Shawn Erquhart
e01c077efb fix empty initial state for rte 2017-08-25 16:24:12 -04:00
Shawn Erquhart
9c869be8fa migrate visual editor from prosemirror to slate 2017-08-25 16:24:12 -04:00
Shawn Erquhart
49b3a62823 attempt prosemirror update, troubleshooting 2017-08-25 16:24:12 -04:00
Shawn Erquhart
e7ac3a7671 switch remark options to use gfm, fences 2017-08-25 16:24:12 -04:00
Shawn Erquhart
b293b235bb fix link creation in visual editor 2017-08-25 16:24:12 -04:00
Shawn Erquhart
bd767308cd fix visual editor tests, parse/serialize consistency 2017-08-25 16:24:12 -04:00
Shawn Erquhart
b22323201d handle raw editor html pastes with unified 2017-08-25 16:24:12 -04:00
Shawn Erquhart
b5e0be43f2 split off markdownToProseMirror plugin 2017-08-25 16:24:12 -04:00
Shawn Erquhart
361c3d5284 improve prosemirror parser, fix new doc creation 2017-08-25 16:24:12 -04:00
Shawn Erquhart
8bb18452e8 implement initial unified/remark preview update 2017-08-25 16:24:12 -04:00
Shawn Erquhart
5048c7ca1d convert editor component registry to Map 2017-08-25 16:24:12 -04:00
Shawn Erquhart
adcb215fbd replace remark with unified for docs and extensibility 2017-08-25 16:24:12 -04:00
Shawn Erquhart
514fbb30b8 render plugins on visual editor load 2017-08-25 16:24:12 -04:00
Shawn Erquhart
e401f7ef9b remove unrelated code style improvements 2017-08-25 16:24:12 -04:00
Shawn Erquhart
f93aa34105 fix rebase incongruencies 2017-08-25 16:24:12 -04:00
Kyle Mathews
8763666570 Update parser to support remaining node types + add inline styled text support 2017-08-25 16:24:12 -04:00
Kyle Mathews
0eb109cb73 Convert markdown-prosemirror parser/compiler to Remark 2017-08-25 16:24:12 -04:00
Kyle Mathews
24c0a1bdb4 Replace markup-it with Remark for rendering markdown in the editor preview 2017-08-25 16:24:12 -04:00
Shawn Erquhart
0dd173a83f rename isCollaborator to hasWriteAccess 2017-08-20 16:02:57 -04:00
Caleb
6df35a2f30 Fix denied login for users with many repos.
`isCollaborator` was created in #491 to block login if a user did not have write (push) permissions to a repo, by going through the list of a users repos until it found the right one. It did not institute pagination, however, so if a user had enough repos that the one in question was on another page, the CMS would assume that they did not have permission and block the login.

This commit fixes the problem by calling the API for the specific repo instead of getting the whole list.
2017-08-19 18:07:09 -06:00
Caleb
37f6e7bac5 Fix deletion for the test-repo backend.
Deletion was added in #485, but the function for the `test-repo` backend
was `deleteEntry` instead of `deleteFile` like it was supposed to be.

Also, setting the key for a deleted file to `undefined` did not really
remove that file from the object, so there were then errors stating
`file.content` is not defined. `delete`ing the "file" from the object
fixes this bug.
2017-08-17 13:25:54 -06:00
Shawn Erquhart
5020d3d0e5 Merge pull request #528 from netlify/fix-confusing-yaml-vs-yml-format-distinction
Fix confusing "yaml/yml" distinction in formats.js
2017-08-17 13:09:47 -04:00
Shawn Erquhart
14be00be90 Merge pull request #507 from netlify/fix-post-save-error
Fix runtime error on saving post in editorial workflow
2017-08-17 11:52:54 -04:00
Benaiah Mischenko
30dcc2bdf0 Fix confusing "yaml/yml" distinction in formats.js
Makes "yml" and "yaml" synonyms for both file extensions and format
settings.
2017-08-15 14:42:55 -07:00
Benaiah Mischenko
b3b13d311c Make GitHub repo name comparison case-insensitive (fixes #510) 2017-08-11 12:19:01 -07:00
tortilaman
6805a6936d Prevent unauthorized CMS access (#323) and enable use of GitHub Enterprise (#491)
* Prevent unauthorized CMS access and enable use of GitHub Enterprise
2017-08-01 20:28:03 -07:00
Benaiah Mischenko
fda2f2269d Fix runtime error on saving post in editorial workflow
The removed `dispatch(closeEntry)` is handled in the code that's been
erroring out (located in `containers/EntryPage.js`). User-visible
functionality is identical.
2017-08-01 19:48:15 -07:00
Damien Van Der Windt
b294110db7 Stopped the pluralization of collection name (#503) 2017-07-27 11:13:34 -07:00
Shawn Erquhart
56e63b6573 Merge pull request #493 from Dammmien/fix_list_item_reordering
Fix list item reordering #437
2017-07-25 08:45:23 -04:00
Damien Duhamel
1b3aec4ebf Add some comments 2017-07-25 10:28:35 +02:00
Damien Duhamel
4d2ed6b1ea Check editor value after update 2017-07-23 19:38:05 +02:00
Benaiah Mischenko
dac57c60a0 Entry deletion for the simple workflow (#485) 2017-07-21 23:40:33 -07:00
Shawn Erquhart
aebf28b881 allow registered widget controls to be reused 2017-07-10 15:01:02 -04:00
Shawn Erquhart
72a661d132 pass more contextual data to preview components 2017-07-10 15:01:01 -04:00
Shawn Erquhart
324340135b lengthen relation search debounce to reduce lag 2017-07-10 15:01:01 -04:00
Jerry Holmes
cc93ad87dc Encode URI of image path for card view vs. normalizePath replace (#474) 2017-07-10 10:36:07 -07:00
Drian Hillman
4c35e39a59 Refactors a portion to access this Data Structure more effectively 2017-07-03 20:37:19 -04:00
Drian Hillman
a8ebba2cf2 adds context to new list item button 2017-07-01 13:52:46 -04:00
Shawn Erquhart
66a683bef1 hide hidden widget in object and list controls 2017-06-28 16:12:35 -04:00
Eamonn Bell
e51071abf4 Change .find() predicate to not reject field names based on spurious whitespace. 2017-06-22 21:49:31 +01:00
Eamonn Bell
3e105b3089 Fix indentation. 2017-06-22 21:39:32 +01:00
Eamonn Bell
a4e324201d Refactor indentifer field find and validation. 2017-06-22 21:25:30 +01:00
Eamonn Bell
eaa43488e5 Remove case sensitivity of names of fields used in slug construction 2017-06-22 14:05:22 +01:00
Benaiah Mischenko
25225121ed [WIP] Upgrade to Webpack 2 2017-06-13 15:30:21 -07:00
Mathias Biilmann
546ca5917e Add cache buster to all GitHub API calls (#449)
This should solve issues like #308 and the issues with cached
API responses after deleting an entry
2017-06-12 13:01:53 -07:00
Shawn Erquhart
3a2e5eb988 refactor nested widget preview logic 2017-06-08 14:12:40 -04:00
Shawn Erquhart
3a7c45f34e fix list widget preview 2017-06-08 14:12:36 -04:00
Shawn Erquhart
d526c27669 fix object previews
The `widgetFor` functionality needs to be shared between
the object and list previews, as well as being exposed to
preview template authors, so deriving widget components
within the ObjectPreview is being removed in this commit.
2017-06-07 23:23:10 -04:00
Shawn Erquhart
0589934169 update file widget to match image widget 2017-06-07 23:23:10 -04:00
Shawn Erquhart
3176fa1b3f fix entry editor bugs in kitchen sink entry 2017-06-07 23:23:09 -04:00
Shawn Erquhart
e36e1880d0 print file parsing errors to console 2017-06-07 16:42:27 -04:00
abumalick
e388ed1721 warnings/map>key related warnings 2017-06-05 13:56:25 -07:00
abumalick
38cb065570 warnings/widgets: forID is not required + typo 2017-06-05 13:56:25 -07:00
abumalick
e23f7e69dd warnings/proptypes: use oneOfType to support object and string 2017-06-05 13:56:25 -07:00
Shawn Erquhart
f3cb44cb10 Merge pull request #411 from vencax/3rdpartyoauth
auth without netlify oauth provider
2017-06-05 11:24:16 -04:00
Shawn Erquhart
e3b78452fa allow test repo to be used without window.testRepo
For example purposes, its helpful to allow users to run the test
backend without creating a repo object with nested objects for
each folder. This fix creates empty objects wherever needed.
2017-06-01 15:44:20 -04:00
Luis Correia
7e7642c5ce #407 Move filtering into separate collection method 2017-05-25 15:34:57 -07:00
Luis Correia
544cb786ee #407 Add collection filtering by field and value 2017-05-25 15:34:57 -07:00
Shawn Erquhart
1440caf3d0 fix rte scroll handler firing on child scroll 2017-05-24 17:02:13 -07:00
Shawn Erquhart
2a1e9b40b9 Merge pull request #395 from netlify/visual-tweaks
Small update to the UI's look and feel
2017-05-18 11:26:19 -04:00
Shawn Erquhart
62a8de98da improve theme color control via variables 2017-05-18 11:12:37 -04:00
David Francoeur
aac5339ac0 boolean widget & some documentation (#396) 2017-05-18 07:37:41 -07:00
Rafael Conde
3a78626900 Tweak cards on Editorial Workflow 2017-05-18 10:29:21 +01:00
Jerry Holmes
635d218b01 Shorted up code, removed antipattern test items from local storage. 2017-05-17 08:55:19 -07:00
Jerry Holmes
31a610e22e Tests left over field value for null 2017-05-17 08:55:19 -07:00
Shawn Erquhart
b01be5d04c fix preview pane not loading 2017-05-16 13:25:32 -04:00
Shawn Erquhart
032e1f9d77 fix notification style bugs 2017-05-13 10:16:08 -04:00
Rafael Conde
e2120910f6 Update border on image widget, tweak the copy 2017-05-11 08:45:19 -07:00
Jerry Holmes
f7c2dec8e8 normalizePath handles spaces for use in resolvePath 2017-05-10 22:13:03 -04:00
Rafael Conde
cb45997c24 Increase contrast of popovers on editor 2017-05-10 08:58:21 -07:00
Rafael Conde
7fd8556ba5 Increased contrast on borders 2017-05-10 08:44:42 -07:00
Vaclav Klecanda
018616dc68 slug from unicode chars 2017-05-09 11:18:28 -07:00
Benaiah Mischenko
ab47c3c8b3 Use react-frame-component for preview pane
This fixes the preview pane not working in Firefox
2017-05-08 16:48:52 -07:00
Vaclav Klecanda
26d402149a auth without netlify oauth provider 2017-05-07 06:38:33 +02:00
Shawn Erquhart
3ee5a5e172 update rich text toolbar styling 2017-05-05 12:58:42 -04:00
Rafael Conde
515a08d4d7 Tweak border colors 2017-05-05 12:58:12 -04:00
Rafael Conde
996f5a36d4 Add border to bottom bar and widget 2017-05-05 12:58:12 -04:00
Shawn Erquhart
e21a33986f further improve ui contrast and consistency 2017-05-05 12:58:11 -04:00
Rafael Conde
5adbecad77 Increase contrast and focus of input fields 2017-05-05 12:57:41 -04:00
Rafael Conde
a6c8a11223 Make search bar smaller 2017-05-05 12:49:03 -04:00
Rafael Conde
a1a9ebe437 Add back the dark header 2017-05-05 12:49:03 -04:00
Rafael Conde
19f34c81d2 Change to dark sidebar 2017-05-05 12:49:03 -04:00
Rafael Conde
ff2a045192 Apply changes proposed by review 2017-05-05 12:49:03 -04:00
Rafael Conde
6492eea1c8 Make card take available space in grid 2017-05-05 12:49:03 -04:00
Rafael Conde
1c95b5ee1d Update editor look and downplay header 2017-05-05 12:49:03 -04:00
Rafael Conde
8a9370fb0c Tweak header and card grid 2017-05-05 12:49:03 -04:00
Rafael Conde
9c1a41f61d Add hover effect on cards 2017-05-05 12:49:02 -04:00
Rafael Conde
de5f9bc708 Clean up basic colors and type 2017-05-05 12:49:02 -04:00
Shawn Erquhart
d0ee10a681 Merge pull request #394 from netlify/text-editor-scroll
prevent rte scroll, improve code display
2017-05-03 17:10:24 -04:00
Joseph Earl
bfe46a8e13 Fixes #324 Use branch name from config when creating PR 2017-05-01 08:17:46 -07:00
Shawn Erquhart
fdd44c88cb prevent rte scroll, improve code display 2017-04-28 15:40:54 -07:00
Benaiah Mischenko
9cdc39154a Prevent long code lines from breaking visual entry editor
Previously, long lines of preformatted text would cause the lines to
run off the side of the ProseMirror edit box and give the entire entry
editor a scrollbar. This commit makes the edit box itself scroll,
which looks and feels much less broken.
2017-04-26 12:23:37 -07:00
Shawn Erquhart
7a66dd4dcb remove superfluous rawMode editor prop 2017-04-24 22:39:37 -04:00
Shawn Erquhart
902134c4e8 add autosizing for markdown editor 2017-04-24 17:52:06 -04:00
Shawn Erquhart
ba2f092dc3 document Sticky microlib 2017-04-24 17:52:06 -04:00
Shawn Erquhart
9ff4e25736 move editor components to dropdown menu 2017-04-24 17:52:06 -04:00
Shawn Erquhart
fdd85486d8 update Toolbar proptypes 2017-04-24 17:52:06 -04:00
Shawn Erquhart
a3b487aaeb use React Toolbox Switch for rte mode selection 2017-04-24 17:52:06 -04:00
Shawn Erquhart
1a12c6f5aa fix rte markdown toggle position for small screens 2017-04-24 17:52:06 -04:00
Shawn Erquhart
86b7b84637 fold ToolbarPlugins into Toolbar 2017-04-24 17:52:06 -04:00
Shawn Erquhart
b8dce2fb4b split out ToolbarPluginForm 2017-04-24 17:52:05 -04:00
Shawn Erquhart
dd29658abb split out ToolbarPluginFormControl 2017-04-24 17:52:05 -04:00
Shawn Erquhart
63e916ee2a check for sticky ref before update 2017-04-24 17:52:05 -04:00
Shawn Erquhart
c7d3de0fc8 use ToolbarButton for plugins 2017-04-24 17:52:05 -04:00
Shawn Erquhart
c5d9f44de2 split out ToolbarButton component 2017-04-24 17:52:05 -04:00
Shawn Erquhart
5d839e8410 fix sticky toolbar width 2017-04-24 17:52:05 -04:00
Shawn Erquhart
a1a693051c improve preview toggle styling 2017-04-24 17:52:05 -04:00
Shawn Erquhart
192afe2ec5 make markdown toggle purpose more obvious
The "< >" button on the toolbar should format selected
text as code, but its serving as a visual mode toggle.
This commit switches out the code icon for a text label,
and moves it to the right side of the rich text toolbar.
2017-04-24 17:52:05 -04:00
Shawn Erquhart
de900eeb39 reposition properly when new sticky inserted 2017-04-24 17:52:05 -04:00
Shawn Erquhart
fc5d935e53 use Context for sticky, support multiple stickies 2017-04-24 17:52:05 -04:00
Shawn Erquhart
ec29a04089 implement initial working sticky rte toolbar 2017-04-24 17:52:05 -04:00
Shawn Erquhart
33fe2b820c add active state to rich text raw toggle 2017-04-24 17:52:04 -04:00
Shawn Erquhart
b2fd96c12e condense rich text functionality to static toolbar 2017-04-24 17:52:04 -04:00
Benaiah Mischenko
4bb03b8379 Merge pull request #382 from netlify/list-item-delete
fix list item deletion
2017-04-21 12:03:30 -07:00
Joseph Earl
6d7bf3b186 Fixes 298 Basic validation for config 2017-04-21 11:03:24 -07:00
Benaiah Mischenko
365c0358e9 Mock AssetProxy in frontmatter testing 2017-04-21 10:34:33 -07:00
Shawn Erquhart
17b40b58ea fix frontmatter stringification for date fields
Switches back to custom frontmatter stringification
until support lands in preliminaries. This is necessary
because we use custom schemas for certain data types,
such as dates and times.
2017-04-21 10:34:33 -07:00
Shawn Erquhart
d250b1cef3 fix list item deletion 2017-04-20 15:22:04 -04:00
Kevin McCormack
39852e9982 Fix filtering by file extension 2017-04-19 11:45:07 -04:00
Benaiah Mischenko
3be734da05 Merge pull request #370 from josephearl/filter-files-extension
Fixes #278 Filter folder collection files by extension
2017-04-18 16:28:05 -07:00
Joseph Earl
22137ed777 Fixes #292 Display version number 2017-04-18 16:11:48 -07:00
Joseph Earl
265146e2d1 Fixes #278 filter files by extension 2017-04-18 22:59:30 +01:00
Kevin McCormack
76bf16d62e Add backend config for site ID
Users can now specify `site_domain` in `config.yml`. This is useful
when attempting to access the CMS from a different host.
2017-04-18 16:24:45 -04:00
Joseph Earl
684fd1c490 Fixes 358 Save bar stuck 2017-04-14 21:30:49 +01:00
Shawn Erquhart
2047fda27c Merge pull request #360 from marzeelabs/feature/#359_list_children_metadata
#359 - Handle metadata for all children of a list field
2017-04-14 12:59:08 -04:00
Joseph Earl
4afec469f9 Merge pull request #355 from josephearl/113-disable-editor-preview
Fixes #113 Disable editor preview
2017-04-14 17:48:34 +01:00
Joseph Earl
4be23e5fc7 Show error if config fails to parse 2017-04-14 17:22:24 +01:00
Joseph Earl
e2f471e863 Remove webpack footer 2017-04-14 13:56:24 +01:00
Joseph Earl
881c0b0958 Fixes #113 Add ability to disable editor preview for a collection 2017-04-14 13:26:09 +01:00
Luis Correia
b75f86f4c2 #359 - Delete metadata by key of deleted value (previously harcoded) 2017-04-13 12:45:32 +01:00
Luis Correia
805f958165 #359 - Handle metadata for all children of a list field 2017-04-13 11:02:06 +01:00
Benaiah Mischenko
d58cd652d8 Cleanup resolvePromiseProperties
There were a couple issues with the original version of
`resolvePromiseProperties`:

- The wrapper promise was unnecessary, since we can just return the
  `Promise.all`. Fixing this allows us to remove a wrapping function,
  reduce indentation, remove the `resolve` and `reject` calls, and
  remove the now unnecessary `.catch` line.

- There was inadvertent mutation in the `Object.assign` call - the
  first parameter to `Object.assign` is mutated, so to call it without
  mutating existing objects the first parameter should be a literal
  `{}`. This is now fixed.
2017-04-11 10:55:56 -07:00
Joseph Earl
dc313d157b Rename YamlFrontmatter to just Frontmatter 2017-04-09 19:32:33 +01:00
Joseph Earl
a2e8602fdd Add multi-format frontmatter parser 2017-04-08 23:32:39 +01:00
Benaiah Mischenko
d503547883 Stop showing loader forever when there are no entries (#343) 2017-04-07 09:32:30 -07:00
Benaiah Mischenko
12f5e4cda8 Merge pull request #306 from americool/adding-close-preview-feature
Adding close preview feature
2017-04-06 15:56:24 -07:00
Julian Krispel-Samsel
c560689edd fixes #258 - reverse collection order (#345) 2017-04-05 15:02:13 -07:00
Shawn Erquhart
4752a1f150 add styling for preview toggle 2017-04-05 12:43:18 -04:00
Americool
948158cda3 small fixes changed PREVIEW_STATE to PREVIEW_HIDE 2017-04-05 12:42:30 -04:00
Americool
1f5db5ab3c adding close preview 2017-04-05 12:42:30 -04:00
Shawn Erquhart
71e683f5bf Fix logout for Firefox
The log out menu was nested within a button, which caused
bubbling issues for the log out button event handler. This
was due to a misuse of the React Toolbox AppBar component.
Added a proper IconMenu to trigger the logout dropdown.
2017-03-31 15:47:55 -04:00
Benaiah Mischenko
1aa02eb42a Refactor readUnpublishedBranchFile with resolvePromiseProperties 2017-03-20 17:16:58 -07:00
Benaiah Mischenko
1dc2841609 New promise helper, resolvePromiseProperties
`resolvePromiseProperties` takes on object and returns a promise which
resolves to a copy of the object. This copy has all its immediate
properties which were Promises replaced with the resolved value of
those promises. Promises are run with `Promise.all`. Errors are passed
up to the outer promise chain.

Example usage:

```js
resolvePromiseProperties({
  promise: Promise.resolve("this property will resolve to this string"),
  nonPromise: "this will remain the same",

  // you can nest the function
  nestedPromiseInside: resolvePromiseProperties({
    nestedPromise: Promise.resolve("this will resolve"),
    nestedNonPromise: "this stays the same",
  }),
})
.then(obj => console.log(obj))

```

That will produce the following output:

```js
{
  promise: "this property will resolve to this string",
  nonPromise: "this will remain the same",
  nestedPromiseInside: {
    nestedPromise: "this will resolve",
    nestedNonPromise: "this stays the same",
  },
}
```
2017-03-20 17:04:40 -07:00
Benaiah Mischenko
c079cb96c4 Label cards in editorial workflow 2017-03-20 17:02:52 -07:00
Shawn Erquhart
b3ce95057e fix preview pane height in Safari 2017-03-20 12:33:04 -04:00
Luis Correia
e9c6e8cda1 #294 Make commit messages imperative 2017-03-17 01:09:52 +00:00
Benaiah Mischenko
3adb1ee4fc Set correct hasChanged and set it on all entry persistence actions 2017-03-16 11:34:36 -07:00
Benaiah Mischenko
47c46e7a6a Set state.entryDraft.entry.hasChanged to false when an entry saves succesfully 2017-03-16 11:05:17 -07:00
Shawn Erquhart
3096b4617e improve entry editor UI 2017-03-15 21:18:16 -04:00
Shawn Erquhart
736954da8b Merge pull request #285 from Benaiah/confirm-navigation-while-changes-unsaved
Confirm navigation when it would discard unsaved changes
2017-03-15 18:12:02 -04:00
Benaiah Mischenko
a88b2d6c9f Confirm navigation when it would discard unsaved changes
- New state field: `state.entryDraft.hasChanged`, initialized to
  `false`.

- `state.entryDraft.hasChanged` set to `true` in `entryDraft` reducer
  for `DRAFT_CHANGE_FIELD`.

- `EntryPage` adds a `listenBefore` listener to `history` on
  `componentDidMount` that checks `this.props.entryDraft.hasChanged`
  and, if that is true, asks the user to confirm the navigation.

- `EntryPage` removes its listener on `componentWillUnmount`.
2017-03-15 14:49:38 -07:00