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] Design enhancements - Ready #4607

Closed
12 of 13 tasks
aagonzales opened this issue Nov 7, 2019 · 11 comments
Closed
12 of 13 tasks

[Modal] Design enhancements - Ready #4607

aagonzales opened this issue Nov 7, 2019 · 11 comments

Comments

@aagonzales
Copy link
Member

aagonzales commented Nov 7, 2019

Introducing new modal enhancements and variations.
Check indicates dev delivered.

Sketch file:
https://ibm.box.com/s/38r605b633kvmpt5qcv67owqn6imfmhk

@aagonzales
Copy link
Member Author

aagonzales commented Nov 7, 2019

Modal sizes

  • XS
  • Small
  • Default
  • Large

Widths

image

The width's will vary based on breakpoint

Breakpoint XS  Small Default Large 
1584 24% 36% 48% 72%
1312 24% 36% 48% 72%
1056 32% 42% 60% 84%
672 48% 60% 84% 96%
320 100% 100% 100% 100%

% corollate to an approximate column count

% ~# of columns
72% 12
60% 10
48% 8
42% 7
36% 6
24% 4

Heights

image

Modal size Max-height
XS 48%
Small 72%
Default 84%
Large 96%

Overflow content

Use a fade to indicate there is content below the fold

image

Margin-right

  • If modal is smaller than 32% then the margin-right should be 16px/1rem
  • If modal is greater than 32% then the margin-right should be 20% of the modal width

image

  • Note: Margin-right padding rules only apply to body copy. Other components, such as input fields can span the full width of the modal.

image

@aagonzales aagonzales changed the title [Modal] Design enhancements [Modal] Design enhancements - WIP Nov 7, 2019
@aagonzales
Copy link
Member Author

aagonzales commented Nov 8, 2019

Modal Types

Modal - types-2

Changes from existing modal

  • Title can be used as the primary message in passive and transactional modal. It can also be used as the input label if only one action is being preformed (see example section).
  • New: Linear direction modal with built in progress indicator.

@aagonzales
Copy link
Member Author

aagonzales commented Nov 8, 2019

Button groups

Modal - button groups

Guidance:

  • Modals can have 1, 2 or 3 buttons.
  • 4 Buttons is not allowed.
  • 3 Buttons should only be used a rare scenarios
  • If a "cancel" is needed outside of the 2 button set scenario than it should be a ghost button and left aligned.
  • Button are sticky to the bottom of the modal window
  • Never inset (add padding to the bottom and side) buttons on modal.
  • Modals with more than 2 buttons is not recommend for mobile. (potential solution is split button)

@aagonzales aagonzales self-assigned this Nov 8, 2019
@aagonzales
Copy link
Member Author

Examples

Example 1
Example 2-a
Example 3a
Example 4
Example 5

asudoh added a commit to asudoh/carbon-components that referenced this issue Nov 12, 2019
@aagonzales aagonzales changed the title [Modal] Design enhancements - WIP [Modal] Design enhancements - Ready Nov 12, 2019
asudoh added a commit that referenced this issue Nov 14, 2019
asudoh added a commit to asudoh/carbon-components that referenced this issue Nov 18, 2019
@stale
Copy link

stale bot commented Dec 12, 2019

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

@stale stale bot added the status: inactive Will close if there's no further activity within a given time label Dec 12, 2019
@asudoh asudoh removed the status: inactive Will close if there's no further activity within a given time label Dec 12, 2019
@emyarod emyarod assigned emyarod and unassigned aagonzales Feb 13, 2020
@elizabethsjudd
Copy link
Contributor

@emyarod I'm guessing these enhancements are only being made to React. Are their plans to carry them down to Vanilla (specifically the change so users can not click outside the transactional modal to close it)?

@elizabethsjudd
Copy link
Contributor

@aagonzales looking at this comment (#4607 (comment)), what's the expected behavior of a keyboard users when they press ESC for a transactional modal?

@aagonzales
Copy link
Member Author

Pressing ESC on a transactional modal would close the modal without saving or submitting any data and return the user/focus to the main page.

@emyarod
Copy link
Member

emyarod commented Mar 2, 2020

@elizabethsjudd the visual changes should appear for both vanilla and React. I don't think the UX changes have been implemented yet in either library but I can port it to vanilla when it's done

@elizabethsjudd
Copy link
Contributor

Thank you @emyarod!

@grahamharper
Copy link

+1 for support for the 3 button modal, both flush-left and left-aligned "Cancel" variants.

How should this behave in a narrow viewport? Buttons stack?
image

@sstrubberg sstrubberg closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

7 participants