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

JavaScript Sample Request for Common Blazor Needs #27071

Closed
kenneymyers opened this issue Oct 20, 2020 · 3 comments
Closed

JavaScript Sample Request for Common Blazor Needs #27071

kenneymyers opened this issue Oct 20, 2020 · 3 comments
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. Status: Resolved
Milestone

Comments

@kenneymyers
Copy link

Is your feature request related to a problem? Please describe.

We have been working on a Blazor server-side project and every once in a while despite our best efforts we have to fall back to javascript to solve some common problems. A great example of that is is to discover the browser size and get notifications of resizing so we can specifically modify markup as needed (when CSS is not enough). We have been using this nuget package https://github.com/EdCharbeneau/BlazorSize but I feel like this is a pretty common need. We can do quite a bit with CSS but sometimes we just really need to modify the markup ourselves depending on the screen size. Another example is just popping up a modal on the client. Currently we have a custom solution for doing that which relies on invoking a modal passing a class name of the modal I want to pop like so:

From the code behind:
await jSRuntime.InvokeVoidAsync("JSModal", ".price-grid-modal");

In the layout:
<script>
window.JSModal = (modalClass) => {
$(modalClass).modal();
}
</script>

I'm not sure if that is enough to give you an idea but there are a handful of things that developers really want/need that currently we need JavaScript for so more examples of those would be great.

Describe the solution you'd like

This may be just a great example for another article/blog entry. If you can just extend the JavaScript Interop examples for common types of tasks that the client does need to execute I think it would be very well received.

Additional context

The community is growing pretty strong around Blazor so there are some excellent nuget packages out there but due to lots of breaking changes over the last couple of years more examples from you would be very welcome. It's honestly an AWESOME stack and very few things are confusing about it but more practical examples would be great. Thank you!

@javiercn javiercn added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Oct 20, 2020
@javiercn
Copy link
Member

@longhornleads thanks for contacting us.

We've been tracking some of these things and we've been adding explicit support for some of them, some examples are our work on 5.0 to make list virtualization or file uploads more accessible.

That said, it is important to note that we can't ship a solution inbox for every single problem users will face, and that relying on the Blazor ecosystem to solve these types of problems is perfectly fine.

We normally try to tackle specific cases where there is a lot of requests and there are no good solutions on the ecosystem.

I would suggest that you post your question/ask here to bring visibility to it.

@mkArtakMSFT mkArtakMSFT added the enhancement This issue represents an ask for new feature or an enhancement to an existing one label Oct 21, 2020
@mkArtakMSFT mkArtakMSFT added this to the Backlog milestone Oct 21, 2020
@ghost
Copy link

ghost commented Oct 21, 2020

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@SteveSandersonMS
Copy link
Member

I'll close this because it doesn't sound like there's any specific action to take here (it's too general), but if anyone wants to propose specific new doc topics please file separate issues for those. Hope that's OK!

@SteveSandersonMS SteveSandersonMS added the ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. label Nov 6, 2020
@ghost ghost added the Status: Resolved label Nov 6, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. Status: Resolved
Projects
None yet
Development

No branches or pull requests

4 participants