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

[#44751] Rework on the disabled list status for navigation reasons

Eric Schubert88e32abc3c0f
diff --git a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.html b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.html
index 8e83c118fef..2024b801528 100644
--- a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.html
+++ b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.html
@@ -5,16 +5,17 @@
target="_blank"
(dragstart)="setDragData($event)"
>
- <span
- class="spot-icon spot-icon_{{fileIcon.icon}} op-files-tab--icon op-files-tab--icon_{{fileIcon.clazz}}"
- ></span>
-
- <span
- [textContent]="attachment.fileName"
+ <div
[title]="attachment.fileName"
class="spot-list--item-title op-file-list--item-title"
data-qa-selector="op-files-tab--file-list-item-title"
- ></span>
+ >
+ <span
+ class="spot-icon spot-icon_{{fileIcon.icon}} op-files-tab--icon op-files-tab--icon_{{fileIcon.clazz}}"
+ ></span>
+
+ <span [textContent]="attachment.fileName"></span>
+ </div>
<span
class="op-file-list--item-text"
diff --git a/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.html b/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.html
index 2212825a0c5..93c2e8e7fa6 100644
--- a/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.html
+++ b/frontend/src/app/shared/components/file-links/file-link-list-item/file-link-list-item.html
@@ -14,20 +14,25 @@
>
<a
class="spot-list--item-action spot-list--item-action_link op-file-list--item-action"
- [ngClass]="{ 'disabled': disabled, 'view-not-allowed': !viewAllowed }"
+ [ngClass]="{
+ 'disabled': disabled,
+ 'spot-list--item-action_disabled': disabled,
+ 'view-not-allowed': !viewAllowed
+ }"
[href]="fileLink._links.staticOriginOpen.href"
[title]="fileLink.originData.name"
target="_blank"
>
- <span
- class="spot-icon spot-icon_{{fileLinkIcon.icon}} op-files-tab--icon op-files-tab--icon_{{fileLinkIcon.clazz}}"
- ></span>
-
- <span
- [textContent]="fileLink.originData.name"
- [title]="fileLink.originData.name"
+ <div
class="spot-list--item-title op-file-list--item-title"
- ></span>
+ [title]="fileLink.originData.name"
+ >
+ <span
+ class="spot-icon spot-icon_{{fileLinkIcon.icon}} op-files-tab--icon op-files-tab--icon_{{fileLinkIcon.clazz}}"
+ ></span>
+
+ <span [textContent]="fileLink.originData.name"></span>
+ </div>
<span
class="op-file-list--item-text"
diff --git a/frontend/src/app/shared/components/file-links/storage-file-list-item/storage-file-list-item.html b/frontend/src/app/shared/components/file-links/storage-file-list-item/storage-file-list-item.html
index e812722204e..4a42ba443c0 100644
--- a/frontend/src/app/shared/components/file-links/storage-file-list-item/storage-file-list-item.html
+++ b/frontend/src/app/shared/components/file-links/storage-file-list-item/storage-file-list-item.html
@@ -17,15 +17,17 @@
(checkedChange)="content.changeSelection()"
[disabled]="content.disabled"
></spot-checkbox>
- <span
- class="spot-icon spot-icon_{{content.icon.icon}} op-files-tab--icon op-files-tab--icon_{{content.icon.clazz}}"
- ></span>
- <span
- [textContent]="content.name"
- [title]="content.name"
+ <div
class="spot-list--item-title op-file-list--item-title"
- ></span>
+ [title]="content.name"
+ >
+ <span
+ class="spot-icon spot-icon_{{content.icon.icon}} op-files-tab--icon op-files-tab--icon_{{content.icon.clazz}}"
+ ></span>
+
+ <span [textContent]="content.name"></span>
+ </div>
<span
*ngIf="!content.isDirectory"
diff --git a/frontend/src/app/spot/styles/sass/components/list.sass b/frontend/src/app/spot/styles/sass/components/list.sass
index ef00a5fd13a..f8fed058c50 100644
--- a/frontend/src/app/spot/styles/sass/components/list.sass
+++ b/frontend/src/app/spot/styles/sass/components/list.sass
@@ -41,7 +41,6 @@
&:hover
background-color: transparent
cursor: not-allowed
- opacity: 0.5
color: $spot-color-basic-gray-1
&_active#{&}_disabled
@@ -83,10 +82,8 @@
word-break: break-word
min-height: $spot-spacing-1_5
- &:not(:first-child)
- margin-left: $spot-spacing-0_5
-
- &:not(:last-child)
+ &:not(:first-child),
+ :not(:first-child)
margin-left: $spot-spacing-0_5
&_ellipse-text
@@ -96,6 +93,9 @@
max-width: 100%
width: 100%
+ &-action_disabled &-title
+ opacity: 0.5
+
&-floating-wrapper:hover > &-floating-actions,
&-floating-actions:focus-within,
&-floating-actions:hover
diff --git a/frontend/src/global_styles/content/work_packages/shared/_file_list.sass b/frontend/src/global_styles/content/work_packages/shared/_file_list.sass
index a3076c31572..99fa3b68717 100644
--- a/frontend/src/global_styles/content/work_packages/shared/_file_list.sass
+++ b/frontend/src/global_styles/content/work_packages/shared/_file_list.sass
@@ -33,25 +33,20 @@
&-action
text-decoration: none
- &.view-not-allowed
- opacity: 0.5
-
&.disabled
- color: $spot-color-basic-gray-3
- opacity: 0.5
+ color: $spot-color-basic-gray-1
pointer-events: none
- .op-files-tab--icon
- color: $spot-color-basic-gray-3
-
&:hover
.op-file-list--item-title
text-decoration: underline
+ &-action.view-not-allowed &-title
+ opacity: 0.5
+
&-title
@include spot-body-small
- line-height: $spot-spacing-1_5
word-break: normal
@include text-shortener
padding-right: $spot-spacing-0_5