feat: select text across bullets and delete it like a text editor; Ctrl+Z in tasks; notes and lists without emoji; custom done columns complete tasks
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m33s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m33s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e2b9daba75
commit
6fb98d4002
27 files changed
+535
-64
No files matched your search
@@ -1,16 +1,16 @@
|
||||
import React, { useRef, useState } from 'react';
|
||||
import { SmilePlus } from 'lucide-react';
|
||||
import { EmojiPickerModal } from '../features/workspace/EmojiPickerModal';
|
||||
|
||||
interface EmojiIconButtonProps {
|
||||
value: string;
|
||||
// "" = no icon (removed in the picker)
|
||||
onChange: (emoji: string) => void;
|
||||
// Shown while no icon is chosen
|
||||
fallback: string;
|
||||
}
|
||||
|
||||
// Icon field of the create dialogs (note, task list, list): the emoji as a button that opens the same
|
||||
// picker as the icon of an open note (Doku/ui-patterns.md).
|
||||
export const EmojiIconButton: React.FC<EmojiIconButtonProps> = ({ value, onChange, fallback }) => {
|
||||
// picker as the icon of an open note, removing included (Doku/ui-patterns.md).
|
||||
export const EmojiIconButton: React.FC<EmojiIconButtonProps> = ({ value, onChange }) => {
|
||||
const buttonRef = useRef<HTMLButtonElement>(null);
|
||||
const [anchor, setAnchor] = useState<DOMRect | null>(null);
|
||||
return (
|
||||
@@ -19,17 +19,16 @@ export const EmojiIconButton: React.FC<EmojiIconButtonProps> = ({ value, onChang
|
||||
ref={buttonRef}
|
||||
type="button"
|
||||
onClick={() => setAnchor((cur) => (cur ? null : buttonRef.current?.getBoundingClientRect() ?? null))}
|
||||
title="Icon auswählen"
|
||||
aria-label="Icon auswählen"
|
||||
title={value ? 'Icon ändern' : 'Icon wählen'}
|
||||
aria-label={value ? 'Icon ändern' : 'Icon wählen'}
|
||||
className="w-12 sm:w-10 h-11 sm:h-8 flex-shrink-0 flex items-center justify-center input-field text-lg sm:text-base leading-none cursor-pointer hover:border-strong"
|
||||
>
|
||||
{value || fallback}
|
||||
{value || <SmilePlus className="w-4 h-4 text-faint" strokeWidth={1.75} />}
|
||||
</button>
|
||||
{anchor && (
|
||||
<EmojiPickerModal
|
||||
currentIcon={value}
|
||||
anchor={anchor}
|
||||
allowRemove={false}
|
||||
onSelectEmoji={(emoji) => {
|
||||
onChange(emoji);
|
||||
setAnchor(null);
|
||||
|
||||
Reference in new issue
Block a user