Skip to content

Commit

Permalink
fix: hide blockid in reading view (#2368)
Browse files Browse the repository at this point in the history
* fix: hide blockid in reading view (#2073)

* fix: Hide the block id in Reading mode

* test: Update tests for addition of 'block-link' class.

---------

Co-authored-by: Clare Macrae <[email protected]>
  • Loading branch information
theotheo and claremacrae authored Nov 8, 2023
1 parent 2e70471 commit 41abdec
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/TaskLineRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const LayoutClasses: { [c in TaskLayoutComponent]: string } = {
scheduledDate: 'task-scheduled',
doneDate: 'task-done',
recurrenceRule: 'task-recurring',
blockLink: '',
blockLink: 'block-link',
};

const MAX_DAY_VALUE_RANGE = 7;
Expand Down Expand Up @@ -242,7 +242,6 @@ function getTaskComponentClass(component: TaskLayoutComponent, task: Task) {
const componentClass = LayoutClasses[component];
switch (component) {
case 'blockLink':
break;
case 'description':
case 'priority':
case 'recurrenceRule':
Expand Down
4 changes: 4 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
display: none;
}

.task-list-item .block-link{
display: none;
}

.tasks-setting-important {
color: red;
font-weight: bold;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
<span class="task-done"
data-task-done="past-far">
<span> ✅ 2023-07-05</span></span>
<span>
<span class="block-link">
<span> ^dcf64c</span></span></span></li>
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
<span class="task-done"
data-task-done="past-far">
<span></span></span>
<span>
<span class="block-link">
<span> ^dcf64c</span></span></span></li>

0 comments on commit 41abdec

Please sign in to comment.