dotnet / dotnet/roslyn

Allow for ChildContent Context parameter name to be specified on the parent component declaration

Open
#85,540 2 comments 0 reactions 0 assignees View on GitHub
Area-Language Design Area-Razor Area-Razor-Compiler
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

Hey, i ran into this issue
dotnet/roslyn#85422 (Resolve ambiguous parameter name context using the closest one)
because of nested components each having exactly one ChildContent and overlapping Context names ("context").

I would like to suggest allowing for specifying the name of the ChildContent's Context name in the declaration of the parent component, thus fullfilling the role of ChildContent, which is saving lines and nesting.

So instead of having to do this:
```xml



```
I would allow for this:
```xml

```

Contributor guide

Open the contributing guide

Research direction

Start by reading the ambiguity behavior referenced in dotnet/roslyn#85422 and compare it with the two nested-component examples in this issue. Trace where parent component declarations and ChildContent Context names are parsed or resolved. Done means the proposed declaration syntax is specified, implemented, and the nested example resolves the requested context name without the explicit ChildContent block.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.