NotionX / NotionX/react-notion-x

Notion Asidebar Overflow Case

Open
#186 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
TypeScript
Stars
5.4k
Forks
645
PR merge metrics
No merged PRs in 30d

Description

When i implement react-notion-x to my website,asidebar become oveflow and i need to reduce value in this code
width: calc((100vw + var(--notion-max-width)) / 2); width: calc((100vw + var(--notion-max-width)) / 2.2);

Here is code
@media (min-width: 1300px) and (min-height: 300px) {
  .notion-page-content-has-aside {
    display: flex;
    flex-direction: row;
    width: calc((100vw + var(--notion-max-width)) / 2.2); 
  }

  .notion-page-content-has-aside .notion-aside {
    display: flex;
  }

  .notion-page-content-has-aside .notion-page-content-inner {
    width: var(--notion-max-width);
    max-width: var(--notion-max-width);
  }
}

Untitled

After i reduce to 2.2

solveAfter

ALSO can't hidden overflow with overflow: hidden

Althought this will hidden overflow case from parent but this gonna affect Table Of Content Effect, TOC not gonna follow with y axis scroll and no sticky on right too

.notion-aside-table-of-contents {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: calc(100vh - 148px - 16px);
  overflow: hidden auto;
  min-width: 222px;
  overflow: auto;
}

Is there any better solution for this?

Btw this case cause when i added customize categories at left side.

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 by reproducing the layout with the @media rule and the .notion-page-content-has-aside, .notion-aside, and .notion-aside-table-of-contents selectors shown in the issue, including a customized left category area. Compare the sidebar width and overflow behavior with the table of contents while scrolling. Done means the sidebar no longer overflows and the table of contents retains its scroll and sticky behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, react
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.