fix(ui/mde): inputs in table/link insertion modals #11341

Merged
Gusted merged 12 commits from 0ko/initDisabledInputs into forgejo 2026-03-02 23:32:42 +01:00 AGit
Owner

Fixes #11268
Fixes regression of #9614

Calling initDisabledInputs wasn't effective for template contents, so inputs in MDEs spawned by repo-legacy.js on comment editing were broken. Now repo-legacy.js also calls it when it spawns a new MDE.

Co-authored-by: Gusted Gusted@noreply.codeberg.org

Release notes

  • User Interface bug fixes
    • PR: fix(ui/mde): inputs in table/link insertion modals
Fixes #11268 Fixes regression of #9614 Calling `initDisabledInputs` wasn't effective for template contents, so inputs in MDEs spawned by repo-legacy.js on comment editing were broken. Now repo-legacy.js also calls it when it spawns a new MDE. Co-authored-by: Gusted <Gusted@noreply.codeberg.org> <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - User Interface bug fixes - [PR](https://codeberg.org/forgejo/forgejo/pulls/11341): <!--number 11341 --><!--line 0 --><!--description Zml4KHVpL21kZSk6IGlucHV0cyBpbiB0YWJsZS9saW5rIGluc2VydGlvbiBtb2RhbHM=-->fix(ui/mde): inputs in table/link insertion modals<!--description--> <!--end release-notes-assistant-->
for licensing clarification: file was created in forgejo in 221ca0c404
also update link test
Some checks failed
testing / semgrep/ci (pull_request) Successful in 12s
testing / frontend-checks (pull_request) Failing after 23s
testing / backend-checks (pull_request) Successful in 2m16s
testing / test-unit (pull_request) Has been skipped
testing / test-mysql (pull_request) Has been skipped
testing / test-e2e (pull_request) Has been skipped
testing / test-pgsql (pull_request) Has been skipped
testing / test-sqlite (pull_request) Has been skipped
testing / test-remote-cacher (redict) (pull_request) Has been skipped
testing / test-remote-cacher (redis) (pull_request) Has been skipped
testing / test-remote-cacher (garnet) (pull_request) Has been skipped
testing / test-remote-cacher (valkey) (pull_request) Has been skipped
testing / security-check (pull_request) Has been skipped
issue-labels / cascade (pull_request_target) Has been skipped
issue-labels / backporting (pull_request_target) Has been skipped
requirements / merge-conditions (pull_request) Successful in 1s
issue-labels / release-notes (pull_request_target) Successful in 39s
de43daa4c5
Where does that come from? The following is a preview of the release notes for this pull request, as they will appear in the upcoming release. They are derived from the content of the `release-notes/11341.md` file, if it exists, or the title of the pull request. They were also added at the bottom of the description of this pull request for easier reference.

This message and the release notes originate from a call to the release-notes-assistant.

@@ -4,3 +4,11 @@
 Calling `initDisabledInputs` wasn't effective for template contents, so inputs in MDEs spawned by repo-legacy.js on comment editing were broken. Now repo-legacy.js also calls it when it spawns a new MDE.
 
-Co-authored-by: Gusted <Gusted@noreply.codeberg.org>
\ No newline at end of file
+Co-authored-by: Gusted <Gusted@noreply.codeberg.org>
+
+<!--start release-notes-assistant-->
+
+## Release notes
+<!--URL:https://codeberg.org/forgejo/forgejo-->
+- User Interface bug fixes
+  - [PR](https://codeberg.org/forgejo/forgejo/pulls/11341): <!--number 11341 --><!--line 0 --><!--description Zml4KHVpL21kZSk6IGlucHV0cyBpbiB0YWJsZS9saW5rIGluc2VydGlvbiBtb2RhbHM=-->fix(ui/mde): inputs in table/link insertion modals<!--description-->
+<!--end release-notes-assistant-->

Release notes

  • User Interface bug fixes
    • PR: fix(ui/mde): inputs in table/link insertion modals
<details> <summary>Where does that come from?</summary> The following is a preview of the release notes for this pull request, as they will appear in the upcoming release. They are derived from the content of the `release-notes/11341.md` file, if it exists, or the title of the pull request. They were also added at the bottom of the description of this pull request for easier reference. This message and the release notes originate from a call to the [release-notes-assistant](https://code.forgejo.org/forgejo/release-notes-assistant). ```diff @@ -4,3 +4,11 @@ Calling `initDisabledInputs` wasn't effective for template contents, so inputs in MDEs spawned by repo-legacy.js on comment editing were broken. Now repo-legacy.js also calls it when it spawns a new MDE. -Co-authored-by: Gusted <Gusted@noreply.codeberg.org> \ No newline at end of file +Co-authored-by: Gusted <Gusted@noreply.codeberg.org> + +<!--start release-notes-assistant--> + +## Release notes +<!--URL:https://codeberg.org/forgejo/forgejo--> +- User Interface bug fixes + - [PR](https://codeberg.org/forgejo/forgejo/pulls/11341): <!--number 11341 --><!--line 0 --><!--description Zml4KHVpL21kZSk6IGlucHV0cyBpbiB0YWJsZS9saW5rIGluc2VydGlvbiBtb2RhbHM=-->fix(ui/mde): inputs in table/link insertion modals<!--description--> +<!--end release-notes-assistant--> ``` </details> <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - User Interface bug fixes - [PR](https://codeberg.org/forgejo/forgejo/pulls/11341): <!--number 11341 --><!--line 0 --><!--description Zml4KHVpL21kZSk6IGlucHV0cyBpbiB0YWJsZS9saW5rIGluc2VydGlvbiBtb2RhbHM=-->fix(ui/mde): inputs in table/link insertion modals<!--description--> <!--end release-notes-assistant-->
lint
Some checks failed
requirements / merge-conditions (pull_request) Successful in 3s
testing / semgrep/ci (pull_request) Successful in 16s
issue-labels / release-notes (pull_request_target) Successful in 51s
testing / frontend-checks (pull_request) Successful in 57s
testing / backend-checks (pull_request) Successful in 2m27s
testing / test-unit (pull_request) Successful in 5m55s
testing / test-remote-cacher (valkey) (pull_request) Successful in 2m0s
testing / test-remote-cacher (garnet) (pull_request) Successful in 2m2s
testing / test-remote-cacher (redis) (pull_request) Successful in 2m3s
testing / test-remote-cacher (redict) (pull_request) Successful in 2m2s
testing / test-mysql (pull_request) Successful in 22m32s
testing / test-sqlite (pull_request) Successful in 30m31s
testing / test-pgsql (pull_request) Successful in 34m22s
testing / security-check (pull_request) Successful in 55s
testing / test-e2e (pull_request) Failing after 12m1s
436ce162c7
@ -353,0 +388,4 @@
await expect(textarea).toHaveValue(expectedContent);
await screenshot(page);
return true;
Owner

Hm, is this retry resistant? If so maybe removing this and instead make the call to this function .toPass()?

Hm, is this retry resistant? If so maybe removing this and instead make the call to this function `.toPass()`?
Author
Owner

The test itself doesn't modify any information (no submissions, no POSTs). If retries are getting a new empty page and doing page.goto the test should be retry resistant.

Will look into .toPass().

The test itself doesn't modify any information (no submissions, no POSTs). If retries are getting a new empty page and doing `page.goto` the test should be retry resistant. Will look into `.toPass()`.
Author
Owner

Done, and I went off the rails a little to also apply this on switch e2e tests where i first introduced the weird return true way

Done, and I went off the rails a little to also apply this on switch e2e tests where i first introduced the weird `return true` way
Gusted marked this conversation as resolved
i just had to wait for 180 seconds for faulty tests to finish because i use ui and couldn't ifnd the abort button
also apply really fancy parallelism to evaluateSwitchItem
Some checks failed
requirements / merge-conditions (pull_request) Successful in 4s
testing / semgrep/ci (pull_request) Successful in 12s
issue-labels / release-notes (pull_request_target) Successful in 28s
testing / frontend-checks (pull_request) Successful in 1m7s
testing / backend-checks (pull_request) Successful in 2m59s
testing / test-unit (pull_request) Successful in 5m50s
testing / test-remote-cacher (redis) (pull_request) Successful in 1m57s
testing / test-remote-cacher (redict) (pull_request) Successful in 1m54s
testing / test-e2e (pull_request) Has been cancelled
testing / test-remote-cacher (valkey) (pull_request) Has been cancelled
testing / test-remote-cacher (garnet) (pull_request) Has been cancelled
testing / test-pgsql (pull_request) Has been cancelled
testing / test-mysql (pull_request) Has been cancelled
testing / test-sqlite (pull_request) Has been cancelled
testing / security-check (pull_request) Has been cancelled
da1695e1cb
it didn't change the timings for me but if i add  await page.waitForTimeout(5000); to the end of evaluateSwitchItem it does, so it works
this test also has retry resistance via
// Reset issue status before running the test
if (await statusButton.getByText('Reopen').isVisible()) await statusButton.click();
as i was there i checked git history of this file to help with reuse in the future
Some checks failed
requirements / merge-conditions (pull_request) Successful in 2s
testing / semgrep/ci (pull_request) Successful in 13s
issue-labels / release-notes (pull_request_target) Successful in 30s
testing / frontend-checks (pull_request) Successful in 1m5s
testing / backend-checks (pull_request) Successful in 3m15s
testing / test-unit (pull_request) Successful in 6m27s
testing / test-remote-cacher (redis) (pull_request) Successful in 2m13s
testing / test-remote-cacher (valkey) (pull_request) Successful in 2m14s
testing / test-remote-cacher (garnet) (pull_request) Successful in 2m11s
testing / test-remote-cacher (redict) (pull_request) Successful in 2m8s
testing / test-e2e (pull_request) Successful in 26m24s
testing / test-mysql (pull_request) Successful in 26m59s
testing / test-sqlite (pull_request) Successful in 34m4s
testing / test-pgsql (pull_request) Successful in 38m19s
testing / security-check (pull_request) Successful in 1m6s
milestone / set (pull_request_target) Successful in 30s
issue-labels / backporting (pull_request_target) Failing after 1m0s
e09aa939fd
Gusted approved these changes 2026-03-02 23:32:23 +01:00
Gusted left a comment
Owner

Thank you!

Thank you!
Gusted merged commit a0faae2764 into forgejo 2026-03-02 23:32:42 +01:00

The backport to v14.0/forgejo failed. Check the latest run for more details.

The backport to `v14.0/forgejo` failed. Check the latest run for more details.
Sign in to join this conversation.
No reviewers
No labels
arch
riscv64
backport/v1.19
backport/v1.20
backport/v1.21/forgejo
backport/v10.0/forgejo
backport/v11.0/forgejo
backport/v12.0/forgejo
backport/v13.0/forgejo
backport/v14.0/forgejo
backport/v7.0/forgejo
backport/v8.0/forgejo
backport/v9.0/forgejo
breaking
bug
bug
confirmed
bug
duplicate
bug
needs-more-info
bug
new-report
bug
reported-upstream
code/actions
code/api
code/auth
code/auth/faidp
code/auth/farp
code/email
code/federation
code/git
code/migrations
code/packages
code/wiki
database
MySQL
database
PostgreSQL
database
SQLite
dependency-upgrade
dependency
certmagic
dependency
chart.js
dependency
Chi
dependency
Chroma
dependency
citation.js
dependency
codespell
dependency
css-loader
dependency
devcontainers
dependency
dropzone
dependency
editorconfig-checker
dependency
elasticsearch
dependency
enmime
dependency
F3
dependency
ForgeFed
dependency
garage
dependency
Git
dependency
git-backporting
dependency
Gitea
dependency
gitignore
dependency
go-ap
dependency
go-enry
dependency
go-gitlab
dependency
Go-org
dependency
go-rpmutils
dependency
go-sql-driver mysql
dependency
go-swagger
dependency
go-version
dependency
go-webauthn
dependency
gocron
dependency
Golang
dependency
goldmark
dependency
goquery
dependency
Goth
dependency
grpc-go
dependency
happy-dom
dependency
Helm
dependency
image-spec
dependency
jsonschema
dependency
KaTeX
dependency
lint
dependency
MariaDB
dependency
Mermaid
dependency
minio-go
dependency
misspell
dependency
Monaco
dependency
PDFobject
dependency
playwright
dependency
postcss
dependency
postcss-plugins
dependency
pprof
dependency
prometheus client_golang
dependency
protobuf
dependency
relative-time-element
dependency
renovate
dependency
reply
dependency
ssh
dependency
swagger-ui
dependency
tailwind
dependency
temporal-polyfill
dependency
terminal-to-html
dependency
tests-only
dependency
text-expander-element
dependency
urfave
dependency
vfsgen
dependency
vite
dependency
Woodpecker CI
dependency
x tools
dependency
XORM
Discussion
duplicate
enhancement/feature
forgejo/accessibility
forgejo/branding
forgejo/ci
forgejo/commit-graph
forgejo/documentation
forgejo/furnace cleanup
forgejo/i18n
forgejo/interop
forgejo/moderation
forgejo/privacy
forgejo/release
forgejo/scaling
forgejo/security
forgejo/ui
Gain
High
Gain
Nice to have
Gain
Undefined
Gain
Very High
good first issue
i18n/backport-stable
impact
large
impact
medium
impact
small
impact
unknown
Incompatible license
issue
closed
issue
do-not-exist-yet
issue
open
manual test
Manually tested during feature freeze
OS
FreeBSD
OS
Linux
OS
macOS
OS
Windows
problem
QA
regression
release blocker
Release Cycle
Feature Freeze
release-blocker
v7.0
release-blocker
v7.0.1
release-blocker
v7.0.2
release-blocker
v7.0.3
release-blocker
v7.0.4
release-blocker
v8.0.0
release-blocker/v9.0.0
run-all-playwright-tests
run-end-to-end-tests
test
manual
test
needed
test
needs-help
test
not-needed
test
present
untested
User research - time-tracker
valuable code
worth a release-note
User research - Accessibility
User research - Blocked
User research - Community
User research - Config (instance)
User research - Errors
User research - Filters
User research - Future backlog
User research - Git workflow
User research - Labels
User research - Moderation
User research - Needs input
User research - Notifications/Dashboard
User research - Rendering
User research - Repo creation
User research - Repo units
User research - Security
User research - Settings (in-app)
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/forgejo!11341
No description provided.