| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-3082.surge.sh |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #3082 +/- ##
=======================================
Coverage 69.02% 69.02%
=======================================
Files 858 858
Lines 23535 23535
Branches 1877 1877
=======================================
Hits 16246 16246
Misses 6336 6336
Partials 953 953
Continue to review full report at Codecov.
|
Sorry, something went wrong.
There was a problem hiding this comment.
After using the "select page (20 items)" on a couple pages, I found it a little odd that I could not deselect the page. If I want to deselect the current page, I either have to start over completely or deselect all 20 items in the page manually. That's a pain if I had already selected items on other pages.
It would be nice if the "select page (20 items)" turned into "deselect page (20 items)" after all items in the page have been selected.
Does the design include a deselect page feature?
Sorry, something went wrong.
There was a problem hiding this comment.
This is looking good @kmcfaul but just one issue I see. The checkbox should also be interactive to shortcut opening the menu to select items. So if either none or some are selected and I click the checkbox, it will select all. If all are selected, select none. @katierik can you confirm that this is your expectation, also?
Sorry, something went wrong.
|
Besides the interaction @mcarrano mentioned, there seems to be a bug where if you select all on the page, you get the indeterminate state checkbox. However if you select all, then select the page, you're left with the checked checkbox. I would expect the checkbox to be the same in those 2 scenarios. |
Sorry, something went wrong.
|
@mcarrano Should the 'select page' button in the dropdown behave as a toggle for the page (deselecting, if page is selected)? Per dlabreq's feedback. |
Sorry, something went wrong.
|
@mcarrano I will update the checkbox to act as a 'select all' toggle @mcoker If you select all, and select the page, the demo currently checks for unchecked rows and checks them, adding them to the selected count/state. The total number of items doesn't change, all are still selected, so the check mark should be correct. Unless the behavior is meant to be 'when the page is all selected, unselect the whole page'. |
Sorry, something went wrong.
|
@kmcfaul ah gotcha! I misunderstood, I thought if you went from "select all" to "select page", it would deselect anything that wasn't on the current page. |
Sorry, something went wrong.
|
@kmcfaul a couple of comments... 1- The checkbox now works as expected. Thanks for fixing that. |
Sorry, something went wrong.
|
In the POC for this we found that when anything was selected, it made the most sense to deselect is the user clicked on the bulk select box again (vs the original design/this implementation that clicking the partially selected selects more). |
Sorry, something went wrong.
|
@mcarrano I've been unable to reproduce the selection bug. Selecting the two pages manually or with two sets of 'select page' and then clicking on the next page button doesn't select all for me. Is it the next page button that is triggering the selection for you or is it another button? |
Sorry, something went wrong.
|
@katierik So the interaction for the select page should be: when there are no selections, select the whole page; when there are some selections / when the whole page is selected, deselect the whole page? |
Sorry, something went wrong.
|
@kmcfaul yes! |
Sorry, something went wrong.
|
This commit changes the top level toggle to clear selections when anything is selected (previously, selected everything first and only would deselect if everything was selected). That should match the gif. Should the 'select page' button switch between select and deselect for just the page though? I'm still confused if that should go in or not. @katierik |
Sorry, something went wrong.
@kmcfaul I did some more detective work on this and here's what seems to be happening. If I'm careful to click on the toggle in the split button it works fine, but if I accidentally click on the text, it's the same as clicking the checkbox. Can we make it so the text is not active? Also, I think it would help the demo if we can drop a pagination component in the top toolbar as well as the footer. It would just be easier to know what page I'm on. Thanks! |
Sorry, something went wrong.
|
@mcarrano The text fires off the click/change events natively as it is a label for the checkbox. I would have to restructure the DropdownToggleCheckbox component a bit to disable the text firing off these events. Should I go ahead and include that in this PR, or would this be a separate issue? I will add the extra pagination location. |
Sorry, something went wrong.
…ed up checkbox event handling s
|
@kmcfaul Yes, I think we will want to do that restructuring. Normally we do want to have a checkbox label toggle the state of a checkbox, but in this case the text does not label the checkbox exactly, so it becomes a usability problem. I would be OK if clicking on the text either did nothing or if it opened the dropdown menu. Will this also require a core change? There may also be an accessibility consideration here. @jessiehuff thoughts? As for whether to combine with this PR or open a new issue, I will defer to @tlabaj . If you need me to open a separate issue for this, I can do that. |
Sorry, something went wrong.
|
@mcarrano I found an alternative, taking the text out of the checkbox component, the spacing is a little wider but it should behave as intended. I also took out the behavior where clicking the checkbox also opens the dropdown, but if that should be preset I can add it back in. |
Sorry, something went wrong.
|
Excellent @kmcfaul ! I actually like the wider spacing as it makes it clear that the text and checkbox are not functionally connected. I think the only pending question is whether the 'select page' should toggle to 'deselect page'. Let me connect with @katierik today and we'll give you an answer. |
Sorry, something went wrong.
|
|
||
| fetch(page, perPage) { | ||
| this.setState({ loading: true }); | ||
| fetch(`https://jsonplaceholder.typicode.com/posts?_page=${page}&_limit=${perPage}`) |
There was a problem hiding this comment.
Not a huge fan of being dependent on jsonplaceholder.typicode.com , but understandable for now.
Sorry, something went wrong.
There was a problem hiding this comment.
A few small comments, overall it looks great! Nice job 👍
Sorry, something went wrong.
There was a problem hiding this comment.
👍Nice work!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What: adds an interactive demo between table and toolbar for bulk select functionality.
Refer to issue: #2910