Closed javiercn closed 4 years ago
@javiercn I can take a stab πͺ at this based on Steve's presentation on the Community Standup combined with the engineering issue(s)/PR(s). Do you want me to give it a shot? ... might take a little pressure off of u π₯π€―π₯.
If you want to, go for it, we are still working out some changes that will land on RC1
In that case, I'll wait until RC1. I was burned π€ back when I tried to document Health Checks too early. I should have plenty of time after RC1 comes out.
Let's do this ... I'll take the assignment now, and we'll fix anything on review when I put the PR up after RC1 releases.
Same thing for Identity 2.0 updates. Immediately after RC1, I'll get busy on it. If I hit any problems, I'll ping on that issue. Otherwise, we can troubleshoot my PR after I put it up ... after RC1. Given that the changes might be extensive, it might take me a week (or longer if other work hits me). You can always track what I'm currently working on on the Blazor.Docs project by looking at the In Progress column.
Hey, all. I wanted to let you know I just got done writing a post on this feature. I appreciate the bulleted list on what to cover here, as it helped me make sure I was covering everything. π
As you're writing this, feel free to lean on that, correct me where I was wrong, and so on. Or, if you'd like me to take a stab at writing this for you guys, I'd be more than happy to give it a shot.
@daveabrock You are super welcome π₯ to write the section on this, and we can put your name on the author byline with a link to your blog (or organization website).
Let me get back to you tomorrow (Friday) morning on where it will slot into the coverage and any notes/gotchas going in on it.
@guardrex Sounds good! I've done plenty of contributions but this would be my first Blazor oneβso all ears on if there's any gotchas for writing Blazor docs.
@javiercn, TL;DR on my guidance to @daveabrock below, but ... you said that there might be additional updates to CSS isolation for RC1. Anything in that vein for @daveabrock since you opened this issue?
@daveabrock ... I read your post. Great piece. I hope you let @jongalloway know (if he doesn't get the ping here on https://daveabrock.com/2020/09/10/blazor-css-isolation) about that for a mention in a Community Standup. You can tweet him.
There's enough here that this should be a new topic in the Components node of the Blazor ToC. If Dan wants it elsewhere tho, no worries ... topic content is easy to move at the PR stage, of course. He'll let us know on the PR. For now, let's proceed with creating a new topic for this.
Two options ...
If you want the fully experience, then I'll supply some added notes here for Option 1. If you just want to go Option 2, then I'll just ping you on the PR for further discussion and updates after I've taken your issue comment into a repo doc. Let me know which way you want to go :ear:, and either way is fine. It just depends on how much into the doc repo weeds you want to get into it.
WRT the content itself, a few points ...
This will be a reference topic, so it won't have the tutorial-ish language of your blog post. It's more like :smile: ...
— "All we want are the facts, ma'am." Sgt. Joe Friday (Jack Webb), [Dragnet]() ©1949-59 NBCUniversal
... so just write in short, direct sentences. Keep paragraphs focused on each key point. These reference topics are less conversational and more like typewriter maintenance instructions. lol ... Well, perhaps not that bad. :smile:
Tips ... and forgive me that I'm telling u things you already know. I'm just going to rattle off some common things that we need to address in content submissions ...
Counter
page). The syntax for components is to code-fence the component name (e.g., the `Counter` component).The title of this will be "ASP.NET Core Blazor CSS isolation" with a sidebar ToC entry of "CSS isolation" under the "Components" node.
No prereqs needed for this because we'll version the whole topic for 5.0. I'll give more info if you go for Option 1 on the write-up.
WRT LESS/SASS, I hope that we don't maintain one or more explicit 3rd party CSS preprocessor code examples. A section that describes the general approach, as your blog post does in the first two paragraphs of your section, is my recommendation with cross-links to the 3rd party tools. Let them doc their own tools. This is subject to Javier's and Artak's input with Dan's final call. For one thing, I think maintaining code for 3rd party is a PITA. I can barely keep up with our own code. π Also, I have a long-running many years view that it's bad for the industry when big tech "picks winners" among 3rd party ... any tech company ... not just the Foundation or MS. It could stifle innovation and surely leads to the charge that big tech companies are monopolies in all the worst sense. Total imo there ... I've been consistent on that point and called it out in other contexts. Sometimes there's agreement on it, sometimes not. Anyway ... not my call. I leave it to DR to say what's best. I'm just recommending a course of action.
@daveabrock that's a great post! It covers almost everything I would cover. There are a few things we've changed and that are important to reflect on the docs and a couple of additional details:
In the things that have changes:
<StaticWebAssetBasePath>
property that is not the default, in that case that gets respected and appears at `<<<StaticWebAssetsBasePath>>/<<project>>.lib.scp.css
On the things that are missing or need more detail:
@import
within scoped css files, this is because we can't guarantee that those styles are isolated, and we can't define a sensible "import order" when we bundle things, so we need to ensure only scoped styles are bundled.I think that covers everything, that said there are extensive comments on the feature PR as well as in the msbuild code file
Hey guys, thanks for the nice words on the post (and @guardrex, @jongalloway has come to expect a not-so-subtle nudge the morning of the standups π).
@guardrex, I'm fine with the first option. As I think I said (it's been a long week) I have experience with your process so that should save time for everybody. I know you are targeting RC1 for thisβwhen is that, exactly? Thanks for the tips. I'll keep those in mind.
@javiercn, thanks for the great input! Are all these changes coming with RC1, or is it in preview 8? I was playing with the preview 8 bits, obviously. I would definitely prefer to get my hands on the bits before publishing this post, if possible.
As for some of the MSBuild settings in the project file, could someone assist on how to use DisableScopedCssBinding
and StaticWebAssetBasePath
in terms of how it fits in the structure of the project file (like the tag, what node it's under, and so on). I was trying to put some pieces together looking at the code, but would appreciate some assistance there.
targeting RC1 for thisβwhen is that, exactly?
I know the target date, but I don't like saying what it is. It might be public info, but I just don't like conveying dates without explicit authorization. Javier will let u know if he thinks this should absolutely be up for the RC1 release (that day) or not; and if so, he (or Dan) can convey the date, here or via email.
get my hands on the bits before publishing this post
This is what I was going to do, so there would've been a delay of at least a couple of days post RC1 release. I assume that they're fine with you taking that course as well.
I don't remember exactly if they are in RC1 or RC2, I believe RC1, but Dan can confirm since he's played with the bits more recently.
As to how to put things in the project file:
<PropertyGroup>
<StaticWebAssetBasePath>_content/$(PackageId)</StaticWebAssetBasePath>
<DisableScopedCssBundling>true</DisableScopedCssBundling>
</PropertyGroup>
There's a lot of content in the comments https://github.com/dotnet/aspnetcore/blob/release/5.0-rc1/src/Razor/Microsoft.NET.Sdk.Razor/src/build/netstandard2.0/Microsoft.NET.Sdk.Razor.ScopedCss.targets and on the PRs with the details
Thanks @javiercn. I have what I need to get started.
And @guardrex, all fair on timing. I'm just looking for a general timeframe - do you want something in the next two weeks, four weeks, six weeks?
:smile: ... Dan has publicly said 'target in September'. β° ... soon ... very soon is fair to say if everything goes off without a hitch.
Hi everyone, should the docs also cover referencing a RCL that has components with scoped CSS?
At least reminding the net5.0
as a target and 5.0.0-preview.8.20414.8
as version for Microsoft.AspNetCore.Components
NuGet packages.
:smile: ... Dan has publicly said 'target in September'. β° ... soon ... very soon is fair to say if everything goes off without a hitch.
You don't say? π https://devblogs.microsoft.com/dotnet/announcing-net-5-0-rc-1/
Will try to carve out some time this week.
carve out some time this week
Me, too. I've a got a SEA π’ of Blazor WASM security bits to update!
Hi everyone, should the docs also cover referencing a RCL that has components with scoped CSS? At least reminding the
net5.0
as a target and5.0.0-preview.8.20414.8
as version forMicrosoft.AspNetCore.Components
NuGet packages.
Any thoughts, @javiercn?
@daveabrock We have project template for RCL which will be correctly set up to use scoped CSS by default, so hopefully that will put people on the right track. I'm not sure if we'll cover in the docs what versions of things are required, since typically the docs don't do that for each feature - the docs themselves are tied to an overall version of the framework.
Update for you, @guardrex: working with the RC1 bits and should have a PR for you tomorrow morning.
Thanks @daveabrock ... no giant huge rush if you feel that you need more time ... we are in preview after all.
@guardrex - I would like an initial review but I have QUESTIONS! Would you like a link to the branch or should I just do a PR, knowing there will be a lot of back and forth?
A link to your branch is fine. We can discuss it there.
btw--- My hours are almost burned for the week ... I have just a couple of hours left today, then I'm back on Monday morning. I suspect a discussion would bleed over to Monday. That's no big deal tho ... next week for this is fine. Everything for 5.0 is running very much on time π at the moment. π€π
A link to your branch is fine. We can discuss it there.
btw--- My hours are almost burned for the week ... I have just a couple of hours left today, then I'm back on Monday morning. I suspect a discussion would bleed over to Monday. That's no big deal tho ... next week for this is fine. Everything for 5.0 is running very much on time π at the moment. π€π
Thanks for letting me know and I definitely anticipated a few days to think through everything.
Here's a link to my updates in the branch (I also updated toc.yaml
so the nav is set to go):
https://github.com/daveabrock/AspNetCore.Docs/blob/daveabrock/css-isolation/aspnetcore/blazor/components/css-isolation.md
I welcome your feedback on content and tone.
My questions:
FigureThisOut
.I took a look ... yes, indeed! π· ... that looks great. The metadata looks good, and that ToC location is good. I actually think you could go ahead and send a PR to master
here now with that.
I know we don't want to endorse third-party tools this much
That's more of a personal thing with me than with MS and the Foundation. I yield to management. Go ahead and place whatever you feel is reasonable/useful. Thus far, that content is very light on specifics. If it stays that light, then perhaps just a link list to 3rd party preprocessor options can appear at the end of your CSS preprocessor support section ... a list where we would welcome 3rd party PRs that add new preprocessors to the list and thus level the playing field for everyone. We wouldn't be picking a (or a couple of) "winners" there.
I'll leave the rest of your bullets to Javier, but I'll mention that I do like the way you handle explaining a bit on how the infrastructure works. We don't do it a lot because in most cases we just want to say 'here's the feature, here's how to use it' and consider the framework's implementation details to be less relevant to most devs. In this case, it works well.
btw-- Javier is OOF at the moment ... stand-by for his response when he gets back.
Excellent. Thanks @guardrex.
Yes, I feel some infra is needed. I definitely thought about if it is worth it, but folks are very curious about how to integrate with other tools and to do that, some knowledge is needed.
I'll add a little to the preprocessor section sometime this weekend, then will have a fresh PR waiting for you all on Monday.
Have a good weekend!
::deep
token in your razor.css file to limit the applicability of the scope isolation so you can target markup defined by other components within your scope._framework/scoped.styles.css
We'll be providing more content here before this is ready.
/cc: @SteveSandersonMS