-
Notifications
You must be signed in to change notification settings - Fork 11
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
Refactor(Pagination): convert Pagination instances to PF4 #129
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #129 +/- ##
======================================
Coverage ? 74.74%
======================================
Files ? 98
Lines ? 3093
Branches ? 852
======================================
Hits ? 2312
Misses ? 691
Partials ? 90 Continue to review full report at Codecov.
|
553f342
to
ffbc184
Compare
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.
@jenny-s51
This looks like another Redux state piece we can simplify. I gave you enough to get started, there are a few pieces missing... like passing the values back to state, updating the constants file associated with viewPaginationConstants.js
and the unit test viewOptionsReducer.test.js
We'll see how it goes, then move to the next set of tweaks
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.
@cdcabrera Thank you for all your awesome and helpful suggestions on this!! I think I've addressed your comments and just wanted to confirm... is this what you had in mind for the bottom pagination?
I had to make a couple more updates which included making the perPage
menu open upwards, and removing the padding-bottom: 0 !important;
from the css class since visually we'd need to keep that bottom padding there! WDYT?
@jenny-s51 heh, close, but not quite... paging needed to stay where it was to account for the infinite page scroll. We're just using the styling from bottom paging, not the location... the top styling unfortunately removes some of the features on smaller screens, limiting accessibility and general use, blame PF for that one. Once you move the paging back to the top, with the bottom styling, while doing the required updates, I'll review |
@cdcabrera found a bug while making the most recent updates -- I tested out a whole bunch of z-index changes on our css (and did a whole bunch of experimenting in the PF docs), but can't seem to get that options menu out in front of the list content on smaller viewports! This behavior currently exists in the PF docs too, so I opened an issue: patternfly/patternfly-react#7786 Definitely a weird one! Let me know what you think is the best course of action here. A potential workaround might be to have both top and bottom pagination for now? |
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.
@jenny-s51 I can not recreate the z-index issue that you're seeing, even after
multiple reinstalls,a clean install of just your repo and branch
-making sure the latestdev
branch changes were theremaking sure the NPM packages were updatedchecking other browsersand generally making sure my tests are coming back cleantime has now been burned...
I recommend you
run through a normal clean installinvestigate your testsdouble check your commit rebasepause the bug you opened on PF and acknowledge that you still need to investigate the issue Bug - Pagination - dropdown obstructed on dropDirection="down" in smaller viewports patternfly/patternfly-react#7786
Your unit snapshots are showing you exactly the z-index issue, HTML sequencing... there is a high probability this is an issue with your PR, not Patternfly.
If you continue to have issues, we can walk through what each of is seeing as a 1:1 after you've gone through the recommendations.
You've got more investigation to do
@jenny-s51 I was finally able to recreate this issue by doing another clean install, and dropping down to below 800px
ish screen-width. That being said, this is a non-issue for this repository, specifically, because we're planning on updating the inventory list it is important to follow process.
We're still recommending you
- make sure your tests are updated, snapshots and all
- update your branch and commits
- and still acknowledge that this may be a non-issue for this repository on the PF issue
- Continue with doing the updates as is. Once that inventory update goes into place refactors will be happening based on UX-designs recommendations.
In the future, to avoid confusion and wasting time, it is recommended your branch and ALL unit tests be updated before calling out issues. It makes reviewing more difficult when things are partially updated.
src/components/scans/__tests__/__snapshots__/scans.test.js.snap
Outdated
Show resolved
Hide resolved
src/components/sources/__tests__/__snapshots__/sources.test.js.snap
Outdated
Show resolved
Hide resolved
src/redux/reducers/__tests__/__snapshots__/viewOptionsReducer.test.js.snap
Show resolved
Hide resolved
f47c3a6
to
ad79797
Compare
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.
Thank you for your feedback and suggestions @cdcabrera - moving forward I will make sure to update tests/snapshots before raising an issue.
I've proceeded with the updates as-is, but this PR will include a buggy instance of the pagination dropdown on viewports < 800px, since we're using the bottom styling at the top. Based on your comments, it seems like that's fine for the time being?
We are going against design guidelines by implementing pagination this way, so I can close the PF issue, since this one specific use case probably doesn't need to be supported! As you said, it sounds like we will be doing some more refactoring to follow UX guidelines down the road!
this is a non-issue for this repository, specifically, because we're planning on updating the inventory list
Would you mind clarifying what you mean by this? Are you referring to #106 or something else?
@jenny-s51 We are headed towards release points, 3 of them to be exact, 1 we've already completed. This is going to sound harsh, but as a general developer you do not need the full picture, that is the role. |
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.
Minor update
After that and the unit tests are updated, if any, and short of any other issues that pop up, we'll be good
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.
z-index issue to be addressed with table update.
Everything else is groovy
* styling, temp adjustments * viewPaginationRow, pf4 component * viewPaginationConstants, updated types * viewOptionsReducer, focus paging, clean up
* styling, temp adjustments * viewPaginationRow, pf4 component * viewPaginationConstants, updated types * viewOptionsReducer, focus paging, clean up
* styling, temp adjustments * viewPaginationRow, pf4 component * viewPaginationConstants, updated types * viewOptionsReducer, focus paging, clean up
* styling, temp adjustments * viewPaginationRow, pf4 component * viewPaginationConstants, updated types * viewOptionsReducer, focus paging, clean up
What's included
...
Closes #128
Example
Before:
After:
Updates issue/story
DISCOVERY-154