Skip to content

Search box doesn't fit in overlays on mobile #2369

@lindapaiste

Description

@lindapaiste

Increasing Access

It will look a lot better on mobile devices.

Feature enhancement details

image

@dewanshDT I came across a place where we could really use a <MediaQuery> in the JS. It should be quick if you want to do it. In the Overlay component we sometimes pass in a search box through an actions prop. It doesn't fit on small screens. We should make it so that the actions is only rendered in its current position on large screens. Then on small screens we would place the {actions} below the header, between lines 91 </header> and 92 {children}.

<header className="overlay__header">
<h2 className="overlay__title">{title}</h2>
<div className="overlay__actions">
{actions}
<button
className="overlay__close-button"
onClick={this.close}
aria-label={this.props.t('Overlay.AriaLabel', { title })}
>
<ExitIcon focusable="false" aria-hidden="true" />
</button>
</div>
</header>
{children}
</section>

Just change that one part of it. Making the tables fit will be fixed by #2368 and converting Overlay to a function component will be fixed by #2309.

It may need a wrapper div with some margin or padding, which we would render only if actions is present. But that's less important. You could do it or not bother. It will be a huge improvement just to make everything fit!

Metadata

Metadata

Assignees

Labels

Area: MobileFor issues affecting mobile or responsive behaviorEnhancementImprovement to an existing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions