8000 Prevent modal top from shrinking by apoorv-mishra · Pull Request #7167 · outline/outline · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Prevent modal top from shrinking #7167

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

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

apoorv-mishra
Copy link
Member

Closes #7166

@auto-assign auto-assign bot requested a review from tommoor July 1, 2024 06:57
@@ -254,7 +254,7 @@ const Header = styled(Flex)`
const Small = styled.div`
animation: ${fadeAndScaleIn} 250ms ease;

margin: auto auto;
margin: 25vh auto auto auto;
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that this affects dialogs across the board.

Copy link
Member

Choose a reason for hiding this comment

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

I believe we need to define a max height too, maybe 70vh?

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Just a note on this - setting max height leads us to manage overflow which provokes to manage scroll 😅

Looked into all this yesterday, almost there...

Copy link
Member Author

Choose a reason for hiding this comment

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

🤞

Screen.Recording.2024-07-02.at.07.35.43.mov

@@ -282,7 +282,7 @@ const Small = styled.div`
`;

const SmallContent = styled(Scrollable)`
padding: 12px 24px 24px;
padding: 12px 24px;
Copy link
Member Author

Choose a reason for hiding this comment

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

To be noted 🐌

scrollMode: "if-needed",
behavior: "auto",
block: "center",
boundary: window.document.body,
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this boundary the default?

Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't look like. The scroll isn't prevented upon keyboard navigation if boundary is absent. This fixes the problem.

const useMaxHeight = ({
elementRef,
maxViewportHeight = 90,
margin = 8,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
margin = 8,
margin = 16,


const useMaxHeight = ({
elementRef,
maxViewportHeight = 90,
Copy link
Member

Choose a reason for hiding this comment

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

I don't love this naming, might be better to pass as a fraction or… maxViewportPercentage for clarity

@apoorv-mishra apoorv-mishra requested a review from tommoor July 3, 2024 02:49
@apoorv-mishra apoorv-mishra merged commit de90f87 into main Jul 3, 2024
11 checks passed
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.

Collection share dialog shrinking
2 participants
0