Skip to content

inputGroup - add InputGroupItem#9074

Merged
nicolethoen merged 4 commits intopatternfly:v5from
MariaAga:add-input-group-wrap
May 17, 2023
Merged

inputGroup - add InputGroupItem#9074
nicolethoen merged 4 commits intopatternfly:v5from
MariaAga:add-input-group-wrap

Conversation

@MariaAga
Copy link
Contributor

@MariaAga MariaAga commented May 5, 2023

What: Closes #8264

Adds InputGroupItem component and wrapping each child of inputGroup
if the child is input text add isFill
if the child is InputGroupText add isBox and sometimes isPlain

@patternfly-build
Copy link
Collaborator

patternfly-build commented May 5, 2023

@MariaAga MariaAga force-pushed the add-input-group-wrap branch 2 times, most recently from 8d48dd3 to e5f4226 Compare May 8, 2023 12:37
@MariaAga MariaAga force-pushed the add-input-group-wrap branch 2 times, most recently from 457fadd to 1eeaae4 Compare May 10, 2023 09:08
Comment on lines 10 to 13
/** Flag to indicate if the input group item is plain. */
isBox?: boolean;
/** Flag to indicate if the input group item is plain. */
isPlain?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

@srambach wdyt about the prop descriptions for these two? isBox I'm not entirely sure what would work best. "Flag to apply styling to non-form control input group items"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Edited the prop description to be (almost) the same as isBox prop on tabs

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the update is fine, but FWIW, this is documented in core - https://pf5.patternfly.org/components/input-group#usage

Adds appropriate styling for items that are not form controls.

import { render, screen } from '@testing-library/react';

import { InputGroup } from '../InputGroup';
import { InputGroupItem } from '../InputGroupItem';
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker if we want to do it in a followup, but we should create a separate test file for InputGroupItem

@MariaAga MariaAga force-pushed the add-input-group-wrap branch from 1eeaae4 to 52e3ecf Compare May 15, 2023 12:15
@wise-king-sullyman wise-king-sullyman self-requested a review May 15, 2023 20:09
@wise-king-sullyman
Copy link
Collaborator

wise-king-sullyman commented May 15, 2023

Still working on reviewing this, but one thing I've noticed so far is that some of the search inputs seem to be rendering shorter in this PR. In the below image this PR is on the left, v5 staging is on the right. Looks like it needs a isFill?

image

I've also noticed a few places where versioned class name changes are needed, but I'll put those together in a followup issue.

Copy link
Collaborator

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

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

My previous comment about SearchInput is the only thing I see that needs some tweaking.

@thatblindgeye
Copy link
Contributor

Other than the above + needing a rebase

Copy link
Contributor

@kmcfaul kmcfaul left a comment

Choose a reason for hiding this comment

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

lgtm other than the SearchInput issue.

Maybe as a follow up, would it be worth allowing users to customize some of these new props by piping them through the wrapper component (like SearchInput for example)?

@wise-king-sullyman
Copy link
Collaborator

Hmmm @kmcfaul I'm putting together a fix for the SearchInput issue now, while I'm doing it I could add new props for them as part of this breaking change. But scoping it as a followup would also probably not be a bad idea. Happy to go either way.

@wise-king-sullyman
Copy link
Collaborator

wise-king-sullyman commented May 16, 2023

Went with just having them set to fill for now at least since that customization isn't required for us to cut the alphas for testing.

@thatblindgeye @kmcfaul if one of yall could give my changes a once over I would appreciate it.

Convenience link: https://patternfly-react-pr-9074.surge.sh/components/search-input

Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

Noticing a visual bug currently on the SearchInput when it has focus:

image

It's on any example using that "submit" arrow button

Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

Some snapshots just need updating but otherwise lgtm

@nicolethoen nicolethoen merged commit 0248fea into patternfly:v5 May 17, 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.

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 - updates to support more flexible children

8 participants