| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
PatternFly-React preview: https://patternfly-react-pr-2904.surge.sh |
Sorry, something went wrong.
|
Trying to change DropdownToggle in OptionsToggle to OptionsMenuToggleWithText doesn't help much. HTML variant has button.pf-c-options-menu__toggle-button, but I'm unable to see how we can get this without the .pf-c-dropdown__toggle being added |
Sorry, something went wrong.
|
Had a chat on Slack with mnolting in #patternfly-core. The culprit is .pf-c-dropdown__toggle being applied, which is due to using the DropdownToggle component in OptionsMenu. What I can see this will need to have a slightly larger refactor to drop DropdownToggle and still have the same functionality |
Sorry, something went wrong.
|
I've managed to sync everything with HTML version. One note to keep in mind, to get around applying .pf-c-dropdown__toggle class to the dropdown I added a DropdownContext.Provider with toggleClass value of a space which is shown in the outputted HTML. Will rebase with master once build process is fixed |
Sorry, something went wrong.
|
Looks like .pf-c-options-menu is nested in another .pf-c-options-menu, and in the top level .pf-c-options-menu, there is a #pagination-options-menu-top-label element with "Items per "Items per page" is an aria-label on the toggle button in core, and the .pf-c-options-menu__menu element's aria-labelledby is set to the ID of the toggle button. Also looks like .pf-c-options-menu__menu-item is listed twice on the menu items And for the .pf-c-options-menu__menu-item-icon, can we just apply that class directly to the <svg> and remove the <i>? |
Sorry, something went wrong.
|
Fixed all but the .pf-c-options-menu__menu-item-icon. Putting on the SVG itself didn't work. Personally I think it would be better to keep it to an <i> as it is in core so that the elements don't change I also added export * from './DropdownWithContext'; in Dropdown/index.tsx so it can be imported in PaginationOptionsMenu.tsx |
Sorry, something went wrong.
|
@spytec thanks! I opened patternfly/patternfly#2297 re: the SVG/icon class. This looks good to me, although I'm still seeing this element in the react component that isn't in the core examples: And in the react component, .pf-c-options-menu__toggle-button has aria-label="Select" and in core, we have aria-label="Items per page". @jessiehuff or @jgiardino can you confirm if we need to make updates there? |
Sorry, something went wrong.
|
Glanced over that, sorry! I can fix it soon-ish if need be |
Sorry, something went wrong.
|
Replying to @mcoker's comment above, there is a related open issue to the aria label applied to the toggle: #1882 Ignore this, see next comment The main difference I'm seeing is that in core, the text that displays in the toggle "x-y of z items" is not part of the button. But in react, it is. |
Sorry, something went wrong.
|
Doh! I was looking at the current version of the react component, and not the fixes included in this PR. 😜 This hidden span was an artifact of the old way we were labelling the toggle. It can be removed. That issue I mention above is still relevant, but not a blocker for this PR. |
Sorry, something went wrong.
There was a problem hiding this comment.
@mcoker @spytec As far as the aria-label, Select is just a default in the OptionsToggle class, we can edit to match core with Items per page. For the top level label, I believe that's something added for the accessibility of the example (@jgiardino). Edit: answered above
Changes look good and will make styling of the compact pagination uniform with core as well.
Sorry, something went wrong.
There was a problem hiding this comment.
I think this looks good from a UX perspective. There are still some spacing differences with core, but after discussing with @mcoker it looks like this is an artifact of the different ways icons are rendered between core and React. It becomes very pronounced here with the horizontal stacking of icons in the design. @LHinson something to note for future improvement, but beyond the scope of this PR
Sorry, something went wrong.
|
Fixed the last bit with Select aria-label so it's now Items per page. Also removed old labelling <span id="pagination-options-menu-top-label" hidden="">Items per page:</span> as suggested |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #2904 +/- ##
=========================================
Coverage ? 68.94%
=========================================
Files ? 852
Lines ? 23290
Branches ? 1792
=========================================
Hits ? 16057
Misses ? 6344
Partials ? 889
Continue to review full report at Codecov.
|
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What: Fix differences with upstream. This makes Pagination be identical to HTML variant
Additional issues: Fixes #2903
Note, work in progress. Trying to figure out the best approach for fixing the font size and padding of the dropdown button as well as the font color. Fixed