Browse Source

Fix Workspaces at All Boards to have correct count of remaining etc, while starred also at Starred/Favorites.

Thanks to xet7 !
Lauri Ojansivu 21 hours ago
parent
commit
6244657ca5
2 changed files with 14 additions and 6 deletions
  1. 7 2
      client/components/boards/boardsList.css
  2. 7 4
      client/components/boards/boardsList.js

+ 7 - 2
client/components/boards/boardsList.css

@@ -373,6 +373,12 @@
 .board-list li.starred .is-star-active,
 .board-list li.starred .is-not-star-active {
   opacity: 1;
+  color: #ffd700;
+}
+/* Show star icon on hover even for non-starred boards */
+.board-list li:hover .is-star-active,
+.board-list li:hover .is-not-star-active {
+  opacity: 1;
 }
 .board-list .board-list-item {
   overflow: hidden;
@@ -436,7 +442,7 @@
 }
 .board-list .is-star-active,
 .board-list .is-not-star-active {
-  bottom: 0;
+  top: 0;
   font-size: 14px;
   height: 18px;
   line-height: 18px;
@@ -444,7 +450,6 @@
   padding: 9px 9px;
   position: absolute;
   right: 0;
-  top: 0;
   transition-duration: 0.15s;
   transition-property: color, font-size, background;
 }

+ 7 - 4
client/components/boards/boardsList.js

@@ -293,13 +293,15 @@ BlazeComponent.extendComponent({
     } else if (sel === 'templates') {
       list = list.filter(b => b.type === 'template-container');
     } else if (sel === 'remaining') {
+      // Show boards not in any workspace AND not templates
+      // Keep starred boards visible in Remaining too
       list = list.filter(b => 
         !assignments[b._id] && 
-        b.type !== 'template-container' && 
-        !(currentUser && currentUser.hasStarred(b._id))
+        b.type !== 'template-container'
       );
     } else {
       // assume sel is a workspaceId
+      // Keep starred boards visible in their workspace too
       list = list.filter(b => assignments[b._id] === sel);
     }
 
@@ -803,10 +805,11 @@ BlazeComponent.extendComponent({
     } else if (type === 'templates') {
       return allBoards.filter(b => b.type === 'template-container').length;
     } else if (type === 'remaining') {
+      // Count boards not in any workspace AND not templates
+      // Include starred boards (they appear in both Starred and Remaining)
       return allBoards.filter(b => 
         !assignments[b._id] && 
-        b.type !== 'template-container' && 
-        !(currentUser && currentUser.hasStarred(b._id))
+        b.type !== 'template-container'
       ).length;
     }
     return 0;