Skip to content

Commit 7d957dc

Browse files
ClearlyClairehiyuki2578
authored andcommitted
Improve focal point modal on mobile (mastodon#11575)
* Reduce padding around report modal and focal point modal title * Increase max allowed height for focal point modal content
1 parent f4744b2 commit 7d957dc

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

app/javascript/mastodon/features/ui/components/focal_point_modal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class FocalPointModal extends ImmutablePureComponent {
228228
<Button disabled={!dirty || detecting || length(description) > 420} text={intl.formatMessage(messages.apply)} onClick={this.handleSubmit} />
229229
</div>
230230

231-
<div className='report-modal__statuses'>
231+
<div className='focal-point-modal__content'>
232232
{focals && (
233233
<div className={classNames('focal-point', { dragging })} ref={this.setRef} onMouseDown={this.handleMouseDown} onTouchStart={this.handleTouchStart}>
234234
{media.get('type') === 'image' && <img src={media.get('url')} width={width} height={height} alt='' />}

app/javascript/styles/mastodon/components.scss

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4534,7 +4534,8 @@ a.status-card.compact:hover {
45344534
}
45354535
}
45364536

4537-
.report-modal__statuses {
4537+
.report-modal__statuses,
4538+
.focal-point-modal__content {
45384539
flex: 1 1 auto;
45394540
min-height: 20vh;
45404541
max-height: 80vh;
@@ -4555,6 +4556,12 @@ a.status-card.compact:hover {
45554556
}
45564557
}
45574558

4559+
.focal-point-modal__content {
4560+
@media screen and (max-width: 480px) {
4561+
max-height: 40vh;
4562+
}
4563+
}
4564+
45584565
.report-modal__comment {
45594566
padding: 20px;
45604567
border-right: 1px solid $ui-secondary-color;
@@ -4749,10 +4756,10 @@ a.status-card.compact:hover {
47494756
}
47504757

47514758
.report-modal__target {
4752-
padding: 20px;
4759+
padding: 15px;
47534760

47544761
.media-modal__close {
4755-
top: 19px;
4762+
top: 14px;
47564763
right: 15px;
47574764
}
47584765
}

0 commit comments

Comments
 (0)