-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
QuickGrid empty rows and border styling #34214
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one suggestion to simplify the content, but otherwise looks good to me.
Co-authored-by: Daniel Roth <[email protected]>
I think we would use the fixed row height approach in the tutorial, so that all the pages of data have the same height, including the last one. |
Right, the idea is that the grid maintains the same size and styling across all pages. Presumably you're using paging because you have a lot of data that you don't want to retrieve and display all at once, so it's really only the last page that shows the empty rows. For the tutorial, if we only have five sample movies, maybe we should make the page size five? As for centering the text, we can do that too if you think it's important. I admit that I'm not a designer! 😆 |
I see; but as soon as they add or subtract from the tutorial's default five records (or even filter records down to one or two), they get the ugly and confusing borders. Another possibility is to not use a Paginator ... just mention that it exists in passing. It renders beautifully without it. Let me know which way you want to go with it, and I'll take care of it tomorrow morning. I'm kind'a hoping to either just drop paging (with a passing mention of the feature) or just go with five records and no isolated CSS styling because adding more content is going to add more meat to an already lengthy and involved tutorial. |
I'd like to still include the paginator. The main addition is to guide the user to style the rows with a fixed height so that the paginator doesn't jump to a different position on the last page. That way, every page of data shows the exact same styling for the rows and the paginator doesn't move. The borders are going to be there when there's data in the rows, right? Why would you not expect the same styling to be there on the last page when some of the rows are empty? |
I see your point. I opened #34217, and I'll resolve it tomorrow ... before I leave for the break and die of a 🦃 overdose! 😆 |
I tries to add the following scoped css in my {COMPONENT}.razor.css (in my case it is Index.razor.css as I am doing the Movie example from the beginners guide). Unfortunately, the scoped css is not getting applied (even after I pressed Ctrl+F5). Is there anything new that has to be done, since the css is in Assets? This is the scoped css, I tried:
I also tried:
but the scoped css is not being applied to the quickgrid. Please help. |
Did u wrap the Quickgrid in a block element like a <div>
<QuickGrid ...>
...
</QuickGrid>
</div> |
No. I followed the tutorial, so I used the scaffold pages. Here is the code:
|
Yeah ... go ahead and wrap that The tutorial will be updated to cover that soon. It's on a PR at ... You can look at the diff on that PR to see what I'm proposing thus far for new coverage. I think Dan and I will have that merged next week when we get back from the 🦃 holiday. |
... and the sample app has been updated already. You can see the final component here ... ... and the isolated stylesheet here ... |
Can the scaffolding be updated as well? |
@AJ1000 ... It might take place as part of dotnet/aspnetcore#59078 (see the opening two paragraphs of that issue). However, that's backlogged, and it's not clear if merely including an empty data template that has the option for styling would make its way into a scaffolded QG. For now, it looks like only docs will cover it. I'm going to make some improvements to the original coverage to go in with the updates to the Blazor movie dB tutorial. I don't think it will be difficult for folks to find and use the updated guidance after #34227 goes in. |
Thanks for the info, the scaffolding css should, in my opinion, have the css so it looks the same as dotnet 8. Then Dan can demo this without having to add css to cover this issue. |
Fixes #34211
This includes the border fix, if you wish to keep it. I'll track the empty data row template PU issue, possibly for .NET 10, which will lead to >=10 modifications to that part of the coverage here.
Do you want the movie dB tutorial to include the border workaround for empty rows?
Internal previews