Commit Graph

161 Commits

Author SHA1 Message Date
Steve Sanderson 855d93ce67 Improve TS annotations when calling readObjectField/readStructField 2018-01-29 21:47:55 +00:00
Steve Sanderson c81d537ea3 Pass entire RenderBatch to JS side in one call 2018-01-29 21:43:49 +00:00
Steve Sanderson 55592f583b Update RendererTests to be more explicit about batch expectations 2018-01-29 20:28:38 +00:00
Steve Sanderson 080e6395cb Move to batched rendering 2018-01-29 20:16:42 +00:00
Steve Sanderson 27d0ce4da9 Begin differentiating between rendering as a new batch on in an existing batch (even though batches don't exist yet) 2018-01-29 16:47:52 +00:00
Steve Sanderson 7799c36d50 Add E2E test to show adding and removing child components dynamically 2018-01-29 12:56:42 +00:00
Steve Sanderson 97d575f599 Refactor BrowserRenderer.ts to avoid tracking unnecessary child index stack 2018-01-29 12:56:41 +00:00
Steve Sanderson 7e76490844 Refactor RenderTreeDiffComputer to use more "ref local" for less array dereferencing 2018-01-29 12:56:41 +00:00
Steve Sanderson 772e3a1a44 Clean up E2E tests now elements are retained via diffing 2018-01-29 12:56:41 +00:00
Steve Sanderson 4f496f649a Add E2E test showing we can pass properties to child components and auto re-render them on change 2018-01-29 12:56:40 +00:00
Daniel Roth 5981002a40 Add LICENSE.txt 2018-01-26 16:16:25 -08:00
Steve Sanderson 882096755b Rerender child components when their parameters change 2018-01-26 14:25:26 -08:00
Steve Sanderson 94ad26a479 Update properties on retained child components 2018-01-26 11:58:43 -08:00
Steve Sanderson 9f7dab3096 Better error handling when setting properties on child components 2018-01-26 10:10:06 -08:00
Steve Sanderson 3940ca8b60 For components, allow attribute values to be arbitrary objects 2018-01-26 09:54:35 -08:00
Steve Sanderson 1b4fa4781a Give attribute nodes a single object-valued value so they can be used for component properties too. 2018-01-26 09:40:48 -08:00
Steve Sanderson 9dcb1c4fc4 Begin on setting properties on child components 2018-01-26 08:47:53 -08:00
Steve Sanderson 0aa164073d Rename Microsoft.Blazor.* -> Microsoft.AspNetCore.Blazor.* everywhere 2018-01-24 15:48:38 -08:00
Steve Sanderson 9e90ff3689 Rename AddComponentElement->OpenComponentElement for clarity (you have to close it too) 2018-01-24 15:26:27 -08:00
Steve Sanderson 2469558410 Preserve child component instances across renders. Move instantiation into the diffing phase. 2018-01-24 14:29:46 -08:00
Steve Sanderson 23c2816bcd Change ParentChildComponent test to use Razor. Add E2E tests showing events on child components work. 2018-01-24 11:04:30 -08:00
Steve Sanderson 2107a1927f In RazorCompiler, support temporary <c:MyComponent /> syntax 2018-01-24 10:43:23 -08:00
Steve Sanderson 04fa5f4b71 Since ArrayRange is now what the tree builder APIs expose, ArrayBuilder can be internal 2018-01-24 08:58:16 -08:00
Steve Sanderson 9da3260eb7 Avoid some struct copying during array building 2018-01-23 23:50:21 -08:00
Steve Sanderson 6e4d0dbca4 Move common resizable-array logic into shared ArrayBuilder. Replace ArraySegment with ArrayRange since Offset is never used. 2018-01-23 23:30:48 -08:00
Steve Sanderson cc2d097c99 More comments on thinking around child components and wrapper elements 2018-01-23 20:38:01 -08:00
Steve Sanderson 5d5931d3c5 Clarify comments about components needing wrapper elements 2018-01-23 17:21:45 -08:00
Steve Sanderson b049c7f574 Fix diffing for consecutive text nodes 2018-01-23 09:43:14 -08:00
Steve Sanderson df321b9b8d Make RenderTreeEdit specify which sibling node it acts on, so we can eliminate the Continue concept and no longer track indices on JS side 2018-01-22 20:17:32 -08:00
Steve Sanderson 0ea4c930e9 Remove redundant property 2018-01-22 16:53:41 -08:00
Steve Sanderson 2c3925a05c Apply render tree diffs on JS side 2018-01-22 16:02:52 -08:00
Steve Sanderson 584e363110 Pass the tree edits to JS code on render 2018-01-22 09:26:14 -08:00
Steve Sanderson 5435582c0e Update rendering APIs to supply the diff as well as the final state 2018-01-22 08:54:03 -08:00
Steve Sanderson bea15241f2 Various renames of diff-related types, plus XML docs for newly-public types. 2018-01-22 08:31:07 -08:00
Steve Sanderson 7c30d51be9 In tree diffs, omit trailing Continue entries and skip over unmodified subtrees 2018-01-22 01:55:10 +00:00
Steve Sanderson b021e19598 In diffing, support elements with descendants 2018-01-21 21:30:01 +00:00
Steve Sanderson 0a5e27fdcf Support diffing attributes. This required tracking 'sequence' values on attributes too. 2018-01-21 20:57:11 +00:00
Steve Sanderson 7a1abbaca3 In tree diffing, better handle scenario where both old and new sequences loop back but to different locations 2018-01-21 19:37:34 +00:00
Steve Sanderson 6b37494e7c Begin on RenderTree diffing. Doesn't yet recurse into elements to handle attributes/children. 2018-01-21 18:53:09 +00:00
Steve Sanderson a0b354e0eb Add concept of 'sequence' to RenderTreeNode. This is in preparation for diffing. 2018-01-21 11:51:26 +00:00
Steve Sanderson b038117961 Force VS to treat all Blazor cshtml components as inheriting from BlazorComponent so that helpers like @onclick appear in intellisense 2018-01-18 10:05:07 +00:00
Steve Sanderson 374d19c1a4 Move child component instantiation into a post-render phase to bring it closer to how it will work with rendertree diffing
This is also needed to make it possible to have a helper to insert
Component nodes from Razor without doing anything messy to pass the
RenderTreeBuilder into that heper.
2018-01-18 00:29:00 +00:00
Steve Sanderson 3deab026c8 Stop spurious VS "cannot override ExecuteAsync" errors even if you don't specify a base class 2018-01-18 00:07:54 +00:00
Steve Sanderson d1f96153d3 Implement basics of @onclick()-type shorthand syntax 2018-01-16 18:01:06 +00:00
Steve Sanderson 946e25462e In RazorCompiler, support @using statements 2018-01-16 17:17:22 +00:00
Steve Sanderson 7cd5228b7f In RazorCompiler, support attributes whose values are C# code blocks (treated as event handlers) 2018-01-16 16:58:47 +00:00
Steve Sanderson 5949045319 In RazorCompiler, support expressions with non-string or null values 2018-01-16 16:30:29 +00:00
Steve Sanderson 8c2a32b87c Remove a .csproj.user file that shouldn't be tracked in source control 2018-01-16 16:16:48 +00:00
Steve Sanderson 7bbb2b6660 In RazorCompiler, support attribute values of type UIEventHandler 2018-01-16 16:15:46 +00:00
Steve Sanderson 3a7b6b2178 In Razor compiler, support attributes with interpolated expressions 2018-01-16 15:24:34 +00:00