Skip to content

Conversation

@tlabaj
Copy link
Contributor

@tlabaj tlabaj commented May 24, 2023

What: Closes #9149

@patternfly-build
Copy link
Contributor

patternfly-build commented May 24, 2023

@tlabaj tlabaj added this to the 2023.07 milestone May 24, 2023
{...props}
>
{children}
{isBox ? <InputGroupText> {children} </InputGroupText> : children}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcoker I made the changes that we talked about. I still think we could improve this. I just don't think it is intuitive to me that applying isBox implies that we will be adding text as the input group item. I wonder if we should have a isText prop. If the consumer passes that in and they did not set "isBox" we can set it for them and render the <InputGroupText> internally as well.

return (
<InputGroup>
<InputGroupItem isFill>{textInput}</InputGroupItem>
<InputGroupItem isBox>
Copy link
Contributor

@thatblindgeye thatblindgeye May 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should pass in the isDisabled prop from Slider into InputGroupItem here (only line 336). The disabled styling isn't applying correctly to the text when a Slider is disabled:

image

What it should look like:

image

Comment on lines +15 to 19
className,
component = 'span',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add props to InputGroupItem to pass down to InputGroupText? With the API update the className and component won't be able to be modified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @mcoker do you think that is necessary? What is the use case where we would not want to use span?

@tlabaj tlabaj removed this from the 2023.07 milestone May 26, 2023
Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@gitdallas gitdallas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just a question

section: components
cssPrefix: null
propComponents: ['InputGroup', 'InputGroupItem', 'InputGroupText']
propComponents: ['InputGroup', 'InputGroupItem', InputGroupText]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly does this do? I'm seeing in a few places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it adds the prop docs at bottom of page.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i meant the removal of quotes

@gitdallas gitdallas merged commit e18a351 into patternfly:v5 May 31, 2023
@patternfly-build
Copy link
Contributor

Your changes have been released in:

  • @patternfly/react-code-editor@5.0.0-alpha.125
  • @patternfly/react-core@5.0.0-alpha.124
  • @patternfly/react-docs@6.0.0-alpha.133
  • demo-app-ts@5.0.0-alpha.108
  • @patternfly/react-integration@5.0.0-alpha.51
  • @patternfly/react-table@5.0.0-alpha.127

Thanks for your contribution! 🎉

nicolethoen pushed a commit to Kells512/patternfly-react that referenced this pull request Sep 1, 2023
* feat(Input group): Simplified API

* updates from pr review

* add isDisabled prop to InputGroupText

* update snapshots

* update from review

---------

Co-authored-by: Titani <tlabaj@redaht.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Input group - Reconsider API

5 participants