Skip to content

Conversation

@linkdotnet
Copy link
Collaborator

@linkdotnet linkdotnet commented Nov 1, 2024

.net 9 related changes

  • docs
  • @rendermode on element
  • top level @rendermode

@linkdotnet linkdotnet force-pushed the net9 branch 2 times, most recently from 7a4dd4a to 62c724c Compare November 9, 2024 13:44
@egil egil force-pushed the net9 branch 3 times, most recently from e835c6c to 948af35 Compare November 15, 2024 17:18
@egil egil changed the title Net9 Support controlling render modes and RendererInfo during testing Nov 15, 2024
@egil
Copy link
Member

egil commented Nov 15, 2024

@linkdotnet force pushed some changes!

I think this is done, but there may be some improvements to the code before we merge in.

@egil egil requested a review from scottsauber November 15, 2024 17:21
@egil
Copy link
Member

egil commented Nov 15, 2024

Just tagging @scottsauber and @linkdotnet to see if you have suggestions to improve the code. Did some changes after the stream.

Still missing a documentation page.

/// Gets or sets the <see cref="IComponentRenderMode"/> that will be specified in
/// the render tree for component the parameters are being passed to.
/// </summary>
public IComponentRenderMode? RenderMode { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

This and the ToRenderFragment method should probably have been on the builder, but that we can move in V2, where the types are internal.

/// </summary>
/// <param name="renderMode">The render mode to assign to the component, e.g. <c>RenderMode.InteractiveServer</c>, or <see langword="null"/>, to not assign a specific render mode.</param>
/// <returns>This <see cref="ComponentParameterCollectionBuilder{TComponent}"/>.</returns>
public ComponentParameterCollectionBuilder<TComponent> SetAssignedRenderMode(IComponentRenderMode? renderMode)
Copy link
Member

Choose a reason for hiding this comment

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

Set still seems like the right name. Matches the SetRendererInfo on Renderer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Okay, yeah see comment above

{
builder.OpenComponent<TComponent>(0);
AddAttributes(builder);
#if NET9_0_OR_GREATER
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

SetRenderMode would be better as this doesn’t have collection like behavior

@linkdotnet linkdotnet force-pushed the net9 branch 2 times, most recently from 6e16a75 to 9782ad9 Compare December 13, 2024 15:31
@egil egil merged commit a4c5161 into main Dec 13, 2024
9 checks passed
@egil egil deleted the net9 branch December 13, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants