| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report
@@ Coverage Diff @@
## master #3294 +/- ##
=========================================
Coverage ? 67.44%
=========================================
Files ? 892
Lines ? 24874
Branches ? 2141
=========================================
Hits ? 16776
Misses ? 7093
Partials ? 1005
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3294.surge.sh |
Sorry, something went wrong.
|
Looks like we have two PRs for the same issue? |
Sorry, something went wrong.
There was a problem hiding this comment.
👍
Sorry, something went wrong.
| if (res.length === 0) { | ||
| const rows = [{ | ||
| heightAuto: true, | ||
| cells: [ | ||
| { | ||
| props: { colSpan: 8 }, | ||
| title: ( | ||
| <Bullseye> | ||
| <EmptyState variant={EmptyStateVariant.small}> | ||
| <EmptyStateIcon icon={SearchIcon} /> | ||
| <Title headingLevel="h2" size="lg"> | ||
| No results found | ||
| </Title> | ||
| <EmptyStateBody> | ||
| No results match the filter criteria. Remove all filters or clear all filters to show results. | ||
| </EmptyStateBody> | ||
| </EmptyState> | ||
| </Bullseye> | ||
| ) | ||
| }, | ||
| ] | ||
| }] |
There was a problem hiding this comment.
How do users see the empty state? Do we need to edit the code to remove rows?
Sorry, something went wrong.
There was a problem hiding this comment.
we should probably add a filter to the table and if a filter is set show empty state.
Sorry, something went wrong.
| </Table> | ||
| )} | ||
| {loading && <center><Title size="3xl">Please wait while loading data</Title></center>} | ||
| {loading && <center><Spinner size="xl"/></center>} |
There was a problem hiding this comment.
I'm not seeing a spinner. I briefly see the empty state prior to loading the table rows. Is there a way to better see this?
Sorry, something went wrong.
|
@nicolethoen for some reason I don't seem to be able to access the preview link. It says "project not found." |
Sorry, something went wrong.
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3294.surge.sh |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks great! Built and ran locally...
Thanks for adding the radio buttons
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3294.surge.sh |
Sorry, something went wrong.
There was a problem hiding this comment.
@nicolethoen finally was able to preview this. Just a couple of changes to request.
Can the header row for the table be shown when the data is being loaded as it does for the empty state?
For the empty state, there should be a 'Clear all filters' action associated with the empty state.
See the core demos here for reference: https://www.patternfly.org/v4/documentation/core/demos/table
Sorry, something went wrong.
|
@mcarrano those changes should be no problem! There are no filters on the table though, so the 'Clear All Filters' action would be a dead action, so do we still want it? I removed it intentionally for just that reason. If we don't want a dead action, I should probably change the text under the EmptyStateIcon as well so it doesn't reference filters either. But then I'm not sure the best thing for it to say. |
Sorry, something went wrong.
|
That's an interesting question @nicolethoen . I think it's important to have the Clear filters action since this message would only really appear as the result of a filter. But you are right that this would not really do anything in the current demo. Would it take much to add a simple filter to this, like just a Select list with some values? |
Sorry, something went wrong.
|
@mcarrano we have a filterable table demo... would it need to also use the experimental data toolbar to be implemented correctly? seems out of scope for this demo. The only legitimate reason there would be no data to display is if no data is returned from the API. It'd be more of an error. |
Sorry, something went wrong.
|
Yes, that's true @nicolethoen . But this is a slightly different empty state pattern in that case. I will try to set up some time to sync with you on what to put here. |
Sorry, something went wrong.
|
Note: radio buttons were removed - it was decided they were muddying context for the user a little bit. And 'Empty State' was replaced with more of an 'Error state' that is not demonstrated intentionally as part of the demo - but if there is an ever some unknown error retrieving data, it will fail gracefully. Any anyone curious about error handling in this case can look at how it's handled in the code. It was decided this demo is not going to highlight the error state, because it is not an Error State demo, it is a Pagination Table demo. |
Sorry, something went wrong.
There was a problem hiding this comment.
Wasn't the issue to add "spinner and empty state" to the demo? It's not obvious that these features exist in this example -- I'm not able to see the spinner, nor the empty state. Is there a way we can solve that?
FYI, I had closed #1433 because this issue was to provide empty state functionality.
Sorry, something went wrong.
|
@dlabrecq I dont think that the Pagination Demo is the place to demonstrate the empty state or error state of a table. It is simply for demonstrating pagination. The other demos don't explicitly demonstrate empty states or error states either. Before the change, as data was being loaded and paginated, you saw a message that quickly flashed Please wait while loading data before it disappeared. Now you see the spinner instead. And we've added an error state if no data is retrieved, which should never happen unless there is a connectivity issue - so I added the error state so that any issues that arise will fail gracefully using a Patternfly pattern. So it's not explicitly demonstrable, but is more there as it should if anyone wants to implement Pagination in their table correctly. I think that is following the demo precedent we've established. These changes were made after talking to @mcarrano and Content strategist Margot |
Sorry, something went wrong.
|
I'll also add that the Filterable Table demo does demonstrate an empty state when all options have been filtered out. That seems to be a more relevant place to demonstrate this. @dlabrecq |
Sorry, something went wrong.
|
I'm just going by what issue #3184 is asking for. If the functionality is not appropriate for the pagination demo, then perhaps we should not modify this particular demo? Or, leave the issue open? Regardless, my issue is that I don't even see the spinner. |
Sorry, something went wrong.
|
Your machine must be processing the data too fast for you to see it. I almost always see it when I change pagination pages, or when I change the number of items displayed per page. @dlabrecq @mcarrano would it be appropriate to add a 'View Loading State" checkbox to force the table to stay in a loading state? |
Sorry, something went wrong.
|
How about a timeout that loads the table after a second or two? Then, there is no need for a checkbox |
Sorry, something went wrong.
|
@nicolethoen @dlabrecq I'm good with either of those approaches. It was the inclusion of the empty state here that was causing me the most confusion. I'm wondering if we should have a demo that shows the various types of empty states in context as there are lots of different reasons to get an empty state. Do you think that would be useful? |
Sorry, something went wrong.
Sorry, something went wrong.
|
@nicolethoen It makes sense to me to create these in a separate but related demo. I've left a comment to see if we can get that om the roadmap. |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good!
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for creating a new issue
Sorry, something went wrong.
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #3184