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(styling): Ensure authorize button stays on the right for UX reasons #9387

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 6 additions & 2 deletions src/core/components/layouts/base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,12 @@ export default class BaseLayout extends React.Component {
{hasServers || hasSchemes || hasSecurityDefinitions ? (
<div className="scheme-container">
<Col className="schemes wrapper" mobile={12}>
{hasServers ? <ServersContainer /> : null}
{hasSchemes ? <SchemesContainer /> : null}
{hasServers || hasSchemes ? (
<div className="schemes-server-container">
{hasServers ? <ServersContainer /> : null}
{hasSchemes ? <SchemesContainer /> : null}
</div>
) : null}
{hasSecurityDefinitions ? <AuthorizeBtnContainer /> : null}
</Col>
</div>
Expand Down
44 changes: 33 additions & 11 deletions src/style/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -795,26 +795,48 @@

gap: 10px;

> label
/*
This wraps the servers or schemes selector.
This was added to make sure the Authorize button is always on the right
and the servers or schemes selector is always on the left.
*/
> .schemes-server-container
{
font-size: 12px;
font-weight: bold;

display: flex;
flex-direction: column;
flex-wrap: wrap;

margin: -20px 15px 0 0;
gap: 10px;

@include text_headline();

select
> label
{
min-width: 130px;
font-size: 12px;
font-weight: bold;

display: flex;
flex-direction: column;

text-transform: uppercase;
margin: -20px 15px 0 0;

@include text_headline();

select
{
min-width: 130px;

text-transform: uppercase;
}
}
}

/*
This checks if the schemes-server-container is not present and
aligns the authorize button to the right
*/
&:not(:has(.schemes-server-container))
{
justify-content: flex-end;
}

/*
Target Authorize Button in schemes wrapper
This was added here to fix responsiveness issues with the authorize button
Expand Down