microsoft / microsoft/fluentui-blazor

[dev-v5] feat: add conditional addition of name for better SSR experience

Open
#4,835 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

improvement v5
Dominant language
C#
Stars
4.8k
Forks
483
Avg merge
14h 41m
Merged PRs (30d)
68

Description

🙋 Feature Request

Native vanilla components can detect if they need to add a name to the component. It would be cool to have this feature as well for our form components. This gets rid of the need to use Name parameter in SSR context which improves the experience in this scenario and results in less code for the developers.

🤔 Expected Behavior

The components should figure this out by themself.

😯 Current Behavior

The developer needs to specify Name for every input in SSR mode.

💁 Possible Solution

In vanilla Blazor this is being implemented like this:

https://github.com/dotnet/aspnetcore/blob/05434a9e554a75c887f204d08849fba337488dc3/src/Components/Web/src/Forms/InputCheckbox.cs#L38

https://github.com/dotnet/aspnetcore/blob/05434a9e554a75c887f204d08849fba337488dc3/src/Components/Web/src/Forms/InputBase.cs#L199

https://github.com/dotnet/aspnetcore/blob/05434a9e554a75c887f204d08849fba337488dc3/src/Components/Web/src/Forms/InputBase.cs#L265

🔦 Context

💻 Examples

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the referenced ASP.NET Core InputCheckbox.cs and InputBase.cs implementations, then identify which Fluent UI Blazor form components require Name in SSR mode. Done means the affected components determine their names conditionally so developers no longer need to specify Name for every SSR input.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.