31 Commits

Author SHA1 Message Date
Shawn Erquhart
9fd0ff4a6a
return date object from date/datetime widgets if no format set (#1296)
* return date object from date/datetime widgets if no format set

BREAKING CHANGE

As of 1.0, the documented behavior for the date and datetime widgets was
to always return a string value, but they were instead returning a date
object if the default date was not manually changed by the user. This
was addressed in #1143, but it became clear afterward that static site
generators were depending on the raw date objects that Netlify CMS was
unintentionally producing. Remaining as is or addressing the bug were
both "breaking" states, so this commit reverts to producing raw date
objects when no format is explicitly set.

It is now considered an edge case to require string dates, as most
static site generators expect to parse a raw date against formatting in
a site's templates.

Also note that this commit improves the original behavior by always
providing a date object when no format is provided, even if the user
manually changes the value.

* produce raw date when no format is provided
2018-05-25 12:03:44 -04:00
Roger Zurawicki
cd30b59b92 Support displayFields in the Relation widget (#1303)
* Support displayFields in the Relation widget

* Fix typo

* Wrap display fields in String constructors

* 📝 Documentation updates
2018-05-01 16:43:08 -07:00
Damien Duhamel
79f6672228 Use an isHidden property 2018-04-16 18:12:11 -04:00
Damien Duhamel
106968990d Add markdown editor toolbar customization 2018-04-16 18:12:11 -04:00
Damien Duhamel
9975c7e914 fix: Allow typing in date widget (#1247)
* Allow typing in date widget

* Handle empty case & warn user when invalid

* Try parsing date with moment

* Rename isValid -> isValidDate

* Warn user when date is invalid
2018-04-14 08:06:03 -06:00
Caleb
db292abe03 Fix actual code errors listed by linter. 2018-04-12 14:17:42 -07:00
Caleb
77a7c369f3 Fix Date Control Regression
Fix regression from b7fcb8b. Dates were disappearing completely until
the field was clicked into.
2018-03-29 14:22:25 -04:00
Luís Miguel
b2051343cc Fix regression in list relation previews 2018-03-28 16:19:50 -04:00
Mike Romani
55f01e6f1d Fields default to Blank String (#1126) 2018-03-28 10:07:20 -04:00
Sam
a2d4267500 Allow adding items to be disabled for list widget (#1102) 2018-03-15 16:16:32 -04:00
Caleb
b7fcb8b3d9 Use formatted datetime value in Redux. 2018-03-03 22:45:39 -05:00
Shawn Erquhart
c4222895a5 exlude time from default date widget format 2018-03-03 22:45:39 -05:00
Caleb
684735311c Fix list items crashing for first fields other than strings. 2018-02-23 10:25:06 -05:00
Pedro Duarte
49894d9fd9 Add label_singular to collection config (#1086) 2018-02-19 09:00:52 -08:00
Doocey
9208b8cfcf Change collapsed arrow direction for lists and editor widgets 2018-01-28 18:33:18 -07:00
Shawn Erquhart
b1006a9173 fix list widget default values 2018-01-03 11:09:13 -05:00
Christian Nolte
4b5fb89b6b Add expand/collapse to object widget (#927) 2017-12-24 07:42:26 -05:00
Shawn Erquhart
fbf728ca23 fix list collapse config setting 2017-12-22 16:33:29 -05:00
Christian Nolte
6ca9c04105 Add collapse all/expand all to Listcontrol (#912) 2017-12-22 16:30:05 -05:00
Shawn Erquhart
a1b947a23e fix markdown widget re-rendering on load 2017-12-21 14:20:23 -05:00
Caleb
a0f928dd49 Update snapshots. 2017-12-14 15:49:13 -08:00
Shawn Erquhart
78ad082021 update markdown mark hotkeys to use isHotkey 2017-12-14 14:59:59 -08:00
Shawn Erquhart
7c9c765c28 use is-hotkey in slate plugin checks 2017-12-14 14:59:59 -08:00
Shawn Erquhart
d321b9eb6d use isHotkey for markdown keydown listener 2017-12-14 14:59:59 -08:00
Shawn Erquhart
1608b5e52a remove outmoded code from markdown widget hotkeys 2017-12-14 14:59:59 -08:00
Damien Duhamel
99ee5e2f9a Check next in condition 2017-12-14 14:59:59 -08:00
Damien Duhamel
fba6929301 Change historyOfTypeIsValid condition 2017-12-14 14:59:59 -08:00
Damien Duhamel
9e5f42e772 Update slate plugin to drop data 2017-12-14 14:59:59 -08:00
Caleb
43a6c6ff15 Fix select widgets with object type options. 2017-12-14 08:25:23 -08:00
Shawn Erquhart
051257aa12 eliminate prop type and validation console warnings 2017-12-07 15:38:06 -05:00
Shawn Erquhart
cfbf31b130
WIP - Global UI (#785)
* update top bar and collections sidebar UI

* update collection entries UI

* improve global layout

* merge search page into collection page

* enable new entry button

* search fixup

* wip -initial editor update

* update editor scrolling and markdown toolbar position

* wip

* editor toolbar progress

* editor toolbar wip

* finished basic editor toolbar

* add standalone toggle component

* improve markdown toolbar spacing

* add user avatar placeholder

* finish markdown toggle styling

* refactor icon setup, add new icons

* add new icons to markdown editor toolbar

* remove extra app container

* add markdown active mark style

* relation and text widget styling

* widget design updates, basic list/object design update

* widget style updates, image widget improvements

* refactor widget directory, fix file removal

* widget focus styles

* finish editor widget focus styles

* migrate media library modal to react-modal

* wip - migrate editor component form to modal

* wip - move editor component form to modal

* wip - embed plugin forms in the editor

* inline shortcode forms working

* disable react hot loading, its breaking things

* improve shortcode form styles

* make shortcode form collapsible, improve styling

* add close functionality to shortcode blocks

* improve base media library styling

* fix shortcode label

* migrate unstyled workflow to new UI

* wip - reorganizing everything

* more work moving everything

* finish more moving and eliminating stuff

* restructure, remove react-toolbox

* wip - removing old stuff, more restructure

* finish restructure

* wip - css arch

* switch back to test repo

* update react-datetime to ^2.11.0

* remove leftover react-toolbox button

* more restructuring clean-up

* fix UI component directory case

* wip -css editor control style

* wip - consolidate widget styles

* wip - use a single control renderer

* fixed object values breaking

* wip - editor control active styles

* pass control wrapper to widgets

* ensure branch name is trimmed

* wip - improve widget authoring support

* import Map to Widget component

* refactor toolbar buttons

* wip - more widget active styles

* break out editor toggle component

* add local scroll sync back

* update editor toggle icons

* limit editor control pane content width

* fix editor control spacing

* migrate markdown toolbar stickiness to css

* fix markdown toolbar border radius

* temporarily use test backend

* stop markdown toolbar from going to bottom

* restore disabled markdown toolbar buttons for raw

* test markdown widget without focus styles

* more widget updates

* remove card visuals from editor

* disable dragging editor split off screen

* use editorControl component for shortcode fields

* make header site link configurable

* add configurable collection descriptions

* temporarily add example assets

* add basic list view

* remove outdated css mixins

* add and implement search icon

* activate quick add menu

* visualize usable space in editor view

* fix entry close, other improvements

* wip - editorial workflow updates

* some dropshadow and other CSS tweaks

* workflow ui updates

* add worfklow card buttons

* fix workflow card button handlers

* some dropshadow and other CSS tweaks

* make workflow board wider

* center workflow and collection views

* add basic responsiveness

* a bunch of fun UI fixes! a BUNCH! (#875)

* give `.nc-entryEditor-toolbar-mainSection` left and right child divs

* a bunch of fun UI fixes! a BUNCH!

* remove obscure --buttonShadow

* revert to test repo

* fix not found page styling

* allow workflow publishing from any column

* disallow publishing from all columns, with feedback

* fix new entry button

* fix markdown state persisting across entries

* enable simple workflow save and new from editor

* update slug in address bar when saving new entry

* wip - workflow updates, deletion working

* add status change functionality to editor

* wip - improving status change from editor

* editor toolbar back button improvements, loading improvements, cleanup

* progress on the media library UI cleanup

* remove font smothing css

* a quick fix for these buttons

* tweaks

* progress on media library modal— broken FYI

* fix media library functionality, finish migrating footer

* remove media library footer files

* remove leftover css import

* fix media library

* editor publishing functionality complete (unstyled)

* remove leftover loader var from media library

* wip - editor publishing styles

* add status dropdown styling

* editor toolbar style updates

* editor toolbar state improvements

* progress on the media library UI cleanup, style improvements

* finish editorial workflow editor styling

* finish media library styling

* fix config

* add what-input to optimize focus styling

* fix button

* fix navigation blocking for simple workflow

* improve simple workflow publishing

* add avatar dropdown to editor top bar

* style github and test-repo auth pages

* add git gateway auth page styles

* improve editor error styling
2017-12-07 12:37:10 -05:00