Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Ensure that the mobile WP card representation can span the complete width of the screen

Henriette Dinger96b6753fd986
diff --git a/app/assets/stylesheets/layout/_toolbar_mobile.sass b/app/assets/stylesheets/layout/_toolbar_mobile.sass
index 009896d6eb7..f01572af75e 100644
--- a/app/assets/stylesheets/layout/_toolbar_mobile.sass
+++ b/app/assets/stylesheets/layout/_toolbar_mobile.sass
@@ -53,7 +53,3 @@
> form input.button
width: 100%
-
- overview-page-layout
- .toolbar-item:first-child
- flex-basis: calc(100% - 10px) // 10px right margin
diff --git a/app/assets/stylesheets/layout/work_packages/_mobile.sass b/app/assets/stylesheets/layout/work_packages/_mobile.sass
index 95648863e91..e32828fa583 100644
--- a/app/assets/stylesheets/layout/work_packages/_mobile.sass
+++ b/app/assets/stylesheets/layout/work_packages/_mobile.sass
@@ -140,3 +140,12 @@
.router--work-packages-split-view-new
.work-packages-split-view--details-side
overflow-x: auto
+
+ .router--work-packages-base
+ // Ensure the WP cards can span the complete width on mobile
+ #content-wrapper
+ padding: 15px 0 !important
+
+ .toolbar-container
+ margin-left: 15px
+ margin-right: 15px
diff --git a/app/assets/stylesheets/layout/work_packages/_table.sass b/app/assets/stylesheets/layout/work_packages/_table.sass
index 1ba8561361f..39551c40026 100644
--- a/app/assets/stylesheets/layout/work_packages/_table.sass
+++ b/app/assets/stylesheets/layout/work_packages/_table.sass
@@ -33,6 +33,11 @@
#main
top: 12px
+.router--work-packages-list-view:not(.router--work-packages-full-create),
+.router--work-packages-full-view:not(.router--work-packages-full-create)
+ #content-wrapper
+ padding: 0 0 0 20px
+
// Ensure correct height applied to child elements.
// The dom looks like this:
// flash (generated from rails - if it was generated when rendering the page)
diff --git a/frontend/src/app/components/wp-card-view/styles/wp-card-view-horizontal.sass b/frontend/src/app/components/wp-card-view/styles/wp-card-view-horizontal.sass
index dd9a1646531..aa2e0d3bc90 100644
--- a/frontend/src/app/components/wp-card-view/styles/wp-card-view-horizontal.sass
+++ b/frontend/src/app/components/wp-card-view/styles/wp-card-view-horizontal.sass
@@ -6,8 +6,9 @@
margin-right: 5px
@media only screen and (max-width: 679px)
- &.-mobile-cards
+ &.-shrink
grid-row-gap: 0
+ margin-right: 0
.form--separator
margin-bottom: 0
diff --git a/frontend/src/app/components/wp-card-view/wp-card-view.component.ts b/frontend/src/app/components/wp-card-view/wp-card-view.component.ts
index 928c8418612..822b063dbc7 100644
--- a/frontend/src/app/components/wp-card-view/wp-card-view.component.ts
+++ b/frontend/src/app/components/wp-card-view/wp-card-view.component.ts
@@ -189,7 +189,7 @@ export class WorkPackageCardViewComponent implements OnInit, AfterViewInit {
public classes() {
let classes = 'wp-cards-container ';
classes += '-' + this.orientation;
- classes += this.shrinkOnMobile ? ' -mobile-cards':'';
+ classes += this.shrinkOnMobile ? ' -shrink' : '';
return classes;
}
diff --git a/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.sass b/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.sass
index 6d1bb9b1e78..94a58a8c6dd 100644
--- a/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.sass
+++ b/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.sass
@@ -89,7 +89,7 @@
.wp-card
max-width: none
- &.-mobile-cards
+ &.-shrink
border: none
box-shadow: none
- padding: 10px 0
+ padding: 15px
diff --git a/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.ts b/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.ts
index a13a3749dcb..f98900e58aa 100644
--- a/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.ts
+++ b/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.ts
@@ -62,7 +62,7 @@ export class WorkPackageSingleCardComponent {
classes += wp.isNew ? ' -new' : '';
classes += ' wp-card-' + wp.id;
classes += ' -' + this.orientation;
- classes += this.shrinkOnMobile ? ' -mobile-cards' : '';
+ classes += this.shrinkOnMobile ? ' -shrink' : '';
return classes;
}
diff --git a/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.sass b/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.sass
index 0e1a3dc13fb..cb36e2397e3 100644
--- a/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.sass
+++ b/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.sass
@@ -10,3 +10,8 @@
overflow: auto
padding-bottom: 5px
@include styled-scroll-bar
+
+ @media screen and (max-width: 659px)
+ // Ensure the WP cards span the complete width on mobile
+ // --> Move scrollbar out of visible area
+ min-width: calc(100vw + 10px)