Skip to content
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

Add Include not-lastest-version: Part 1: client-side to grpc folders #33124

Closed
wants to merge 3 commits into from

Conversation

wadepickett
Copy link
Contributor

@wadepickett wadepickett commented Jul 20, 2024

Contributes to fixing #32886

1st of a few PR's. This PR covers folders of content in alpha order from client-side to grpc. 148 files.

[!INCLUDE[](~/includes/not-latest-version.md)] was inserted with one blank line above and below it existing after the edit.

Only files that met all of the following conditions received the inserted text:

  • Is a .md file.
  • Has versioning, indicated by :::Moniker range inline or monikerRange in the metadata
  • Does not already have [!INCLUDE[](~/includes/not-latest-version.md)] in it.
  • Is not an include file.
  • Does not start with an H2 "##" before instead of an H1.
  • Is not a README.md file (A few of these are in sample folders but are not accessible from the TOC).

Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
aspnetcore/client-side/dotnet-interop.md Run .NET from JavaScript
aspnetcore/client-side/spa-services.md Use JavaScript Services to Create Single Page Applications in ASP.NET Core
aspnetcore/data/ef-rp/crud.md Part 2, Razor Pages with EF Core in ASP.NET Core - CRUD
aspnetcore/data/ef-rp/intro.md Razor Pages with Entity Framework Core in ASP.NET Core - Tutorial 1 of 8
aspnetcore/diagnostics/asp0000.md aspnetcore/diagnostics/asp0000
aspnetcore/diagnostics/asp0001.md ASP0001: Authorization middleware is incorrectly configured
aspnetcore/diagnostics/asp0003.md "ASP0003: Do not use action results with route handlers"
aspnetcore/diagnostics/asp0004.md ASP0004: Do not use action results with route handlers
aspnetcore/diagnostics/asp0005.md aspnetcore/diagnostics/asp0005
aspnetcore/diagnostics/asp0006.md ASP0006: Do not use non-literal sequence numbers
aspnetcore/diagnostics/asp0007.md "ASP0007: Route parameter and argument optionality is mismatched"
aspnetcore/diagnostics/asp0008.md ASP0008: Do not use ConfigureWebHost with WebApplicationBuilder.Host
aspnetcore/diagnostics/asp0009.md aspnetcore/diagnostics/asp0009
aspnetcore/diagnostics/asp0010.md ASP0010: Do not use UseStartup with WebApplicationBuilder.WebHost
aspnetcore/diagnostics/asp0011.md "ASP0011: Suggest using builder.Logging over Host.ConfigureLogging or WebHost.ConfigureLogging"
aspnetcore/diagnostics/asp0012.md ASP0012: Suggest using builder.Services over Host.ConfigureServices or WebHost.ConfigureServices
aspnetcore/diagnostics/asp0013.md aspnetcore/diagnostics/asp0013
aspnetcore/diagnostics/asp0014.md ASP0014: Suggest using top level route registrations
aspnetcore/diagnostics/asp0015.md "ASP0015: Suggest using IHeaderDictionary properties"
aspnetcore/diagnostics/asp0016.md ASP0016: Do not return a value from RequestDelegate
aspnetcore/diagnostics/asp0017.md aspnetcore/diagnostics/asp0017
aspnetcore/diagnostics/asp0018.md ASP0018: Unused route parameter
aspnetcore/diagnostics/asp0019.md ASP0019: Suggest using IHeaderDictionary.Append or the indexer
aspnetcore/diagnostics/asp0020.md "ASP0020: Complex types referenced by route parameters must be parsable"
aspnetcore/diagnostics/asp0021.md ASP0021: The return type of the BindAsync method must be ValueTask<T>.
aspnetcore/diagnostics/asp0022.md aspnetcore/diagnostics/asp0022
aspnetcore/diagnostics/asp0023.md ASP0023: Route conflict detected between route handlers
aspnetcore/diagnostics/asp0024.md "ASP0024: A route handler has multiple parameters with the [FromBody] attribute"
aspnetcore/diagnostics/asp0025.md ASP0025: Use AddAuthorizationBuilder to register authorization services and construct policies.
aspnetcore/diagnostics/bl0001.md aspnetcore/diagnostics/bl0001

Note

This table shows preview links for the 30 files with the most changes. For preview links for other files in this PR, select OpenPublishing.Build Details within checks.

@wadepickett wadepickett self-assigned this Jul 20, 2024
@wadepickett
Copy link
Contributor Author

Closing and reopening for a fresh build.

@wadepickett wadepickett reopened this Jul 20, 2024
@wadepickett
Copy link
Contributor Author

wadepickett commented Jul 20, 2024

@Rick-Anderson or @tdykstra , I am getting blocking build warnings on the aspnetcore/includes/not-latest-version.md itself. Am I inserting or using it in a way that it was not intended possibly? Or perhaps we are just getting new build check warnings on that include we did not get before?

@wadepickett
Copy link
Contributor Author

@guardrex, you have been using this not-latest-version include for blazor content successfully. I don't know the history on it. Was it intended to included only for very for specific versions of doc with specific ranges? See the build errors on this PR.

@Rick-Anderson
Copy link
Contributor

@Rick-Anderson or @tdykstra , I am getting blocking build warnings on the aspnetcore/includes/not-latest-version.md itself. Am I inserting or using it in a way that it was not intended possibly? Or perhaps we are just getting new build check warnings on that include we did not get before?

I had the same error and @tdykstra showed me how to fix it. I don't remember the fix.

@guardrex
Copy link
Collaborator

guardrex commented Jul 21, 2024

I'm not sure that the current approach that was taken with the INCLUDE file can ever work. I don't think it can be used in files that are versioned for the current release (or later). What I think is happening is that ...

  • The current INCLUDE file has content for <8.0.
  • An article where it resides has metadata for monikerRange: '>= aspnetcore-8.0' or monikerRange: '>= aspnetcore-9.0.
  • Then,💥 ... there's no intersection for the <8.0 content of the INCLUDE file and the article's versioning.

What I do is leave it in place commented out with a searchable comment for activation at the next GA. For example ...

https://github.com/dotnet/AspNetCore.Docs/edit/main/aspnetcore/blazor/components/sections.md

When 9.0 comes out and I search "UPDATE 9.0" in the Blazor node (which will return a bunch of little things that I need to do around the Blazor docs when I'm working 9.0 tasks), I activate them (remove the comment). Any articles versioned >=9.0 won't be able to activate the INCLUDE until 10.0 releases. Therefore, I'm making it work by not using it for current or future release docs, and that's the only way that I think it can work in its current form.

Tom is aware of this because I see that he took a similar approach in ...

https://github.com/dotnet/AspNetCore.Docs/edit/main/aspnetcore/performance/caching/hybrid.md

... and he took the further step of surfacing the preview remark with ...

[!INCLUDE[](~/includes/not-ga-yet.md)] 

... which is something that I'm not currently doing but could do in the future.

@wadepickett
Copy link
Contributor Author

After discussing with TDykstra and including gaurdrex helpful info, it sounds like there are 3 conditions involved:

If the doc meta data at the top of the page has a monikerRange of:
monikerRange: '>= aspnetcore-8.0'

Then insert this just below the H1 (#):

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated
[!INCLUDE[](~/includes/not-latest-version.md)]
-->

If the doc meta data at the top of the page has a monikerRange of:
:::moniker range=">= aspnetcore-9.0"

Then insert this just below the H1 (#)

[!INCLUDE[](~/includes/not-ga-yet.md)]

<!--
[!INCLUDE[](~/includes/not-latest-version.md)] 
Uncomment this when 9.0 is the default value in the version selector and delete not-ga-yet.md
-->

If the doc meta data at the top of the page has a monikerRange that is anything <8.0:
Then insert this just below the H1 (#):

[!INCLUDE[](~/includes/not-latest-version.md)]

@wadepickett
Copy link
Contributor Author

wadepickett commented Jul 24, 2024

I will close this and do a much smaller number of files at a time until I am confident it all seems to work. Thanks everyone for the help. I wasn't catching on this still might be a bit experimental yet.

@guardrex
Copy link
Collaborator

That all sounds right to me. The only piece that I'm not doing right now is the [!INCLUDE[](~/includes/not-ga-yet.md)] bit, but I don't have new 9.0+ Blazor docs coming in for this release. I'd use that in the future tho, but I'd always mark it in the comment with "UPDATE 9.0" so that I can search them out later to find them (as you showed in your first example). The "UPDATE {VERSION}" comments have been super helpful 🦸 in avoiding having to litter the repo with issues or keep a long list of things that I need to check and update later.

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