Wykres commitów

11014 Commity (2f6a635054ffbbd7f652d45680946a0dad026962)

Autor SHA1 Wiadomość Data
Karl Hobley 2f6a635054 Refactor a ListChild out of ListBlock
Based on 73be2a6ffe
2021-03-17 23:32:39 +00:00
Matt Westcott 99f7e3e557 Support custom form_template on StructBlock 2021-03-17 23:32:39 +00:00
Matt Westcott 84b44b50b4 Populate label 'for' attribute on render 2021-03-17 23:32:38 +00:00
Matt Westcott 35dd2f2d3f Include help text on block rendering 2021-03-17 23:32:38 +00:00
Matt Westcott 71e2d542ff Add required asterisk to StructBlock children 2021-03-17 23:32:38 +00:00
Karl Hobley f0635165b3 Unit tests for StreamBlock 2021-03-17 23:32:38 +00:00
Karl Hobley 889689f754 Unit tests for ListBlock 2021-03-17 23:32:37 +00:00
Karl Hobley 5518c5ea34 Unit tests for StructBlock 2021-03-17 23:32:37 +00:00
Karl Hobley 87cdc215bd Telepath: Validation 2021-03-17 23:32:37 +00:00
Karl Hobley 7477ce1e1c Unit tests for FieldBlock 2021-03-17 23:32:36 +00:00
Karl Hobley 43995c7665 Unit tests for TableInput 2021-03-17 23:32:36 +00:00
Karl Hobley 996aa149cb Unit tests for date/time widgets 2021-03-17 23:32:36 +00:00
Karl Hobley a2baf4a99a Remove TableBlock's legacy widget rendering 2021-03-17 23:32:36 +00:00
Karl Hobley f083770d8d Make TableBlock translatable again 2021-03-17 23:32:35 +00:00
Karl Hobley d09938d400 Implement telepath adapter for TableInput 2021-03-17 23:32:35 +00:00
Karl Hobley 2314922ae1 Lint table.js 2021-03-17 23:32:35 +00:00
Karl Hobley 3664bfa838 Convert table.js to use 2-space indentation 2021-03-17 23:32:35 +00:00
Karl Hobley 84010b92a7 Moved TableBlock block's table.js into client 2021-03-17 23:32:34 +00:00
Matt Westcott 24d393d7cb Fix setting of initial state for datetime fields 2021-03-17 23:32:34 +00:00
Karl Hobley 7bc28b46b1 Telepath: Date time inputs 2021-03-17 23:32:34 +00:00
Karl Hobley c50ee54659 Add unit tests for DraftailRichTextArea 2021-03-17 23:32:34 +00:00
Karl Hobley 0a2f71856a Add unit tests for AdminAutoHeightTextInput 2021-03-17 23:32:33 +00:00
Karl Hobley e23e7c1c6e Add unit tests for PageChooser 2021-03-17 23:32:33 +00:00
Karl Hobley ca87668cb9 Add unit tests for RadioSelect/BoundRadioSelect 2021-03-17 23:32:33 +00:00
Karl Hobley 1d894ee6e7 Add unit tests for Widget/BoundWidget 2021-03-17 23:32:33 +00:00
Karl Hobley a7bc294c34 Decorate all currently failing tests with unittest.expectedFailure 2021-03-17 23:32:32 +00:00
Matt Westcott eaa16a924a Consistently pass 'animate' flag via an opts dict 2021-03-17 23:32:32 +00:00
Matt Westcott a2fc9a1661 Clarify comment on grouped_child_blocks 2021-03-17 23:32:32 +00:00
Matt Westcott d0bd2cbf7a Rename StreamMenu onclick handler to onSelectBlockType 2021-03-17 23:32:31 +00:00
Matt Westcott 8e00fbb13c StreamField block deletion 2021-03-17 23:32:31 +00:00
Matt Westcott 43a63d5567 Add type checks to telepath tests 2021-03-17 23:32:31 +00:00
Matt Westcott 31012506bd Move telepath.js to utils 2021-03-17 23:32:30 +00:00
Matt Westcott e651c1cdbd Avoid creating references for trivial primitive values and short strings 2021-03-17 23:32:30 +00:00
Matt Westcott cd50b842dc Support unpacking of references 2021-03-17 23:32:30 +00:00
Matt Westcott 6111d66728 Add tests for telepath client 2021-03-17 23:32:30 +00:00
Matt Westcott 19cfd7a423 Move telepath module to components 2021-03-17 23:32:29 +00:00
Matt Westcott 7c53261d16 lint fix for blocks.js 2021-03-17 23:32:29 +00:00
Matt Westcott 323f9bc2d2 Assign ids to nodes that are referenced multiple times 2021-03-17 23:32:29 +00:00
Matt Westcott 99258f2a72 Introduce a two-pass mechanism for packing
Traversing the object structure with ValueContext.pack yields a tree of Node objects, on which we can call emit() to obtain the final JSONish representation. The nodes in this intermediate tree representation can be annotated to control the output, e.g. to indicate that it should be output with an ID attached.
2021-03-17 23:32:28 +00:00
Matt Westcott 1d815f7653 Foundation for reference-counting support
Move the packing logic into a one-shot ValueContext where we can stash previously-encountered sub-values for the current value being packed.
2021-03-17 23:32:28 +00:00
Matt Westcott 82dc18b24f add unit tests for telepath 2021-03-17 23:32:28 +00:00
Matt Westcott 38548f1257 add slide animation on block addition 2021-03-17 23:32:27 +00:00
Matt Westcott 2845c218c2 Focus form field on addition, and show menu for initially-empty streams 2021-03-17 23:32:27 +00:00
Matt Westcott a9cb60c44e Close menu after selecting
Turns out we need to insert the new block *after* the active menu for the animation to work...
2021-03-17 23:32:27 +00:00
Matt Westcott ebf249f685 use a dedicated counter for prefixes, not index 2021-03-17 23:32:27 +00:00
Matt Westcott b78b908251 Hook up onclick handler for menu 2021-03-17 23:32:26 +00:00
Matt Westcott e310cff2dd Replace StreamBlock.append with an insert method that works on arbitrary indexes 2021-03-17 23:32:26 +00:00
Matt Westcott a58439a9af Pass initial 'new child' states to block types that need to dynamically create children 2021-03-17 23:32:26 +00:00
Matt Westcott 50d168f280 Ensure StructBlock.get_default properly reflects child block defaults
StructBlock previously handled default values 'lazily' at render time, setting meta.default to fall back to an empty dict and calling the child block's get_default on missing items. We can't do this with client-side rendering because get_default isn't available on the client-side block definition (and adding it to the client-side block API would introduce unnecessary bloat). Instead, we fix StructBlock.get_default to correctly pick up the defaults from its child blocks, so that anything that makes use of StructBlock.get_default (e.g. a containing ListBlock / StreamBlock that needs to create StructBlock children on the fly) will have the full accurate data to hand.
2021-03-17 23:32:26 +00:00
Matt Westcott cf35306e64 Insert menus between blocks 2021-03-17 23:32:25 +00:00