Skip to content

Commit 8d82383

Browse files
committed
Futher item display tweaks
1 parent f6f84e2 commit 8d82383

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

jgclark.Dashboard/src/react/components/ItemContent.jsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import {
3131
convertBoldAndItalicToHTML,
3232
} from '@helpers/HTMLView'
3333
import { RE_SCHEDULED_DATES_G } from '@helpers/regex'
34-
// import { getTimeBlockString } from '@helpers/timeblocks'
3534
import { extractModifierKeys } from '@helpers/react/reactMouseKeyboard.js'
3635
import '../css/ItemContent.css'
3736

@@ -79,13 +78,17 @@ function ItemContent({ item /*, children */, thisSection }: Props): React$Node {
7978
})
8079
}
8180

81+
// TODO: decide whether to keep this, perhaps as a hidden setting
82+
// Remove tag/mention, if they match the item's sectionCode
83+
// if (thisSection.sectionCode === 'TAG') {
84+
// const sectionTagOrMention = thisSection.name
85+
// mainContent = mainContent.replace(sectionTagOrMention, '')
86+
// }
87+
8288
// console.log(`-> ${mainContent}`)
8389

84-
// if hasChild, then set suitable icon
85-
// v1: use'fa-arrow-down-from-line' icon
86-
// v2:
87-
// const possParentIcon = dashboardSettings.parentChildMarkersEnabled && item.para?.hasChild ? <i className="fa-regular fa-block-quote parentMarker pad-left"></i> : ''
88-
// v3: switch to ellipsis to match what main Editor has just got in 3.15.2
90+
// If hasChild, then set suitable display indicator
91+
// (Earlier options had used 'fa-arrow-down-from-line' and 'fa-block-quote' icons. But switched to ellipsis to match what main Editor added in 3.15.2)
8992
const possParentIcon = dashboardSettings.parentChildMarkersEnabled && item.para?.hasChild ? <i className="fa-solid fa-ellipsis parentMarker"></i> : ''
9093

9194
// Note: this section now deliberately disabled

jgclark.Dashboard/src/react/components/TaskItem.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Dashboard React component to create a full content line for a Task item:
44
// icon, content, noteLink and the fa-edit icon at the end.
55
//
6-
// Last updated for v2.1.0.b
6+
// Last updated 2025-07-22 for v2.3.0.b6
77
//--------------------------------------------------------------------------
88
// @flow
99
import React, { type Node, useState } from 'react'
@@ -58,7 +58,7 @@ function TaskItem({ item, thisSection }: Props): Node {
5858

5959
// Add an indent level to the start of the item iff it is a child and it has a selected parent
6060
// TODO: and test that parent is being shown!
61-
const indentLevelToDisplay = /* item.para?.isAChild && */ item.parentID && item.parentID !== '' ? item.para?.indentLevel ?? 0 : 0
61+
const indentLevelToDisplay = /* item.para?.isAChild && */ item.parentID && item.parentID !== '' ? item.para?.indents ?? 0 : 0
6262

6363
return (
6464
visible ? (
@@ -72,7 +72,6 @@ function TaskItem({ item, thisSection }: Props): Node {
7272
item={item}
7373
respondToClicks={true}
7474
onIconClick={handleIconClick}
75-
// timeblockStr={timeblockStr}
7675
/>
7776
<ItemContent item={item} thisSection={thisSection} />
7877
</div>

0 commit comments

Comments
 (0)