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

fix(alert, action-sheet): show scrollbar for long list of options #28369

Merged
merged 5 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions core/src/components/action-sheet/action-sheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,20 @@
background: var(--background);
}

.action-sheet-group::-webkit-scrollbar {
display: none;
// Scrollbars on mobile devices will be hidden.
// Users can still scroll the content by swiping.
// If a user has a pointing device, such as a
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// If a user has a pointing device, such as a
// If a user has a fine pointing device, such as a

// mouse or trackpad, then scrollbars will be
// visible. This allows users to scroll the
// content with their pointing device.
// Otherwise, the user would have to use the
// keyboard to navigate through the options.
// This may not be intuitive for users who
// are not familiar with keyboard navigation.
Copy link
Contributor

Choose a reason for hiding this comment

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

~ Can we use multi-line comments instead?

@media (any-pointer: coarse) {
.action-sheet-group::-webkit-scrollbar {
display: none;
}
}

.action-sheet-group-cancel {
Expand Down
20 changes: 16 additions & 4 deletions core/src/components/alert/alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,22 @@
overscroll-behavior-y: contain;
}

.alert-checkbox-group::-webkit-scrollbar,
.alert-radio-group::-webkit-scrollbar,
.alert-message::-webkit-scrollbar {
display: none;
// Scrollbars on mobile devices will be hidden.
// Users can still scroll the content by swiping.
// If a user has a pointing device, such as a
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// If a user has a pointing device, such as a
// If a user has a fine pointing device, such as a

// mouse or trackpad, then scrollbars will be
// visible. This allows users to scroll the
// content with their pointing device.
// Otherwise, the user would have to use the
// keyboard to navigate through the options.
// This may not be intuitive for users who
// are not familiar with keyboard navigation.
Copy link
Contributor

Choose a reason for hiding this comment

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

~ Can we use multi-line comments instead?

@media (any-pointer: coarse) {
.alert-checkbox-group::-webkit-scrollbar,
.alert-radio-group::-webkit-scrollbar,
.alert-message::-webkit-scrollbar {
display: none;
}
}

.alert-input {
Expand Down
Loading