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

Modal: Support scrolling entire modal / overlay for overflowing content. #790

Closed
WadePeterson opened this issue Jul 21, 2020 · 5 comments · Fixed by #1259
Closed

Modal: Support scrolling entire modal / overlay for overflowing content. #790

WadePeterson opened this issue Jul 21, 2020 · 5 comments · Fixed by #1259
Labels
7.x enhancement New feature or request

Comments

@WadePeterson
Copy link

🚀 Feature Proposal

For modals with a large amount of content that will not fit on the screen, it would be nice to have an option for the overlay itself to scroll (as opposed to always requiring the consumer to make the content of the modal itself scrollable).

An additional requirement of this feature would be that the background content should not be scrollable while the modal is open. This would also likely be useful even for modals that handle scrolling within their content.

Motivation

Currently on PEX we have several use cases for modals where the content is user defined, and can be quite large. For example, on the Home page, we have modals for announcements that are user configured and can contain media and rich text. Likewise is true for Knowledge Base articles which can be shown in modals in many places and are almost always larger than will fit on screen at any resolution.

Example

modal-overlay-scroll

@NicholasBoll NicholasBoll added the enhancement New feature or request label Jul 21, 2020
@ginna-baker
Copy link

...And once the user's browser is medium or small size, even the short content on Home needs a scrollbar.

@NicholasBoll
Copy link
Member

Related: #786, #681

@lychyi lychyi added the p:2 label Aug 26, 2020
@NicholasBoll NicholasBoll added this to the 5.0.0 milestone Oct 12, 2020
@anicholls anicholls added the blocked This issue is waiting for one or more issues to be closed/resolved. label May 24, 2021
@jpante
Copy link
Member

jpante commented May 24, 2021

Once #962 is complete, this will be unblock - Waiting on v5 release

@NicholasBoll
Copy link
Member

In v5, the following is needed:

https://codesandbox.io/s/405x1

Here's an example of content scroll instead:

https://codesandbox.io/s/kwuj2

The 2 codesandboxes were created based off #905

NicholasBoll added a commit to NicholasBoll/canvas-kit that referenced this issue Sep 10, 2021
NicholasBoll added a commit to NicholasBoll/canvas-kit that referenced this issue Jan 15, 2022
@NicholasBoll NicholasBoll removed this from the 5.0.0 milestone Jan 15, 2022
@NicholasBoll NicholasBoll added 6.x and removed blocked This issue is waiting for one or more issues to be closed/resolved. 5.x labels Jan 15, 2022
@NicholasBoll NicholasBoll added the ready for review Code is ready for review label Jan 15, 2022
@myvuuu myvuuu added 7.x and removed 6.x labels Jan 24, 2022
workday-canvas-kit pushed a commit that referenced this issue Jan 26, 2022
Fixes #790

This PR changes the structure of Modals slightly by removing the extra `div` in the `Modal.Body` and `Popup.Body` and instead adds the type that `Card.Body` adds manually. This allows the `Modal.Body` to be more easily styled, but may be a breaking change. This change also allows overflow to be applied to Modals.

[category:Components]
@NicholasBoll
Copy link
Member

Fixed in v7

@jaclynjessup jaclynjessup removed p:2 ready for review Code is ready for review labels Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.x enhancement New feature or request
Projects
None yet
8 participants