Commit Graph

162 Commits

Author SHA1 Message Date
kolaente 9626382667 fix(editor): close only editor when pressing escape
This fixes a bug where when the task was opened in a modal and the user was editing the description and then pressing escape it would also close the task modal instead of only escaping from the editor itself.
2025-11-27 22:24:22 +01:00
kolaente 16790e19f9
fix(editor): preserve consecutive whitespace in comments in TipTap (#1893)
* fix(editor): preserve consecutive whitespace in comments in TipTap

Ensure multiple spaces in comment content are no longer collapsed when editing/saving by:
- Adding SetContentOptions with parseOptions.preserveWhitespace = 'full'
- Applying those options to all setContent calls (initial load, exit edit mode, post-upload cleanup)
- Enabling preserveWhitespace in editor parseOptions

Previously, repeated spaces were normalized away after setContent(false), causing comments with deliberate spacing to be altered unexpectedly.

No behavioral changes beyond whitespace retention; renders identical except space fidelity.

* fix(editor): use preserveWhitespace true instead of full to avoid duplicate checklist items

The 'full' mode preserves all whitespace including between block elements,
which caused the HTML parser to create extra empty list items from newlines
between <li> tags. Using 'true' preserves whitespace in inline content only,
which still achieves the goal of preserving consecutive spaces in text while
not creating spurious nodes from formatting whitespace.

---------

Co-authored-by: maggch <maggch@outlook.com>
2025-11-27 19:10:22 +00:00
kolaente 34575e4eb7 fix(editor): don't convert text that's pasted into a code block to markdown
Resolves https://community.vikunja.io/t/pasting-into-code-block-renders-markdown/4181
2025-11-26 23:27:33 +01:00
kolaente 719d06a991
feat(editor): automatically save draft comments locally (#1868)
Resolves https://github.com/go-vikunja/vikunja/issues/1867
2025-11-24 22:23:58 +00:00
kolaente e7c0f5fab3 fix(components): fix all type errors in FilterAutocomplete.ts
- Add type filters for label and project arrays to remove undefined values
- Add @ts-expect-error for projectId parameter in getAll call
- Add type assertion for userService.getAll empty object parameter
- Add default value for prefix in destructuring
- Add null check for match.index
- Add type assertions for union type property access (username/title)
- Add null check for autocompleteContext
- Fix Selection.near call with @ts-expect-error comment
- Add optional chaining for array access that could be undefined
2025-11-22 17:23:03 +01:00
kolaente fe9bc02d10 fix(components): use ts-expect-error in mentionSuggestion.ts
- Replace 'as any' with @ts-expect-error comment
- This is needed because projectId is used for URL replacement but not part of IAbstract
2025-11-22 17:23:03 +01:00
kolaente 412fd3a221 fix(components): add type assertions in MentionUser.vue
- Import IUser type
- Add type assertion for username from node.attrs.id
- Add type assertion for fetchAvatarBlobUrl return value
2025-11-22 17:23:03 +01:00
kolaente 642cd08b9d fix(components): add type annotations in MentionList.vue
- Import PropType and MentionNodeAttrs
- Add MentionItem interface
- Add PropType for items array and command function
2025-11-22 17:23:03 +01:00
kolaente 30101308ea fix(components): add type annotations in suggestion.ts
- Import Editor and Range types from @tiptap/core
- Add TranslateFunction type for t parameter
- Add SuggestionProps interface for props parameter
- Add type annotations for all command callbacks
- Add null check for document.getElementById result
- Add null check for props.event in onKeyDown
2025-11-22 17:23:03 +01:00
kolaente ddf018e791 fix(components): add type annotations in setLinkInEditor.ts
- Import Editor type from @tiptap/core
- Add DOMRect type for pos parameter
- Add Editor | null | undefined type for editor parameter
2025-11-22 17:23:03 +01:00
kolaente d46afda42b fix(components): add type annotations in commands.ts
- Import Editor and Range types from @tiptap/core
- Add CommandProps interface for command callback
- Add type annotations for command callback parameters
2025-11-22 17:23:03 +01:00
kolaente 3a52a86980 fix(components): add undefined checks in TipTap.vue
- Add null check for DataTransferItem from items array
- Add undefined checks for check.children[1] before accessing
- Extract secondChild variable for safer access
2025-11-22 17:23:03 +01:00
kolaente 0987e382e4 fix(components): add type annotations for event parameters in TipTap.vue
- Add Event type for triggerImageInput and addImage
- Add MouseEvent type for setLink and clickTasklistCheckbox
- Add KeyboardEvent type for setFocusToEditor
- Add type assertions for event.target as HTMLElement
2025-11-22 17:23:03 +01:00
kolaente bff5ed6403 fix(components): use correct SetContentOptions in TipTap.vue
- Replace false with {emitUpdate: false} in setContent calls
- Fix 3 SetContentOptions type errors
2025-11-22 17:23:03 +01:00
kolaente eab1a211ae fix(components): fix clipboard data null checks in TipTap.vue
- Add proper null check for clipboardData.items before accessing length
- Replace for...of loop with indexed for loop to avoid iterator issue with DataTransferItemList
2025-11-22 17:23:03 +01:00
kolaente 278eae387c fix(components): add type guards and assertions in TipTap.vue
- Add HTMLImageElement instanceof check before accessing src property
- Add type assertions for getBlobUrl return value and cache access
2025-11-22 17:23:03 +01:00
kolaente 1275cb7fc5 fix(components): correct FontAwesome icon format in TipTap.vue
- Change icon format from ['fa', 'fa-bold'] to ['fas', 'bold']
- Fix 6 icon type errors by using correct IconPrefix and IconName format
2025-11-22 17:23:03 +01:00
kolaente ab8b93e9ab fix(components): suppress complex union type error in Button.vue
- Remove BaseButtonProps extension to avoid complex union type
- Use @ts-expect-error to suppress TS2590 error caused by IconProp
- Add computed properties for variant, shadow, and wrap with proper defaults
2025-11-22 17:23:03 +01:00
kolaente 59fedb6757 fix(components): add type guards and null checks in Multiselect
- Add null check for multiselectRoot before passing to closeWhenClickedOutside
- Add early return for null object in select function
- Add type guards for string vs object in setSelectedObject
- Add type guards for focus method in preSelect function
- Remove invalid length check on Element type
2025-11-22 17:23:03 +01:00
kolaente 81f85a3849 fix(components): add generic constraints and null checks in AutocompleteDropdown
- Add 'extends string' constraint to generic type T
- Add null check for model.value with nullish coalescing
- Add null check for scroller before accessing properties
- Add instanceof check for HTMLElement before accessing offsetTop
2025-11-22 17:23:03 +01:00
kolaente 4cd53c204d fix: add proper type definitions for CommandItem in CommandsList.vue 2025-11-22 17:23:03 +01:00
kolaente cc76b87b89 fix: use proper FontAwesome icon types in EditorToolbar.vue 2025-11-22 17:23:03 +01:00
kolaente 508f91a97b fix: initialize date ref with null instead of undefined in Datepicker.vue 2025-11-22 17:23:03 +01:00
kolaente 3742234540 fix: add comprehensive null/undefined checks in Reactions.vue 2025-11-22 17:23:03 +01:00
kolaente 575cf149b0 fix: add undefined checks and null coalescing in Datepicker.vue 2025-11-22 17:23:03 +01:00
kolaente 7543b3b5cd fix: types for Multiselect 2025-11-22 17:23:03 +01:00
kolaente db531ab1c4 fix: types for DatepickerInline 2025-11-22 17:23:03 +01:00
kolaente 3fadacbb76 fix: event type 2025-11-22 17:23:03 +01:00
kolaente 6831f3c347 fix: tycheck issues in Story 2025-11-22 17:23:03 +01:00
Weijie Zhao b3b420121d
fix(editor): prevent image insertion from triggering save (#1846)
Ensure inserting an image only updates editor content without firing implicit save or switching out of edit mode. This keeps user in edit flow and avoids unintended save events.
2025-11-21 15:22:46 +01:00
kolaente 067cc5674b
fix(filters): handle multiple projects correctly in parsing, fixing autocomplete
Resolves https://github.com/go-vikunja/vikunja/issues/1395
2025-11-16 15:53:40 +01:00
kolaente 675a550247
fix(filter): restore cursor position when making changes
Related https://github.com/go-vikunja/vikunja/issues/1395
2025-11-16 15:38:24 +01:00
Copilot 9990a1f60f
fix(date picker): hide "this weekend" option on Sunday after 9pm (#1813)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kolaente <13721712+kolaente@users.noreply.github.com>
2025-11-13 09:08:48 +00:00
kolaente 435d029f33
feat: show avatar for mentioned users 2025-11-10 11:25:47 +01:00
kolaente 0d83a568ce
chore: reorganize mention setup 2025-11-10 11:24:45 +01:00
Weijie Zhao 43a5ae1309
feat: enable user mentions in task description & comments (#1754) 2025-11-09 19:42:38 +01:00
kolaente 03f04f0787
fix(task): slash menu appearing behind modals (#1752)
The slash menu in the editor was appearing behind task detail modals
(z-index 4000) because it had a z-index of only 1000. This made the
menu inaccessible when editing task descriptions in Kanban view.

Updated the z-index to 4700 to place it above modals while keeping
it below system notifications (z-index 9999).

Fixes #1746
2025-11-05 10:29:19 +00:00
Weijie Zhao d7d3078de5
fix: prevent keyboard events during IME composition (#1535) 2025-10-06 18:17:52 +02:00
kolaente 0262ab7d9e
fix(editor): do not apply filter input styles to all editor instances 2025-08-31 21:34:29 +02:00
kolaente 9610ae780f
fix(multiselect): do not try getting label when value is undefined
Resolves https://github.com/go-vikunja/vikunja/issues/1346
2025-08-31 21:31:42 +02:00
Simone (Saxos) 4c9f112103
fix(filter): don't crash when filtering for labels in (#1333) 2025-08-31 14:35:16 +00:00
kolaente a3200f4149
feat(editor): add message to list of allowed link protocols (#1284)
Resolves #1282
2025-08-13 09:35:17 +00:00
kolaente 60c76f7f9b chore(filter): move FilterInputDocs component 2025-08-11 17:22:48 +02:00
kolaente 2c25e60761 feat(filter): automatically focus filter input when opening filter popup
Resolves https://github.com/go-vikunja/vikunja/issues/552
2025-08-11 17:22:48 +02:00
kolaente fd177c7480 fix(filter): don't treat word value in filter value as operator 2025-08-11 17:22:48 +02:00
kolaente ee51706faf fix(filter): highlight multiple labels multiple times 2025-08-11 17:22:48 +02:00
kolaente 0fa437b8a2 fix(filter): don't treat ' ' as label value 2025-08-11 17:22:48 +02:00
kolaente b99b7bf131 feat(filter): rebuild filter input component 2025-08-11 17:22:48 +02:00
kolaente 63319e19ad fix: style issues 2025-08-06 10:55:23 +02:00
kolaente d5de5a4f0d
feat(deps): update tiptap to v3 (#1241) 2025-08-05 21:23:35 +02:00