Skip to content

Commit

Permalink
Catalog Page: Mobile view changes (#1956)
Browse files Browse the repository at this point in the history
  • Loading branch information
annagav authored Oct 20, 2023
1 parent 24a91a2 commit 8ba88d0
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 8 deletions.
25 changes: 24 additions & 1 deletion frontend/public/scss/catalog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
width: 305px;
position: sticky;
}

@include media-breakpoint-down(sm) {
margin-top: 0;
}

/* Dropshadow */
box-shadow: 0px 2px 3px 0px rgba(18, 38, 49, 0.15);
Expand Down Expand Up @@ -87,7 +91,7 @@
top: 0;

@include media-breakpoint-down(sm) {
padding: 20px 0px;
padding: 10px 0px;
}
h2 {
overflow: hidden;
Expand All @@ -104,6 +108,16 @@
flex-direction: column;
justify-content: center;
margin-bottom: 0;

@include media-breakpoint-down(sm) {
font-size: 20px;
}

small {
font-size: 12px;
font-weight: 300;
font-family: Inter;
}
}

#mobile-catalog-title {
Expand All @@ -113,6 +127,8 @@
position: absolute;
left: 20px;
background: url("#{$static-path}/images/filter_list_alt.svg") no-repeat;
top: 50%;
margin-top: -12px;
}
}
}
Expand Down Expand Up @@ -203,6 +219,10 @@
height: 70px;
margin-top: 40px;
margin-left: 24px;

@include media-breakpoint-down(md) {
margin-top: 10px;
}

.catalog-page-item-count {
color: var(--blue-dark, #03152D);
Expand Down Expand Up @@ -330,6 +350,9 @@
margin-left: 24px;
gap: 24px;
margin-bottom: 24px;
@include media-breakpoint-down(sm) {
justify-content: center;
}

a {
text-decoration: none;
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/scss/top-app-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ header.site-header {
display: block;
}

li[data-bs-target="#nav"] {
li.mobile-dropdown-item {
display: block;
padding: 10px 0;
margin: 0 auto;
Expand Down
18 changes: 13 additions & 5 deletions frontend/public/src/components/UserMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const desktopUListProps = {
}

const overlayListItemProps = {
"data-bs-target": "#nav"
className: "mobile-dropdown-item"
}

const desktopListItemProps = {
Expand Down Expand Up @@ -75,22 +75,30 @@ const UserMenu = ({ currentUser, useScreenOverlay }: Props) => {
>
<li {...(menuChildProps.li || {})}>
<MixedLink dest={routes.profile} aria-label="Profile">
Profile
<span data-bs-target="#nav" data-bs-toggle="collapse">
Profile
</span>
</MixedLink>
</li>
<li {...(menuChildProps.li || {})}>
<MixedLink dest={routes.dashboard} aria-label="Dashboard">
Dashboard
<span data-bs-target="#nav" data-bs-toggle="collapse">
Dashboard
</span>
</MixedLink>
</li>
<li {...(menuChildProps.li || {})}>
<MixedLink dest={routes.accountSettings} aria-label="Account">
Account
<span data-bs-target="#nav" data-bs-toggle="collapse">
Account
</span>
</MixedLink>
</li>
<li {...(menuChildProps.li || {})}>
<MixedLink dest={routes.orderHistory} aria-label="Order History">
Order History
<span data-bs-target="#nav" data-bs-toggle="collapse">
Order History
</span>
</MixedLink>
</li>
<li {...(menuChildProps.li || {})}>
Expand Down
10 changes: 9 additions & 1 deletion frontend/public/src/containers/pages/CatalogPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ export class CatalogPage extends React.Component<Props> {
this.state.allProgramsRetrieved
)
})
this.toggleMobileFilterWindowExpanded(false)
}

/**
Expand Down Expand Up @@ -557,7 +558,14 @@ export class CatalogPage extends React.Component<Props> {
)
}
/>
<h2>Catalog</h2>
<h2>
Catalog
<small>
{this.state.selectedDepartment === ALL_DEPARTMENTS
? ""
: this.state.selectedDepartment}
</small>
</h2>
</div>
</div>
<div className="container">
Expand Down

0 comments on commit 8ba88d0

Please sign in to comment.