From 41abdec4bbe0fbea8a5a41900c1cdf1d80e6640d Mon Sep 17 00:00:00 2001 From: theotheo Date: Thu, 9 Nov 2023 01:29:34 +0300 Subject: [PATCH] fix: hide blockid in reading view (#2368) * 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 --- src/TaskLineRenderer.ts | 3 +-- styles.css | 4 ++++ ...er.test.Visualise_HTML_Full_task_-_full_mode.approved.html | 2 +- ...r.test.Visualise_HTML_Full_task_-_short_mode.approved.html | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/TaskLineRenderer.ts b/src/TaskLineRenderer.ts index 62463ee6b6..9f9f9e65b6 100644 --- a/src/TaskLineRenderer.ts +++ b/src/TaskLineRenderer.ts @@ -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; @@ -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': diff --git a/styles.css b/styles.css index 118d47432b..ad746d3303 100644 --- a/styles.css +++ b/styles.css @@ -88,6 +88,10 @@ display: none; } +.task-list-item .block-link{ + display: none; +} + .tasks-setting-important { color: red; font-weight: bold; diff --git a/tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_full_mode.approved.html b/tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_full_mode.approved.html index 1e4c30923e..a6e9282ea4 100644 --- a/tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_full_mode.approved.html +++ b/tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_full_mode.approved.html @@ -33,5 +33,5 @@ ✅ 2023-07-05 - + ^dcf64c diff --git a/tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_short_mode.approved.html b/tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_short_mode.approved.html index 1d8c0cc707..11f8f92d39 100644 --- a/tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_short_mode.approved.html +++ b/tests/TaskLineRenderer.test.Visualise_HTML_Full_task_-_short_mode.approved.html @@ -33,5 +33,5 @@ - + ^dcf64c