patternfly / patternfly/patternfly-react

Bug - Page/Drawer - PageSection in DrawerBody has an incorrect height

Open
#8,541 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Pinned
Dominant language
TypeScript
Stars
862
Forks
392
Avg merge
4d 8h
Merged PRs (30d)
9

Description

Describe the problem
I am trying to build a page, which has several clickable cards on it, and when you click on the card, there will be a drawer panel shown on the right side. However, when implementing this, I find some issues with the page height. See the example below for the details.

How do you reproduce the problem?
I created a code sandbox example here: https://codesandbox.io/s/vigorous-bohr-ydpp8d?file=/index.tsx
I try to put a drawer in a Page component and set the PageSection in the DrawerContentBody, however, the DrawerContentBody is not flex display, which will make the grey background page section not take up the entire page height. So I use the Flex layout provided by PatternFly. However, another bug comes, the page section will take up more height than it should take, which causes the page to scrollable.

Expected behavior
The page section will take up the full page height when there is no enough card, and will be scrollable when there are a lot of cards.

Is this issue blocking you?
I can create some custom styles to avoid this. However, I still want to use only PF to build the application, avoid making any custom styles.

Screenshots
See the example.

What is your environment?

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

What is your product and what release date are you targeting?
ODH/RHODS

Any other information?
I am not sure whether it's permitted to put PageSection into DrawerContentBody by design. If not, what's the workable way to implement this feature? Is there any component that can provide me with a grey background on which I can put a lot of cards?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CodeSandbox reproduction in index.tsx and compare the Page, PageSection, Drawer, and DrawerContentBody layout behavior. Verify the result with both few and many cards. Done means the section fills the available page height without creating unwanted scrolling, while remaining scrollable when the card content exceeds the available height.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.