Merge pull request #9838 from overleaf/jel-dash-scrolling

[web] React dash scrolling

GitOrigin-RevId: 80d8fe8756df717c19c05e6ad848c32d03e487fc
This commit is contained in:
Jessica Lawshe 2022-10-06 09:37:44 -05:00 committed by Copybot
parent f789492720
commit 6f007a9703
2 changed files with 105 additions and 95 deletions

View file

@ -45,19 +45,20 @@ function ProjectListPageContent() {
<LoadingBranded loadProgress={loadProgress} /> <LoadingBranded loadProgress={loadProgress} />
</div> </div>
) : ( ) : (
<div className="project-list-row fill">
<div className="project-list-wrapper clearfix"> <div className="project-list-wrapper clearfix">
{error ? <DashApiError /> : ''}
{totalProjectsCount > 0 ? ( {totalProjectsCount > 0 ? (
<> <>
<div className="project-list-sidebar-wrapper hidden-xs"> <div className="project-list-sidebar-wrapper-react hidden-xs">
<aside className="project-list-sidebar"> <div className="project-list-sidebar-subwrapper">
<aside className="project-list-sidebar-react">
<NewProjectButton id="new-project-button-sidebar" /> <NewProjectButton id="new-project-button-sidebar" />
<SidebarFilters /> <SidebarFilters />
</aside> </aside>
<SurveyWidget /> <SurveyWidget />
</div> </div>
<div className="project-list-main"> </div>
<div className="project-list-main-react">
{error ? <DashApiError /> : ''}
<Row> <Row>
<Col xs={12}> <Col xs={12}>
<UserNotifications /> <UserNotifications />
@ -120,6 +121,8 @@ function ProjectListPageContent() {
</div> </div>
</> </>
) : ( ) : (
<div className="project-list-welcome-wrapper">
{error ? <DashApiError /> : ''}
<Row className="row-spaced"> <Row className="row-spaced">
<Col <Col
xs={8} xs={8}
@ -131,8 +134,8 @@ function ProjectListPageContent() {
<WelcomeMessage /> <WelcomeMessage />
</Col> </Col>
</Row> </Row>
)}
</div> </div>
)}
</div> </div>
) )
} }

View file

@ -24,24 +24,36 @@
} }
} }
.project-list-row { .project-list-wrapper {
height: 100%; display: flex;
align-items: stretch;
min-height: calc(~'100vh -' @header-height); min-height: calc(~'100vh -' @header-height);
} }
.project-list-wrapper { .project-list-sidebar-wrapper-react {
position: absolute; background-color: @sidebar-bg;
width: 100%; flex: 0 0 15%;
min-height: calc(~'100vh -' @header-height);
.project-list-sidebar-subwrapper {
display: flex;
flex-direction: column;
height: 100%; height: 100%;
.project-list-sidebar-react {
height: 100%;
padding-left: 15px;
padding-right: 15px;
overflow-x: hidden;
overflow-y: auto;
-ms-overflow-style: -ms-autohiding-scrollbar;
padding-top: @content-margin-vertical;
padding-bottom: @content-margin-vertical;
color: @sidebar-color;
.small {
color: @sidebar-color;
} }
.project-list-sidebar-wrapper {
float: left;
position: static;
width: 15%;
min-width: 160px;
.project-list-sidebar {
> .dropdown { > .dropdown {
width: 100%; width: 100%;
@ -51,13 +63,14 @@
} }
} }
} }
}
.project-list-main { .project-list-welcome-wrapper {
position: static; width: 100%;
overflow: auto; }
padding-left: @grid-gutter-width / 2;
padding-right: @grid-gutter-width / 2; .project-list-main-react {
margin-left: initial; padding: @content-margin-vertical @grid-gutter-width / 2;
} }
ul.folders-menu { ul.folders-menu {
@ -570,12 +583,6 @@
} }
} }
.project-list-react.container,
.project-list-react .project-list-sidebar-wrapper,
.project-list-react .project-list-main {
height: 100%;
}
.current-plan { .current-plan {
vertical-align: middle; vertical-align: middle;
line-height: @line-height-base; line-height: @line-height-base;