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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
First steps towards drop modal mobile view
Benjamin Bädorf0bfd495e01ca
diff --git a/frontend/src/app/spot/components/drop-modal/drop-modal.component.html b/frontend/src/app/spot/components/drop-modal/drop-modal.component.htmlindex e57f31e9dea..1f94b1850f7 100644--- a/frontend/src/app/spot/components/drop-modal/drop-modal.component.html+++ b/frontend/src/app/spot/components/drop-modal/drop-modal.component.html@@ -5,3 +5,11 @@><ng-content select="[slot=body]"></ng-content></div>+<button+ class="spot-drop-modal--close-button spot-button spot-button"+ type="button"+ aria-label="Close"+ (click)="close()"+>+ <span class="icon-close"></span>+</button>diff --git a/frontend/src/app/spot/styles/sass/components/drop-modal.sass b/frontend/src/app/spot/styles/sass/components/drop-modal.sassindex cf806731574..f16d6b09883 100644--- a/frontend/src/app/spot/styles/sass/components/drop-modal.sass+++ b/frontend/src/app/spot/styles/sass/components/drop-modal.sass@@ -3,40 +3,86 @@display: inline-flex&--body- @include spot-z-index("drop-modal")+ @include spot-z-index("drop-modal", 1)+ pointer-events: none+ opacity: 0++ position: fixed+ top: auto+ height: auto+ bottom: $spot-spacing-3_5+ left: $spot-spacing-1+ right: $spot-spacing-1+ width: calc(100vw - (2 * #{$spot-spacing-1}))+ max-height: calc(100vh - (#{$spot-spacing-3_5} - #{$spot-spacing-1}))box-shadow: $spot-shadow-light-mid- position: absolutebackground: $spot-color-basic-whiteborder-radius: 5px- pointer-events: none- opacity: 0- &_bottom-center- top: calc(100% + #{$spot-spacing-0_25})- left: 50%- transform: translateX(-50%)+ @media #{$spot-mq-drop-modal-in-context}+ position: absolute+ top: unset+ bottom: unset+ left: unset+ right: unset++ &_bottom-center+ top: calc(100% + #{$spot-spacing-0_25})+ left: 50%+ transform: translateX(-50%)++ &_bottom-left+ top: calc(100% + #{$spot-spacing-0_25})+ left: 0%++ &_bottom-right+ top: calc(100% + #{$spot-spacing-0_25})+ right: 0%++ &_top-center+ bottom: calc(100% + #{$spot-spacing-0_25})+ left: 50%+ transform: translateX(-50%)++ &_top-left+ bottom: calc(100% + #{$spot-spacing-0_25})+ left: 0%- &_bottom-left- top: calc(100% + #{$spot-spacing-0_25})- left: 0%+ &_top-right+ bottom: calc(100% + #{$spot-spacing-0_25})+ right: 0%++ &_opened::before+ @include spot-z-index("drop-modal", 0)+ display: block+ content: ''+ position: fixed+ top: 0+ bottom: 0+ left: 0+ right: 0+ background: rgba($spot-color-basic-black, 0.5)- &_bottom-right- top: calc(100% + #{$spot-spacing-0_25})- right: 0%+ @media #{$spot-mq-drop-modal-in-context}+ display: none- &_top-center- bottom: calc(100% + #{$spot-spacing-0_25})- left: 50%- transform: translateX(-50%)+ &--close-button+ @include spot-z-index("drop-modal", 1)+ display: none+ position: fixed+ top: auto+ height: auto+ bottom: $spot-spacing-0_75+ width: calc(100% - 2 * $spot-spacing-1)+ left: 50%+ transform: translateX(-50%)- &_top-left- bottom: calc(100% + #{$spot-spacing-0_25})- left: 0%+ &_opened &--close-button+ display: block- &_top-right- bottom: calc(100% + #{$spot-spacing-0_25})- right: 0%+ @media #{$spot-mq-drop-modal-in-context}+ display: none&_opened &--bodypointer-events: alldiff --git a/frontend/src/app/spot/styles/tokens/dist/tokens.json b/frontend/src/app/spot/styles/tokens/dist/tokens.jsonindex f9128529891..d86471efef2 100644--- a/frontend/src/app/spot/styles/tokens/dist/tokens.json+++ b/frontend/src/app/spot/styles/tokens/dist/tokens.json@@ -53,5 +53,8 @@"spot-shadow-light-high": "6px 6px 20px rgba(0, 0, 0, 0.15)","spot-shadow-hard-low": "2px 2px 5px rgba(0, 0, 0, 0.25)","spot-shadow-hard-mid": "4px 4px 10px rgba(0, 0, 0, 0.25)",- "spot-shadow-hard-high": "6px 6px 20px rgba(0, 0, 0, 0.25)"-}+ "spot-shadow-hard-high": "6px 6px 20px rgba(0, 0, 0, 0.25)",+ "spot-mq-drop-modal-in-context": "'screen and (min-width: 768px)'",+ "spot-mq-portrait": "'screen and (orientation: portrait)'",+ "spot-mq-landscape": "'screen and (orientation: landscape)'"+}\ No newline at end of filediff --git a/frontend/src/app/spot/styles/tokens/dist/tokens.sass b/frontend/src/app/spot/styles/tokens/dist/tokens.sassindex 0f2e06bc84d..8becbeb3549 100644--- a/frontend/src/app/spot/styles/tokens/dist/tokens.sass+++ b/frontend/src/app/spot/styles/tokens/dist/tokens.sass@@ -54,3 +54,6 @@ $spot-shadow-light-high: 6px 6px 20px rgba(0, 0, 0, 0.15)$spot-shadow-hard-low: 2px 2px 5px rgba(0, 0, 0, 0.25)$spot-shadow-hard-mid: 4px 4px 10px rgba(0, 0, 0, 0.25)$spot-shadow-hard-high: 6px 6px 20px rgba(0, 0, 0, 0.25)+$spot-mq-drop-modal-in-context: 'screen and (min-width: 768px)'+$spot-mq-portrait: 'screen and (orientation: portrait)'+$spot-mq-landscape: 'screen and (orientation: landscape)'diff --git a/frontend/src/app/spot/styles/tokens/media-queries.yml b/frontend/src/app/spot/styles/tokens/media-queries.ymlnew file mode 100644index 00000000000..c8598b3a3ee--- /dev/null+++ b/frontend/src/app/spot/styles/tokens/media-queries.yml@@ -0,0 +1,11 @@+props:+ spot-mq-drop-modal-in-context:+ value: "'screen and (min-width: 768px)'"+ spot-mq-portrait:+ value: "'screen and (orientation: portrait)'"+ spot-mq-landscape:+ value: "'screen and (orientation: landscape)'"++global:+ type: media-query+ category: media-querydiff --git a/frontend/src/app/spot/styles/tokens/tokens.yml b/frontend/src/app/spot/styles/tokens/tokens.ymlindex 1812f8a13f8..588003217de 100644--- a/frontend/src/app/spot/styles/tokens/tokens.yml+++ b/frontend/src/app/spot/styles/tokens/tokens.yml@@ -2,3 +2,4 @@ imports:- ./colors.yml- ./spacings.yml- ./shadows.yml+ - ./media-queries.yml