react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

style(notion-page-scroller): change min-height

Open luckfunc opened this issue 1 year ago • 2 comments

Description

  • After cloning the react-notion-x project from GitHub and launching it locally, I switched the Page Id to "2a3890eac9624780abf5d08b534d050b" and identified the issue.

When I use the Page Id "2a3890eac9624780abf5d08b534d050b" to access the homepage, if the page content exceeds the height of the screen, it looks fine. However, when the page content doesn't exceed the height of the screen, it appears to have some issues.

  • for example
    • It is displaying an extra scrollbar. 1691948459890
  • Reproduce the issue.
    1. Open Chrome Developer Tools.
    2. You can select the element below in the Developer Tools and then delete it. After deleting, the content will be smaller than your screen height, and a scrollbar will appear.
    <main class="notion-page notion-page-has-cover notion-page-has-icon notion-page-has-text-icon notion-full-page notion-small-text">
    </main>
    
    1691949522001 3. You will find that the page looks as shown in the following image: uTools_1691949787823 4. After finding the element with the class name "notion-page-scroller" and setting min-height: calc(100% - var(--notion-header-height)), it will look like the image below: image.he scrollbar has disappeared.

I think

  1. I believe that when the page content is minimal, the height should be the same as the webpage's height, and a scrollbar should not appear.
  2. If this is your design intention, please reject my pull request.

Notion Test Page ID

  • Test Page ID: "2a3890eac9624780abf5d08b534d050b"

luckfunc avatar Aug 13 '23 18:08 luckfunc

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
react-notion-x ✅ Ready (Inspect) Visit Preview Aug 13, 2023 6:25pm
react-notion-x-minimal-demo ✅ Ready (Inspect) Visit Preview Aug 13, 2023 6:25pm

vercel[bot] avatar Aug 13 '23 18:08 vercel[bot]

Deleting the `

` element from [Next.js Examples](https://react-notion-x-minimal-demo-kvao5xji7-saasify.vercel.app) will also result in the same issue of a scrollbar appearing when the content is smaller than the webpage height. As shown in the image below: ![image](https://github.com/NotionX/react-notion-x/assets/85545304/3a3f9d2a-9eb5-43cd-aec2-5fed303497e8)

luckfunc avatar Aug 13 '23 18:08 luckfunc