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

inputGroup - add InputGroupItem #9074

Merged
merged 4 commits into from
May 17, 2023

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
Contributor

patternfly-build commented May 5, 2023

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.

@@ -3,6 +3,7 @@ import React from 'react';
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

@wise-king-sullyman
Copy link
Contributor

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
Contributor

@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
Contributor

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
Contributor

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.

Just one thing! This variant in <InputGroupText> is no longer valid - the plain modifier doesn't do anything to it. https://github.com/MariaAga/patternfly-react/blob/1fcc3a8128ec99288a592b354b2b23ebf8c08a67/packages/react-core/src/components/InputGroup/InputGroupText.tsx#L18

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