Skip to content

{Date, Time}Only Querystring building APIs for Blazor #35567

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

Closed
TanayParikh opened this issue Aug 20, 2021 · 7 comments · Fixed by #35569
Closed

{Date, Time}Only Querystring building APIs for Blazor #35567

TanayParikh opened this issue Aug 20, 2021 · 7 comments · Fixed by #35569
Assignees
Labels
api-approved API was approved in API review, it can be implemented area-blazor Includes: Blazor, Razor Components Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one
Milestone

Comments

@TanayParikh
Copy link
Contributor

TanayParikh commented Aug 20, 2021

Background and Motivation

This is an extension of #34115 to support DateOnly and TimeOnly, given we already support DateTime.

Proposed API

namespace Microsoft.AspNetCore.Components
{
    public static class NavigationManagerExtensions
    {
+       public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, DateOnly value)
+       public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, DateOnly? value)
+       public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, TimeOnly value)
+       public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, TimeOnly? value)
    }
}

Usage Examples

[Parameter, SupplyParameterFromQuery]
public DateOnly OnlyTheDate { get; set; }

[Parameter, SupplyParameterFromQuery]
public TimeOnly OnlyTheTime { get; set; }

Alternative Designs

N/A, extension of existing API.

Risks

Concept count / complexity. Other than that, it's a fairly straightforward change that a user has requested already.

@TanayParikh TanayParikh added api-suggestion Early API idea and discussion, it is NOT ready for implementation api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one and removed api-suggestion Early API idea and discussion, it is NOT ready for implementation labels Aug 20, 2021
@TanayParikh TanayParikh self-assigned this Aug 20, 2021
@ghost
Copy link

ghost commented Aug 20, 2021

Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:

  • The PR contains changes to the reference-assembly that describe the API change. Or, you have included a snippet of reference-assembly-style code that illustrates the API change.
  • The PR describes the impact to users, both positive (useful new APIs) and negative (breaking changes).
  • Someone is assigned to "champion" this change in the meeting, and they understand the impact and design of the change.

2 similar comments
@ghost
Copy link

ghost commented Aug 20, 2021

Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:

  • The PR contains changes to the reference-assembly that describe the API change. Or, you have included a snippet of reference-assembly-style code that illustrates the API change.
  • The PR describes the impact to users, both positive (useful new APIs) and negative (breaking changes).
  • Someone is assigned to "champion" this change in the meeting, and they understand the impact and design of the change.

@ghost
Copy link

ghost commented Aug 20, 2021

Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:

  • The PR contains changes to the reference-assembly that describe the API change. Or, you have included a snippet of reference-assembly-style code that illustrates the API change.
  • The PR describes the impact to users, both positive (useful new APIs) and negative (breaking changes).
  • Someone is assigned to "champion" this change in the meeting, and they understand the impact and design of the change.

@TanayParikh TanayParikh added this to the 6.0-rc2 milestone Aug 20, 2021
@ghost
Copy link

ghost commented Aug 20, 2021

Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:

  • The PR contains changes to the reference-assembly that describe the API change. Or, you have included a snippet of reference-assembly-style code that illustrates the API change.
  • The PR describes the impact to users, both positive (useful new APIs) and negative (breaking changes).
  • Someone is assigned to "champion" this change in the meeting, and they understand the impact and design of the change.

2 similar comments
@ghost
Copy link

ghost commented Aug 20, 2021

Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:

  • The PR contains changes to the reference-assembly that describe the API change. Or, you have included a snippet of reference-assembly-style code that illustrates the API change.
  • The PR describes the impact to users, both positive (useful new APIs) and negative (breaking changes).
  • Someone is assigned to "champion" this change in the meeting, and they understand the impact and design of the change.

@ghost
Copy link

ghost commented Aug 20, 2021

Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:

  • The PR contains changes to the reference-assembly that describe the API change. Or, you have included a snippet of reference-assembly-style code that illustrates the API change.
  • The PR describes the impact to users, both positive (useful new APIs) and negative (breaking changes).
  • Someone is assigned to "champion" this change in the meeting, and they understand the impact and design of the change.

@ghost ghost added the Working label Aug 20, 2021
@ghost
Copy link

ghost commented Aug 20, 2021

Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:

  • The PR contains changes to the reference-assembly that describe the API change. Or, you have included a snippet of reference-assembly-style code that illustrates the API change.
  • The PR describes the impact to users, both positive (useful new APIs) and negative (breaking changes).
  • Someone is assigned to "champion" this change in the meeting, and they understand the impact and design of the change.

@pranavkm pranavkm added api-approved API was approved in API review, it can be implemented and removed api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews labels Aug 23, 2021
@pranavkm pranavkm modified the milestones: 6.0-rc2, 6.0-rc1 Aug 23, 2021
github-actions bot pushed a commit that referenced this issue Aug 23, 2021
@ghost ghost added the Done This issue has been fixed label Aug 24, 2021
TanayParikh added a commit that referenced this issue Aug 24, 2021
#35569)

* Add Support for `DateOnly` & `TimeOnly` for `SupplyParameterFromQuery`

Fixes: #35525
API Proposal: #35567

* Update RoutingTest.cs

* Update RoutingTest.cs

* Fix Tests
@ghost ghost removed the Working label Aug 24, 2021
Pilchie pushed a commit that referenced this issue Aug 24, 2021
wtgodbe added a commit that referenced this issue Aug 24, 2021
* Update dependencies from https://github.com/dotnet/efcore build 20210821.6 (#35617)

Microsoft.EntityFrameworkCore.Tools , dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.Design
 From Version 6.0.0-rc.1.21420.45 -> To Version 6.0.0-rc.1.21421.6

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* Update docker container to mcr (#35630)

Co-authored-by: Brennan <[email protected]>

* [release/6.0-rc1] Update dependencies from dotnet/runtime dotnet/efcore (#35634)

[release/6.0-rc1] Update dependencies from dotnet/runtime dotnet/efcore

* [release/6.0-rc1] HTTP/3: Response drain timeout (#35492)

- backport of #35322 to release/6.0-rc1

* [release/6.0-rc1] Reliability improvement for input date E2E tests (#35616)

* Reliability improvement for input date E2E tests

* Avoid "collection was modified" error in CircuitGracefulTerminationTests

* Avoid timing issues in CanFocusDuringOnAfterRenderAsyncWithFocusInEvent

* Update src/Components/test/E2ETest/Tests/FormsTest.cs

Co-authored-by: Tanay Parikh <[email protected]>

* Remove notes from earlier

Co-authored-by: Steve Sanderson <[email protected]>
Co-authored-by: Tanay Parikh <[email protected]>

* Minimal APIs naming cleanup

* Add Support for `DateOnly` & `TimeOnly` for `SupplyParameterFromQuery`

Fixes: #35525
API Proposal: #35567

* Add FailureReasons (#35425)

* Add support for Results extension point

Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Brennan <[email protected]>
Co-authored-by: James Newton-King <[email protected]>
Co-authored-by: Steve Sanderson <[email protected]>
Co-authored-by: Tanay Parikh <[email protected]>
Co-authored-by: Stephen Halter <[email protected]>
Co-authored-by: Tanay Parikh <[email protected]>
Co-authored-by: Hao Kung <[email protected]>
Co-authored-by: Safia Abdalla <[email protected]>
Co-authored-by: Doug Bunting <[email protected]>
@ghost ghost locked as resolved and limited conversation to collaborators Sep 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-approved API was approved in API review, it can be implemented area-blazor Includes: Blazor, Razor Components Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants