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(Card): Consume penta tokens #10056

Merged
merged 2 commits into from
Feb 13, 2024
Merged

Conversation

tlabaj
Copy link
Contributor

@tlabaj tlabaj commented Jan 31, 2024

What: Closes #9991

Codemod issue opened: patternfly/pf-codemods#560

@tlabaj tlabaj requested review from andrew-ronaldson, lboehling, a team, wise-king-sullyman, mfrances17 and srambach and removed request for a team January 31, 2024 23:41
@patternfly-build
Copy link
Contributor

patternfly-build commented Jan 31, 2024

@tlabaj
Copy link
Contributor Author

tlabaj commented Feb 1, 2024

@edonehoo I added a new example and a secondary styling switcher to some examples. Can you please take a look.

Copy link
Contributor

@edonehoo edonehoo left a comment

Choose a reason for hiding this comment

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

content looks good to me!

@tlabaj tlabaj linked an issue Feb 2, 2024 that may be closed by this pull request
Copy link
Collaborator

@andrew-ronaldson andrew-ronaldson left a comment

Choose a reason for hiding this comment

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

LGTM thanks

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.

Only thing I noticed between core & react is the menu toggle is using the old dropdown toggle css on core. The border around the menu toggle appearing in this PR should be automatically resolved when the menu toggle penta updates are merged in.

@srambach
Copy link
Member

srambach commented Feb 8, 2024

It looks like the menu isn't escaping the confines of the expandable/expandable with icon cards - does the menu need to be attached differently?
image

Second thing, the disabled card in https://patternfly-react-pr-10056.surge.sh/components/card#clickable-and-selectable has the wrong text color on the title. In core that's an inline link button, and the correct text color is coming from the styling on a disabled button. Do we want to make a change in core to accommodate using an <a> there or should this change to use the button?

Copy link
Member

@srambach srambach left a comment

Choose a reason for hiding this comment

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

^^ questions above

Comment on lines 106 to 108
const registerTitleId = (id: string) => {
setTitleId(id);
containsCardTitleChildRef.current = !!id;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we should be able to remove this registerTitleId here and from the context (and its use within CardTitle), as well as the containsCardTitleChildRef ref. It was really only being used to get the card title ID from CardTitle to set the aria-labelledby attribute in Card.

In CardTitle we should be able to remove the useEffect on line ~25, too.

@thatblindgeye
Copy link
Contributor

@srambach for that bug where the menu isn't escaping the Card container, looks like it's due to the pf-v5-c-card's overflow property that was added? Removing overflow: auto on the card prevents that bug. If we need to have that overflow auto then we could update this particular example to pass to the Dropdown, popperProps={{appendTo: () => document.body}}, but may be worth looking into further as a followup for another solution if we can keep the menu appended as close to the trigger as possible

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.

Other than @thatblindgeye's comment above LGTM

@tlabaj
Copy link
Contributor Author

tlabaj commented Feb 13, 2024

Second thing, the disabled card in https://patternfly-react-pr-10056.surge.sh/components/card#clickable-and-selectable has the wrong text color on the title. In core that's an inline link button, and the correct text color is coming from the styling on a disabled button. Do we want to make a change in core to accommodate using an <a> there or should this change to use the button?

@srambach The consumer is responsible for adding the button to the title. They may add one one that is an <a>. We have controll of that from the react side . Is there a reason to not support <a> in a card title?

@tlabaj
Copy link
Contributor Author

tlabaj commented Feb 13, 2024

@srambach for that bug where the menu isn't escaping the Card container, looks like it's due to the pf-v5-c-card's overflow property that was added? Removing overflow: auto on the card prevents that bug. If we need to have that overflow auto then we could update this particular example to pass to the Dropdown, popperProps={{appendTo: () => document.body}}, but may be worth looking into further as a followup for another solution if we can keep the menu appended as close to the trigger as possible

@srambach can we look into this on the core side. We try and append the menu as close to the trigger as possible.

@tlabaj tlabaj requested a review from thatblindgeye February 13, 2024 14:31
@srambach
Copy link
Member

I created an issue to address the title link color on disabled cards
And updated the issue to find a solution for rounded corners that clip the right things and not the wrong things...

✅ CSS

@thatblindgeye thatblindgeye merged commit 0ccdef5 into patternfly:v6 Feb 13, 2024
13 checks passed
@patternfly-build
Copy link
Contributor

Your changes have been released in:

  • @patternfly/react-code-editor@6.0.0-alpha.31
  • @patternfly/react-core@6.0.0-alpha.31
  • @patternfly/react-docs@7.0.0-alpha.32
  • @patternfly/react-drag-drop@6.0.0-alpha.12
  • @patternfly/react-integration@6.0.0-alpha.15
  • demo-app-ts@5.1.1-alpha.30
  • @patternfly/react-table@6.0.0-alpha.31

Thanks for your contribution! 🎉

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.

Consume core Penta updates: Card
8 participants