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(Navbar): fix Campus Commons list overflow #145

Merged
merged 1 commit into from
Nov 4, 2023
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
11 changes: 10 additions & 1 deletion client/src/components/commons/Commons.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
width: calc(100% - 2%);
}


#commons-mobilelinks {
margin: 0;
padding: 0;
Expand All @@ -33,6 +32,16 @@
color: #FFFFFF;
}

.commons-mobilenav-commonslist {
max-height: 25vh;
overflow-y: auto;
}

.commons-desktopnav-commonslist {
max-height: 40vh;
overflow-y: auto;
}

/* Catalog Branding */
#commons-intro-header {
font-size: 1.5em;
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/commons/CommonsNavbar/CommonsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const CommonsList: React.FC<CommonsListProps> = ({ isMobile = false }) => {

if (isMobile) {
return (
<Menu.Menu id="commons-mobilenav-libmenu">
<Menu.Menu className="commons-mobilenav-commonslist">
{itemsArr.map((item) => (
<Menu.Item {...item.props}>
<Icon name="university" />
Expand All @@ -71,8 +71,8 @@ const CommonsList: React.FC<CommonsListProps> = ({ isMobile = false }) => {
);
}
return (
<Dropdown item text="Campus Commons">
<Dropdown.Menu direction="left">
<Dropdown item text="Campus Commons" >
<Dropdown.Menu direction="left" className="commons-desktopnav-commonslist">
{itemsArr.map((item) => (
<Dropdown.Item {...item.props}>
<Icon name="university" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const CommonsNavbarMobile: React.FC<CommonsNavbarMobileProps> = ({
</div>
</div>
{menuOpen && (
<div className="bg-white w-full px-6 shadow-xl pb-2">
<div className="bg-white w-full px-6 shadow-xl pb-2" style={{maxHeight: '50vh'}}>
<Menu vertical fluid secondary>
<AboutOrgLink org={org} isMobile={true} />
{org.orgID === "libretexts" && (
Expand Down