Merged
Conversation
480ddf0 to
fe13e95
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the htmx dependency from the web frontend and migrates remaining dynamic behaviors to the in-house “fetch-action” framework, including editor preview/diff loading and related initialization.
Changes:
- Remove
htmximports/globals/config, related event handlers, and dependency entries. - Expand “fetch-action” capabilities (pseudo-selector command execution, loading indicator targeting, redirect behavior) and start unit test coverage.
- Replace htmx-driven editor diff/preview and some dynamic diff behaviors with fetch-action/explicit fetch calls; adjust templates and E2E selectors accordingly.
Reviewed changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| web_src/js/vitest.setup.ts | Removes htmx-related polyfill and switches setup to a simple globals import. |
| web_src/js/index.ts | Drops htmx error event listeners and related imports. |
| web_src/js/globals.ts | Removes global window.htmx wiring/config; keeps jQuery global. |
| web_src/js/globals.d.ts | Removes window.htmx type declaration. |
| web_src/js/features/repo-issue-sidebar-combolist.ts | Removes htmx.process calls after DOM replacements. |
| web_src/js/features/repo-editor.ts | Replaces htmx-driven diff/preview with explicit POST requests; adds diff tab support. |
| web_src/js/features/repo-diff.ts | Removes htmx.process calls and replaces “sleep for htmx” with fetch-action trigger. |
| web_src/js/features/notification.ts | Removes htmx.process after notification DOM replacement. |
| web_src/js/features/common-fetch-action.ts | Enhances fetch-action: indicator selection via pseudo-commands, exported trigger, stricter sync targeting, prod redirect optimization. |
| web_src/js/features/common-fetch-action.test.ts | Adds initial unit test coverage for pseudo-selector command execution. |
| web_src/css/repo.css | Removes repo editor menu min-height override. |
| vite.config.ts | Removes rolldown eval check override previously needed by htmx. |
| types.d.ts | Removes htmx ESM shim module declaration. |
| tests/e2e/codeeditor.test.ts | Narrows .editor-loading selector to the write tab to avoid new preview/diff loaders. |
| templates/repo/view_list.tmpl | Updates fetch-action loading indicator selector to match new “relative” indicator targeting. |
| templates/repo/editor/patch.tmpl | Adjusts editor menu classes to match updated layout expectations. |
| templates/repo/editor/edit.tmpl | Removes htmx attributes; adds data attributes required by new JS-driven preview/diff loading; adds preview/diff loading placeholders. |
| templates/repo/actions/workflow_dispatch_inputs.tmpl | Removes comments that referenced htmx limitations. |
| pnpm-lock.yaml | Removes htmx.org dependency entries. |
| package.json | Removes htmx.org dependency. |
| eslint.config.ts | Removes htmx import restriction and htmx global declaration. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Should be good enough. Not too many changes when diff with ignoring spaces https://github.com/go-gitea/gitea/pull/37224/changes?w=1 |
silverwind
reviewed
Apr 15, 2026
Signed-off-by: silverwind <me@silverwind.io>
silverwind
approved these changes
Apr 15, 2026
lunny
approved these changes
Apr 15, 2026
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Apr 17, 2026
* main: Replace `dropzone` with `@deltablot/dropzone` (go-gitea#37237) Add `ExternalIDClaim` option for OAuth2 OIDC auth source (go-gitea#37229) Remove error returns from crypto random helpers and callers (go-gitea#37240) Use Content-Security-Policy: script nonce (go-gitea#37232) Remove htmx (go-gitea#37224) Refactor "htmx" to "fetch action" (go-gitea#37208) Fix UI regression (go-gitea#37218) Fix corrupted JSON caused by goccy library (go-gitea#37214) Add test for "fetch redirect", add CSS value validation for external render (go-gitea#37207) Fix incorrect concurrency check (go-gitea#37205) refactor: simplify ParseCatFileTreeLine and catBatchParseTreeEntries (go-gitea#37210) Update go js py dependencies (go-gitea#37204)
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.
Close #35059
Slightly improved the "fetch action" framework and started adding tests for it.