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

Bug 1828591: Fix heading issues in console and cleanup CSS for filters #5227

Merged
merged 1 commit into from
Apr 29, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import {
Kebab,
MsgBox,
navFactory,
PageHeading,
ResourceKebab,
ResourceLink,
Timestamp,
Expand Down Expand Up @@ -643,7 +642,6 @@ export const ClusterServiceVersionsPage: React.FC<ClusterServiceVersionsPageProp
<Helmet>
<title>{title}</title>
</Helmet>
<PageHeading title={title} />
<MultiListPage
{...props}
resources={[
Expand All @@ -663,11 +661,11 @@ export const ClusterServiceVersionsPage: React.FC<ClusterServiceVersionsPageProp
optional: true,
},
]}
title={title}
flatten={flatten}
namespace={props.namespace}
ListComponent={ClusterServiceVersionList}
helpText={helpText}
showTitle={false}
/>
</>
);
Expand Down
1 change: 1 addition & 0 deletions frontend/public/components/_nav-title.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
@media (min-width: $screen-sm) {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
&--detail {
Expand Down
38 changes: 16 additions & 22 deletions frontend/public/components/factory/list-page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,28 +270,22 @@ export const FireMan_ = connect(null, { filterList })(

return (
<>
<PageHeading title={title} badge={badge} className="co-m-nav-title--row">
<div
className={classNames(
{ 'co-m-pane__filter-bar--inline': (createLink || helpText) && title },
{ 'co-m-pane__filter-bar--no-title': !title },
{ 'co-m-pane__filter-bar': !createLink || helpText },
{
'co-m-pane__filter-bar--with-help-text': helpText && !createLink,
},
)}
>
{createLink && (
<div className="co-m-pane__filter-bar-group co-m-pane__createLink">
{createLink}
</div>
)}
{!title && badge && (
<div className="co-m-pane__filter-bar-group co-m-pane__filter-bar-group--badge">
{badge}
</div>
)}
</div>
{/* Badge rendered from PageHeading only when title is present */}
<PageHeading
title={title}
badge={title ? badge : null}
className={classNames({ 'co-m-nav-title--row': createLink })}
>
{createLink && (
<div
className={classNames('co-m-pane__createLink', {
'co-m-pane__createLink--no-title': !title,
})}
>
{createLink}
</div>
)}
{!title && badge && <div>{badge}</div>}
</PageHeading>
{helpText && <p className="co-m-pane__help-text co-help-text">{helpText}</p>}
<div className="co-m-pane__body co-m-pane__body--no-top-margin">
Expand Down
46 changes: 21 additions & 25 deletions frontend/public/style/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,28 @@ $co-external-link-padding-right: 15px;
}
}

.co-m-pane__createLink--no-title {
margin-bottom: $grid-gutter-width;
}

.co-m-pane__filter-bar,
.co-m-pane__help-text {
margin: 20px ($grid-gutter-width / 2);
@media (min-width: $grid-float-breakpoint) {
margin-left: $grid-gutter-width;
margin-right: $grid-gutter-width;
margin-top: $grid-gutter-width;
}
}

.co-m-pane__filter-bar {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
&--alt {
margin-left: 0;
margin-right: 0;
}
&--with-help-text {
align-items: baseline;
flex-wrap: nowrap;
Expand All @@ -40,26 +58,6 @@ $co-external-link-padding-right: 15px;
margin-right: 10px;
min-width: 0; // enables truncation of selected item, if needed
}
&--inline {
margin-left: auto;
}
&--no-title {
margin-bottom: 30px;
}
}

.co-m-pane__filter-bar,
.co-m-pane__help-text {
margin: 20px ($grid-gutter-width / 2);
@media (min-width: $grid-float-breakpoint) {
margin-left: $grid-gutter-width;
margin-right: $grid-gutter-width;
margin-top: $grid-gutter-width;
&--alt {
margin-left: 0;
margin-right: 0;
}
}
}

.co-m-pane__filter-bar-group {
Expand All @@ -82,10 +80,6 @@ $co-external-link-padding-right: 15px;
}
}

.co-m-pane__filter-bar-group--full-width {
flex-basis: 100%;
}

.co-m-pane__filter-bar-group--help-text {
@media (min-width: $screen-sm-min) {
margin-right: 20px;
Expand Down Expand Up @@ -113,7 +107,9 @@ $co-external-link-padding-right: 15px;

.co-m-pane__heading-badge {
line-height: 0;
margin-left: var(--pf-global--spacer--sm);
@media (min-width: $screen-sm-min) {
margin-left: var(--pf-global--spacer--sm);
}
}

.co-m-pane__heading-link {
Expand Down