-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Components should be based on usings not on @addTagHelper #5577
Comments
This can also be removed once we have this feature: https://github.com/aspnet/AspNetCore-Tooling/blob/master/src/Razor/src/Microsoft.AspNetCore.Razor.Language/Components/ComponentImportProjectFeature.cs#L50 Currently we generate an |
We still want to dynamically generate |
that's not dynamic though. My point is that if you're inside |
Current State: Proposed implementation:
Note:
Thoughts? Am I missing any requirements that can't be accomplished by this implementation? |
What about the special things that components have:
Also there will be a change in the completion provider. The completion provider interacts with tag helpers. Also consider aliases This seems like a good start. |
/cc @NTaylorMullen |
/cc @SteveSandersonMS @danroth27 any other comments or concerns? |
They all have catch-all rules which means we don't need to include any special fully qualified name rules. They will continue to work the same way without any changes,
I assume you mean the |
Given my current context of how components work, nope. As long as the same criteria for associating a Basically, just re-iterating all you said in your comment (I think you're on the right track).
Ya I think I also need some more context on this one, not quite sure what @rynowak is referring to. |
https://github.com/aspnet/AspNetCore-Tooling/blob/master/src/Razor/src/Microsoft.VisualStudio.Editor.Razor/DefaultTagHelperFactsService.cs#L111 (get on my level) I only know about this because I already started to do this work: https://github.com/aspnet/AspNetCore-Tooling/tree/rynowak/lets-blow-it-up So I think we largely agree on the implementation plan so there's no reason to delay starting on this. I still think we need some more level of detail on the overall experience. Saying they will continue to work the same way isn't a super high level of precision 😆 |
I'm going to start filling up the top post with experience notes. Just because I wrote it there shouldnt' be taken as gospel, this is just a starting point. |
@danroth27 @SteveSandersonMS please have a look at the top post |
My main question is about this:
Is the idea that you can always bind with the short name, even if you haven't done the necessary I know it would be a breaking change to only bind to things that are in scope, but it would be a good change IMHO. |
No. The intention is that this is based on the C# name binding rules (usings, current namespace, and using aliases). I think the checklist format is making it unclear. |
Fair enough 😄 . I'll do some more investigation and add more details here. |
Some rough experience notes:
Component binding will be based on
using
and C# namespaces instead of directives:using Foo = Bar
)using
in the same document and importsglobal::
qualification@using MyCompany
+<MyLibary.FooBar>
=>MyCompany.MyLibrary.FooBar
@namespace
directive (blocked by Add support for @namespace directive for components #8007)Directive attributes:
bind
,onclick
,ref
are always bound in a component documentAvoiding crosstalk:
ITagHelper
and VCTH tag helpers are never bound in a component document_Imports.razor
bind
,onclick
,ref
are never bound in a view documentTooling:
If it's not specified here then we're probably OK with the way it currently works for Blazor 0.7 - please feel free to ask and add more notes
The text was updated successfully, but these errors were encountered: