Skip to content

Commit

Permalink
WCMS-20298 removed extra left-padding from data page (#203)
Browse files Browse the repository at this point in the history
* WCMS-20298 removed extra left-padding from data page

* WCMS-20298 update swagger padding and data page title y position
  • Loading branch information
averysmithproductions authored Apr 29, 2024
1 parent a165dee commit c5465bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
5 changes: 5 additions & 0 deletions src/templates/APIPage/swagger-ui-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ This document provides overrides to Swagger UI, fixing accessibility issues.
font-weight: bold !important;
}

.swagger-ui div.wrapper {
padding-left: 0;
padding-right: 0;
}

// Fix issue on mobile with text on accordion looking weird.

@media (width <= 544px) {
Expand Down
22 changes: 14 additions & 8 deletions src/templates/FilteredResource/FilteredResourceBody.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,14 @@ const FilteredResourceBody = ({

return (
<section className="ds-l-container ds-u-padding-bottom--3 ds-u-margin-bottom--2">
<div className="ds-l-row">
{Object.keys(distribution).length && (
<>
<Link to={`/dataset/${id}`} className="ds-u-padding-y--3 ds-u-display--block">
<div className={'ds-l-md-col--9'}>
<Link to={`/dataset/${id}`} className="ds-u-padding-y--4 ds-u-display--block">
Back to {dataset.title}
</Link>
</div>
<div className={'ds-l-md-col--9'}>
<h1 className="ds-text-heading--3xl">{customTitle ? customTitle : pageTitle}</h1>
</div>
Expand All @@ -85,14 +88,16 @@ const FilteredResourceBody = ({
<FilteredResourceDescription distribution={distribution} dataset={dataset} />
</div>
{resource.columns && Object.keys(resource.schema).length && (
<QueryBuilder
resource={resource}
id={distribution.identifier}
customColumns={customColumns}
/>
<div className={'ds-l-md-col--12'}>
<QueryBuilder
resource={resource}
id={distribution.identifier}
customColumns={customColumns}
/>
</div>
)}
{resource.columns && Object.keys(resource.schema).length ? (
<div>
<div className={'ds-l-md-col--12'}>
<ResourceHeader
includeDensity={true}
setTablePadding={setTablePadding}
Expand Down Expand Up @@ -126,7 +131,7 @@ const FilteredResourceBody = ({
<Spinner role="status" aria-valuetext="Resource loading" />
)}
{dataset.identifier && (
<div ref={apiDocs}>
<div className={'ds-l-md-col--12'} ref={apiDocs}>
<h2 className="ds-text-heading--2xl ds-u-margin-y--2">Try the API</h2>
<SwaggerUI
url={`${rootUrl}/metastore/schemas/dataset/items/${
Expand All @@ -143,6 +148,7 @@ const FilteredResourceBody = ({
)}
</>
)}
</div>
</section>
);
};
Expand Down

0 comments on commit c5465bc

Please sign in to comment.