Reminder display improvement in markdown editor#246
Draft
Conversation
…ter extension - Add editor-reminder-display scaffolding with CM6 StateField, Decoration building, and PillWidget stub - Inject CSS for pill styling and enable feature flag for Live Preview - Provide recompute effect and selection preservation heuristics - Wire extension into UI by registering in editor initialization
Introduce ReminderSpan type carrying columnStart/columnEnd. Refactor formats to return ReminderSpan[] and implement computeSpan(). Update Content.getReminders to map spans to Reminder for consumers. Adjust editor reminder pills and tests to use ReminderSpan-based parsing.
…sedown/touchstart and recomputing on selection change Prevent the editor from moving the caret when interacting with the pill by: - Adding mousedown handler with preventDefault/stopPropagation - Adding touchstart handler (non-passive) with preventDefault/stopPropagation for mobile Also trigger pill decoration recomputation when the selection changes to avoid stale suppression state. Minor: update TODO comment to reflect selection updates.
…nts and remove legacy file - Delete monolithic src/plugin/ui/editor-reminder-display.ts - Add modular CM6 components under src/plugin/ui/editor-reminder-display/: - index.ts for exports - pill-widget.ts for widget rendering and activation - spans.ts for span derivation helpers - styles.ts for idempotent CSS injection - state-effects.ts for recompute effect - types.ts for shared types - Improves maintainability and separation of concerns without changing behavior
…ensive checks and error handling - Add guards and error handling in editor reminder pill extension to avoid crashes and invalid ranges - Ensure RangeSetBuilder additions are ordered and validated - Safeguard DOM interactions and event handling within PillWidget - Improve selection preservation and document update flow - Make span derivation resilient to malformed positions and missing data - Inject styles defensively to handle non-DOM environments These changes improve stability of Live Preview decorations and user interactions without altering behavior.
…mplify property access in editor reminder display
…initial-time parsing
…y casts and optional chaining, with no functional changes
…rations across changes, and deferring recomputation
…and fix minute formatting - Pass initialTime through modal and DateTime chooser to preselect current reminder time - Use configured reminderTimeStep when opening chooser from editor pill - Correct Moment.js minute token from HH:MM to HH:mm in ReminderListByDate - Minor focus handling cleanup for editor reminder display
…e CSS injection - Replace imperative DOM-based pill widget with ReminderPill.svelte - Wire Svelte component into CodeMirror WidgetType and clean up on destroy - Remove ensureReminderPillStylesInjected and styles.ts; co-locate styles in Svelte - Improve activation handling via custom event and native click fallback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO
showDateTimeChooserModal()arguments (maybe we can omitstep)