Skip to content
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

feat(Pagination): add disabled flag for whole component #2586

Merged
merged 5 commits into from Aug 8, 2019

Conversation

@kmcfaul
Copy link
Contributor

kmcfaul commented Jul 24, 2019

What: Adds 'isDisabled' flag to disable the whole pagination component.

See issue: #2315

@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Jul 24, 2019

PatternFly-React preview: https://patternfly-react-pr-2586.surge.sh

Copy link
Member

christiemolloy left a comment

Looks great. The options menu toggle isn't aligning correctly, looks like its only in the pagination component:

Screen Shot 2019-07-25 at 1 20 44 PM

@kmcfaul

This comment has been minimized.

Copy link
Contributor Author

kmcfaul commented Jul 25, 2019

The options menu toggle isn't aligning correctly

Am I missing a class?

@kmcfaul kmcfaul force-pushed the kmcfaul:pagination-disabled branch from 0e8bb9e to 1a0f09e Jul 26, 2019
@kmcfaul kmcfaul force-pushed the kmcfaul:pagination-disabled branch from 1a0f09e to 7f67e2a Jul 31, 2019
Copy link
Contributor

tlabaj left a comment

Looking good. Can you update the demo app and the integration test please

@kmcfaul kmcfaul force-pushed the kmcfaul:pagination-disabled branch from b079f62 to 44bec10 Aug 6, 2019
Copy link
Contributor

mcoker left a comment

👍

Copy link
Contributor

tlabaj left a comment

LGTM

parentRef = null,
toggleTemplate: ToggleTemplate = '',
}:OptionsToggleProps ) => {
return (
<div className={css(styles.optionsMenuToggle, getModifier(styles, 'plain'), getModifier(styles, 'text'))} >
<div className={css(styles.optionsMenuToggle, isDisabled && getModifier(styles, 'disabled'), getModifier(styles, 'plain'), getModifier(styles, 'text'))} >

This comment has been minimized.

Copy link
@jschuler

jschuler Aug 7, 2019

Collaborator

nit: it generally makes more sense to use getModifier if a variable prop can be matched to the style object. In this case i would change these to styles.disabled, styles.plain, etc..

This comment has been minimized.

Copy link
@kmcfaul

kmcfaul Aug 8, 2019

Author Contributor

Ah I thought that was just how we retrieved modifier styles. I can change it to styles.modifiers.disabled and so on.

import React from 'react';
import { Pagination, PaginationVariant } from '@patternfly/react-core';
class PaginationTop extends React.Component {

This comment has been minimized.

Copy link
@jschuler

jschuler Aug 7, 2019

Collaborator

nit: class name should be PaginationDisabled. Doesn't affect the rendering but shows up in the sample code

@kmcfaul kmcfaul dismissed stale reviews from tlabaj and mcoker via 0e217f3 Aug 8, 2019
@tlabaj
tlabaj approved these changes Aug 8, 2019
Copy link
Contributor

tlabaj left a comment

LGTM

@jschuler jschuler merged commit 7683f68 into patternfly:master Aug 8, 2019
8 checks passed
8 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build_integration Your tests passed on CircleCI!
Details
ci/circleci: build_pf3_docs Your tests passed on CircleCI!
Details
ci/circleci: build_pf4_docs Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test_jest_other Your tests passed on CircleCI!
Details
ci/circleci: test_jest_pf4 Your tests passed on CircleCI!
Details
ci/circleci: upload_docs Your tests passed on CircleCI!
Details
@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Aug 8, 2019

Your changes have been released in:

  • @patternfly/react-console@1.12.0
  • @patternfly/react-core@3.84.0
  • @patternfly/react-docs@4.9.26
  • @patternfly/react-inline-edit-extension@2.9.71
  • demo-app-ts@2.17.0
  • @patternfly/react-integration@2.17.0
  • @patternfly/react-table@2.16.10
  • @patternfly/react-topology@2.7.19
  • @patternfly/react-virtualized-extension@1.1.105

Thanks for your contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.