Skip to content

JS root components for server and webview#34597

Merged
SteveSandersonMS merged 20 commits intomainfrom
stevesa/dynamic-root-components-server-and-webview
Jul 26, 2021
Merged

JS root components for server and webview#34597
SteveSandersonMS merged 20 commits intomainfrom
stevesa/dynamic-root-components-server-and-webview

Conversation

@SteveSandersonMS
Copy link
Member

@SteveSandersonMS SteveSandersonMS commented Jul 21, 2021

Ready for review. This is a mostly-simple extension of the new JS root components support to Server and WebView.

  • For Server:
  • For WebView:
    • There's very little code needed to enable this, but each hosting platform (WebForms, WPF, MAUI) will need to expose an extra IJSComponentConfiguration object from its platform-specific "host builder" API so the developer can call the extension methods on it to set up the JS component config. As an example, here's how I added it to the Photino app model: d3bd7c3. Hopefully this will be a simple task. @Eilon, will you be able to add something equivalent to that for WebForms/WPF/MAUI in due course?

@SteveSandersonMS SteveSandersonMS changed the base branch from main to stevesa/dynamic-root-components July 21, 2021 19:12
@Pilchie Pilchie added the area-blazor Includes: Blazor, Razor Components label Jul 21, 2021
@SteveSandersonMS SteveSandersonMS force-pushed the stevesa/dynamic-root-components branch from 5d61fbf to 6f545fe Compare July 22, 2021 09:44
@SteveSandersonMS SteveSandersonMS force-pushed the stevesa/dynamic-root-components-server-and-webview branch from 591e378 to c249913 Compare July 22, 2021 10:01
Base automatically changed from stevesa/dynamic-root-components to main July 22, 2021 11:23
@SteveSandersonMS SteveSandersonMS force-pushed the stevesa/dynamic-root-components-server-and-webview branch 2 times, most recently from 66781cb to 557b100 Compare July 22, 2021 11:36
@SteveSandersonMS SteveSandersonMS marked this pull request as ready for review July 22, 2021 11:37
@SteveSandersonMS SteveSandersonMS requested a review from a team as a code owner July 22, 2021 11:37
@SteveSandersonMS SteveSandersonMS requested a review from Eilon July 22, 2021 11:37
@SteveSandersonMS SteveSandersonMS force-pushed the stevesa/dynamic-root-components-server-and-webview branch from 5da6c55 to e02dc23 Compare July 26, 2021 08:45
@SteveSandersonMS
Copy link
Member Author

Updated and hopefully very done now. CC @aspnet-blazor-eng for review.

@SteveSandersonMS SteveSandersonMS added the api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews label Jul 26, 2021
@ghost
Copy link

ghost commented Jul 26, 2021

Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:

  • The PR contains changes to the reference-assembly that describe the API change. Or, you have included a snippet of reference-assembly-style code that illustrates the API change.
  • The PR describes the impact to users, both positive (useful new APIs) and negative (breaking changes).
  • Someone is assigned to "champion" this change in the meeting, and they understand the impact and design of the change.

Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

SteveSandersonMS and others added 3 commits July 26, 2021 12:20
Co-authored-by: campersau <buchholz.bastian@googlemail.com>
Co-authored-by: campersau <buchholz.bastian@googlemail.com>
@SteveSandersonMS SteveSandersonMS merged commit 78dc302 into main Jul 26, 2021
@SteveSandersonMS SteveSandersonMS deleted the stevesa/dynamic-root-components-server-and-webview branch July 26, 2021 15:48
@ghost ghost added this to the 6.0-rc1 milestone Jul 26, 2021
services.AddServerSideBlazor();
services.AddServerSideBlazor(options =>
{
options.RootComponents.MaxJSRootComponents = 5; // To make it easier to test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MaxJavaScriptRootComponentInstances

@pranavkm pranavkm added api-approved API was approved in API review, it can be implemented and removed api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews labels Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-approved API was approved in API review, it can be implemented area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants