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

refactored as requested from @HDinger

Jonas Jabari0186c8e8205a
diff --git a/app/components/work_packages/activities_tab/index_component.sass b/app/components/work_packages/activities_tab/index_component.sass
index 576049f7be1..ef3eed0b772 100644
--- a/app/components/work_packages/activities_tab/index_component.sass
+++ b/app/components/work_packages/activities_tab/index_component.sass
@@ -1,10 +1,10 @@
-.work-packages-activities-tab-index-component
+@mixin activities-tab-component($breakpoint, $input-container-padding-right: 10px, $input-container-margin-bottom: 20px)
overflow-y: hidden
&--errors
position: absolute
width: calc(100% - 22px)
z-index: 11
- @media screen and (max-width: $breakpoint-xl)
+ @media screen and (max-width: $breakpoint)
position: fixed
bottom: 20px
width: calc(100% - 30px)
@@ -15,12 +15,12 @@
&_with-initial-input-compensation
margin-bottom: 65px // initial margin-bottom, will be increased by stimulus when opening ckeditor
- @media screen and (max-width: $breakpoint-xl)
+ @media screen and (max-width: $breakpoint)
margin-bottom: -16px
&_with-input-compensation
margin-bottom: 180px
- @media screen and (max-width: $breakpoint-xl)
+ @media screen and (max-width: $breakpoint)
margin-bottom: -16px
&--input-container
@@ -28,8 +28,8 @@
border-radius: var(--borderRadius-medium)
border: none
padding-right: 16px
- margin-bottom: 20px
- @media screen and (min-width: $breakpoint-xl)
+ margin-bottom: $input-container-margin-bottom
+ @media screen and (min-width: $breakpoint)
position: absolute
min-height: 60px
bottom: 0
@@ -37,102 +37,20 @@
right: 0
border-radius: 0px
border-top: var(--borderWidth-thin, 1px) solid var(--borderColor-default)
- padding-right: 10px
+ padding-right: $input-container-padding-right
margin-bottom: 0px
+
&_sort-desc
- @media screen and (max-width: $breakpoint-xl)
+ @media screen and (max-width: $breakpoint)
order: -1
+.work-packages-activities-tab-index-component
+ @include activities-tab-component($breakpoint-xl)
+
.work-packages-activities-tab-index-component--within-notification-center
.work-packages-activities-tab-index-component
- overflow-y: hidden
- &--errors
- position: absolute
- width: calc(100% - 22px)
- z-index: 11
- @media screen and (max-width: $breakpoint-lg)
- position: fixed
- bottom: 20px
- width: calc(100% - 30px)
- &--journals-container
- z-index: 10
- padding-top: 3px
- overflow-y: auto
-
- &_with-initial-input-compensation
- margin-bottom: 65px // initial margin-bottom, will be increased by stimulus when opening ckeditor
- @media screen and (max-width: $breakpoint-lg)
- margin-bottom: -16px
-
- &_with-input-compensation
- margin-bottom: 180px
- @media screen and (max-width: $breakpoint-lg)
- margin-bottom: -16px
-
- &--input-container
- z-index: 10
- border-radius: var(--borderRadius-medium)
- border: none
- padding-right: 16px
- margin-bottom: 20px
- @media screen and (min-width: $breakpoint-lg)
- position: absolute
- min-height: 60px
- bottom: 0
- left: 0
- right: 0
- border-radius: 0px
- border-top: var(--borderWidth-thin, 1px) solid var(--borderColor-default)
- padding-right: 15px
- margin-bottom: 0px
-
- &_sort-desc
- @media screen and (max-width: $breakpoint-lg)
- order: -1
+ @include activities-tab-component($breakpoint-lg, 15px)
.work-packages-activities-tab-index-component--within-split-screen
.work-packages-activities-tab-index-component
- overflow-y: hidden
- &--errors
- position: absolute
- width: calc(100% - 22px)
- z-index: 11
- @media screen and (max-width: $breakpoint-sm)
- position: fixed
- bottom: 20px
- width: calc(100% - 30px)
- &--journals-container
- z-index: 10
- padding-top: 3px
- overflow-y: auto
-
- &_with-initial-input-compensation
- margin-bottom: 65px // initial margin-bottom, will be increased by stimulus when opening ckeditor
- @media screen and (max-width: $breakpoint-sm)
- margin-bottom: -16px
-
- &_with-input-compensation
- margin-bottom: 180px
- @media screen and (max-width: $breakpoint-sm)
- margin-bottom: -16px
-
- &--input-container
- z-index: 10
- border-radius: var(--borderRadius-medium)
- border: none
- padding-right: 16px
- margin-bottom: 10px
- @media screen and (min-width: $breakpoint-sm)
- position: absolute
- min-height: 60px
- bottom: 0
- left: 0
- right: 0
- border-radius: 0px
- border-top: var(--borderWidth-thin, 1px) solid var(--borderColor-default)
- padding-right: 10px
- margin-bottom: 0px
-
- &_sort-desc
- @media screen and (max-width: $breakpoint-sm)
- order: -1
\ No newline at end of file
+ @include activities-tab-component($breakpoint-sm, 10px, 10px)
\ No newline at end of file