Make task list checkboxes clickable in the preview tab#37010
Merged
silverwind merged 6 commits intogo-gitea:mainfrom Mar 29, 2026
Merged
Make task list checkboxes clickable in the preview tab#37010silverwind merged 6 commits intogo-gitea:mainfrom
silverwind merged 6 commits intogo-gitea:mainfrom
Conversation
Make task list checkboxes clickable in markdown preview mode and sync their state back to the editor textarea. Extract shared toggleTasklistCheckbox helper to deduplicate byte-offset logic. Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Enables interactive task list checkboxes in the ComboMarkdownEditor “Preview” tab and syncs checkbox toggles back into the underlying markdown source, reusing a shared byte-offset toggle helper.
Changes:
- Extracted a shared
toggleTasklistCheckboxhelper for byte-position-based[ ]/[x]toggling. - Updated existing comment-markup tasklist handling to use the shared helper.
- Enabled preview-pane tasklist checkboxes and wired them to update the editor content on toggle.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| web_src/js/markup/tasklist.ts | Adds shared checkbox-toggle helper and refactors existing comment markup handler to use it. |
| web_src/js/features/comp/ComboMarkdownEditor.ts | Enables checkboxes in markdown preview and syncs toggle back to editor content. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* origin/main: Fix relative-time RangeError (go-gitea#37021) Restyle Workflow Graph (go-gitea#36912) Update message severity colors, fix navbar double border (go-gitea#37019) Clean up checkbox cursor styles (go-gitea#37016) add missing cron tasks to example ini (go-gitea#37012) Add e2e tests for server push events (go-gitea#36879)
- Trigger triggerEditorContentChanged after checkbox toggle in preview - Clarify JSDoc for toggleTasklistCheckbox position parameter - Add unit tests for toggleTasklistCheckbox Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
lunny
approved these changes
Mar 28, 2026
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Mar 30, 2026
* main: (35 commits) Correct swagger annotations for enums, status codes, and notification state (go-gitea#37030) Update Nix flake (go-gitea#37024) Bump go and python versions in nix flake (go-gitea#37031) Make task list checkboxes clickable in the preview tab (go-gitea#37010) Add support for in_progress event in workflow_run webhook (go-gitea#36979) Fix various problems (go-gitea#37029) Update AI Contribution Policy (go-gitea#37022) Migrate from webpack to vite (go-gitea#37002) Upgrade yaml (go-gitea#37015) Fix issue label deletion with Actions tokens (go-gitea#37013) Hide delete branch or tag buttons in mirror or archived repositories. (go-gitea#37006) Update AGENTS.md with additional guidelines (go-gitea#37018) Optimize 'refreshAccesses' to perform update without removing then adding (go-gitea#35702) Fix relative-time RangeError (go-gitea#37021) Restyle Workflow Graph (go-gitea#36912) Update message severity colors, fix navbar double border (go-gitea#37019) Clean up checkbox cursor styles (go-gitea#37016) add missing cron tasks to example ini (go-gitea#37012) Add e2e tests for server push events (go-gitea#36879) Update JS dependencies (go-gitea#37001) ...
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Mar 30, 2026
* origin/main: (69 commits) Correct swagger annotations for enums, status codes, and notification state (go-gitea#37030) Update Nix flake (go-gitea#37024) Bump go and python versions in nix flake (go-gitea#37031) Make task list checkboxes clickable in the preview tab (go-gitea#37010) Add support for in_progress event in workflow_run webhook (go-gitea#36979) Fix various problems (go-gitea#37029) Update AI Contribution Policy (go-gitea#37022) Migrate from webpack to vite (go-gitea#37002) Upgrade yaml (go-gitea#37015) Fix issue label deletion with Actions tokens (go-gitea#37013) Hide delete branch or tag buttons in mirror or archived repositories. (go-gitea#37006) Update AGENTS.md with additional guidelines (go-gitea#37018) Optimize 'refreshAccesses' to perform update without removing then adding (go-gitea#35702) Fix relative-time RangeError (go-gitea#37021) Restyle Workflow Graph (go-gitea#36912) Update message severity colors, fix navbar double border (go-gitea#37019) Clean up checkbox cursor styles (go-gitea#37016) add missing cron tasks to example ini (go-gitea#37012) Add e2e tests for server push events (go-gitea#36879) Update JS dependencies (go-gitea#37001) ... # Conflicts: # package.json # pnpm-lock.yaml # tests/e2e/utils.ts # web_src/css/themes/theme-gitea-dark.css # web_src/css/themes/theme-gitea-light.css # web_src/js/bootstrap.ts # web_src/js/features/codeeditor.ts # web_src/js/modules/errors.test.ts # webpack.config.ts
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.
When a checkbox is toggled in the markup preview tab, the change is now synced back to the editor textarea. Extracted a
toggleTasklistCheckboxhelper to deduplicate the byte-offset toggle logic.