Skip to content

Commit aaca6d0

Browse files
committed
stick project estimation during specification scrolling on mobile, even if there is not Submit for Review button
1 parent d169c48 commit aaca6d0

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

src/projects/detail/components/ProjectSpecSidebar.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,17 @@ class ProjectSpecSidebar extends Component {
187187
</MediaQuery>
188188
</div>
189189
}
190+
{!showReviewBtn && hasEstimation &&
191+
<MediaQuery maxWidth={SCREEN_BREAKPOINT_MD - 1}>
192+
<div className="sticky-estimation-only">
193+
<Sticky top={0}>
194+
<div className="btn-boxs">
195+
{getProjectEstimateSection()}
196+
</div>
197+
</Sticky>
198+
</div>
199+
</MediaQuery>
200+
}
190201
</div>
191202
)
192203
}

src/projects/detail/components/ProjectSpecSidebar.scss

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
padding: 20px 0;
2222
border-radius: 4px;
2323
min-width: 280px;
24+
position: relative;
2425

2526
@media screen and (max-width: $screen-md - 1px) {
2627
border-radius: 0;
@@ -136,10 +137,6 @@
136137

137138
/* styles related to animations when .btn-boxs sticks using Sticky module */
138139
@media screen and (max-width: $screen-md - 1px) {
139-
.sticky-inner-wrapper {
140-
z-index: 10;
141-
}
142-
143140
/* restyle estimations component */
144141
.btn-boxs {
145142
.list-group {
@@ -182,6 +179,10 @@
182179
}
183180

184181
.sticky-outer-wrapper.active {
182+
.sticky-inner-wrapper {
183+
z-index: 10;
184+
}
185+
185186
.btn-boxs {
186187
box-shadow: 0px 1px 3px 0px rgba($tc-black, 0.2);
187188
}
@@ -196,5 +197,23 @@
196197
}
197198
}
198199
}
200+
201+
.sticky-estimation-only {
202+
.sticky-outer-wrapper {
203+
bottom: 0;
204+
left: 0;
205+
position: absolute;
206+
width: 100%;
207+
z-index: -1;
208+
209+
&.active {
210+
z-index: 10;
211+
}
212+
}
213+
214+
.btn-boxs {
215+
height: 70px;
216+
}
217+
}
199218
}
200219
}

0 commit comments

Comments
 (0)