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

Improve UX for creating a Blazor Web App when selecting None for the interactivity type #7092

Open
danroth27 opened this issue Sep 26, 2023 · 15 comments
Labels
area: Visual Studio The issue is related to Visual Studio New Project Dialog features related to template engine.

Comments

@danroth27
Copy link
Member

When creating a Blazor Web App, if you select None for the interactivity type then you can still select an interactivity location, which doesn't make any sense. Is there some way to disable the interactivity location option when the interactivity type is None? On the CLI should we make this an error?

@mkArtakMSFT
Copy link
Member

mkArtakMSFT commented Sep 26, 2023

@vlada-shubina this is a templating engine issue I believe. We've already setup the template to allow only one of these options but it seems the CLI ignores those. Where should I transfer this issue to for you to investigate?

@SteveSandersonMS
Copy link
Member

SteveSandersonMS commented Sep 26, 2023

To clarify further, the behavior that would make most sense is:

  • On CLI, setting an option that's not enabled according to isEnabled should ideally be an error. The option shouldn't simply be ignored.
  • In VS, when an option isn't available according to isEnabled, it should be greyed out in the UI or even removed from the UI completely

If you don't want to add these behaviors to the existing isEnabled option, would you consider adding a new option called something like isAllowed with these behaviors?

@javiercn
Copy link
Member

This is a request for the template engine

@javiercn javiercn transferred this issue from dotnet/aspnetcore Sep 27, 2023
@Eilon
Copy link
Member

Eilon commented Apr 3, 2024

We have an additional similar need in an upcoming Blazor Hybrid + Web project template scenario.

I want to have a UI in VS like this:

Create new Blazor Hybrid project

  • ✅ Include Blazor Web project with shared Razor UI
  • ✅ Configure for HTTPS (but ONLY enabled if previous checkbox is checked!)
  • ... and more options

In VS it would look like this when the top checkbox is checked:

image

And when it's unchecked:

image

As far as template.json syntax, I think it already exists, but apparently isn't supported in VS? See: #5648 (comment), #3341

And it seems Blazor already uses isEnabled in its templates for this scenario: https://github.com/dotnet/aspnetcore/blob/d7109b13bcc87601227ab4d643638dbeb6a87295/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/template.json

@baronfel
Copy link
Member

baronfel commented Apr 3, 2024

cc @phenning for the VS template engine host request - conditional symbols would be the solution here but they are only supported in the CLI at the moment.

@baronfel baronfel added the area: Visual Studio The issue is related to Visual Studio New Project Dialog features related to template engine. label Apr 3, 2024
@Eilon
Copy link
Member

Eilon commented Apr 4, 2024

Yup I just chatted with @phenning earlier today about this. We have workarounds for now but I think the best customer UI for our scenarios would require this new feature.

@Arclight3
Copy link

I also need this VS feature. I have a custom template and I want to hide or disable certain parameters based on a checkbox. It's a really bad user experience without this ability.

@Banner-Keith
Copy link

@baronfel is there a different team we need to complain to for the VS pieces?

@baronfel
Copy link
Member

Submitting feedback via the VS Developer Community would be the way to go. That'll get routed to @phenning and the rest of the team and can be used to help prioritize their backlog.

@Banner-Keith
Copy link

@baronfel I found this one. I am assuming this covers this scenario and we should just go vote for it>
https://developercommunity.visualstudio.com/t/conditional-parameter--hideshow-fields-/10254783

@danroth27
Copy link
Member Author

@sayedihashimi @vijayrkn What's the best way for us to make progress on this issue? Are you already tracking https://developercommunity.visualstudio.com/t/conditional-parameter--hideshow-fields-/10254783 on the VS side?

@sayedihashimi
Copy link
Member

@danroth27 we have move the item to our team. We will investigate. Hopefully this will be easy to implement, otherwise we may need to wait on adding this support. We will take a look to see how much effort this will take and then go from there.

Should we consider this an ask from the ASP.NET team to get this support added?

@danroth27
Copy link
Member Author

Should we consider this an ask from the ASP.NET team to get this support added?

Yes, this is needed to improve the user experience for both the Blazor Web App template and the upcoming Blazor Hybrid + Web template.

@sayedihashimi
Copy link
Member

@danroth27 thanks, we are investigating.

@prince272
Copy link

@danroth27 thanks, we are investigating.

How far with the investigation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Visual Studio The issue is related to Visual Studio New Project Dialog features related to template engine.
Projects
None yet
Development

No branches or pull requests