feat(workspace): hide bullet point on empty blocks unless hovered
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m0s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m0s
This commit is contained in:
1 parent
6a261e3453
commit
1c71b09f20
1 file changed
+6
-1
@@ -479,6 +479,7 @@ export const OutlinerBlock: React.FC<OutlinerBlockProps> = ({
|
|||||||
|
|
||||||
const level = Math.max(0, block.level || 0);
|
const level = Math.max(0, block.level || 0);
|
||||||
const visualLevel = Math.max(0, level - (levelOffset || 0));
|
const visualLevel = Math.max(0, level - (levelOffset || 0));
|
||||||
|
const isEmpty = (!localContent || localContent.trim() === '') && !hasChildren;
|
||||||
|
|
||||||
// Parse rich tokens (WikiLinks [[Page]], Markdown Links [Title](url), raw URLs, and #Tags)
|
// Parse rich tokens (WikiLinks [[Page]], Markdown Links [Title](url), raw URLs, and #Tags)
|
||||||
const tokens = useMemo(() => {
|
const tokens = useMemo(() => {
|
||||||
@@ -560,12 +561,16 @@ export const OutlinerBlock: React.FC<OutlinerBlockProps> = ({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className={`w-1.5 h-1.5 rounded-full transition-all ${
|
className={`w-1.5 h-1.5 rounded-full transition-all duration-150 ${
|
||||||
block.collapsed && hasChildren
|
block.collapsed && hasChildren
|
||||||
? 'bg-accent ring-2 ring-accent/30'
|
? 'bg-accent ring-2 ring-accent/30'
|
||||||
: activeFocus
|
: activeFocus
|
||||||
? 'bg-accent scale-125'
|
? 'bg-accent scale-125'
|
||||||
: 'bg-faint group-hover/bullet:bg-accent group-hover/bullet:scale-125'
|
: 'bg-faint group-hover/bullet:bg-accent group-hover/bullet:scale-125'
|
||||||
|
} ${
|
||||||
|
isEmpty
|
||||||
|
? 'opacity-0 group-hover:opacity-100 hover:opacity-100'
|
||||||
|
: 'opacity-100'
|
||||||
}`}
|
}`}
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in new issue
Block a user