Skip to content

Add settings UI to code editor#33434

Closed
silverwind wants to merge 12 commits into
go-gitea:mainfrom
silverwind:tabs
Closed

Add settings UI to code editor#33434
silverwind wants to merge 12 commits into
go-gitea:mainfrom
silverwind:tabs

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Jan 29, 2025

Related to: #9071
Fixes: #34377

Adds editing controls to the top of the file editor so users can change them on the fly. The defaults come from editorconfig, and the values are not persisted, so they only live on the current page.

TODOS:

  • check if we need this for the git hook and git patch editors
  • set default options in the template when there is no editorconfig
  • make sure it does not crash in the template rendering there.

edit

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 29, 2025
@silverwind silverwind added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jan 29, 2025
@silverwind silverwind changed the title Add editor settings UI to code editor Add settings UI to code editor Jan 29, 2025
@lunny lunny added this to the 1.24.0 milestone Jan 29, 2025
This reverts commit 1e1175a.
@silverwind silverwind marked this pull request as draft January 29, 2025 20:39
@wxiaoguang wxiaoguang removed this from the 1.24.0 milestone Apr 13, 2025
Comment thread routers/web/repo/editor.go Outdated
Comment thread routers/web/repo/editor.go Outdated
Comment thread routers/web/repo/editor.go Outdated
ecBytes, _ := json.Marshal(ecDef)
ctx.Data["EditorconfigJson"] = string(ecBytes)
ctx.Data["EditorconfigIndentStyle"] = ecDef.IndentStyle
ctx.Data["EditorconfigIndentSize"] = ecDef.IndentSize
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: add nil check for ecDef

* origin/main: (1246 commits)
  fix(packages/container): data race when uploading container blobs concurrently (go-gitea#36524)
  [skip ci] Updated translations via Crowdin
  Remove and forbid `@ts-expect-error` (go-gitea#36513)
  Add resolve/unresolve review comment API endpoints (go-gitea#36441)
  Fix incorrect vendored detections (go-gitea#36508)
  Bump alpine to 3.23, add platforms to `docker-dryrun` (go-gitea#36379)
  Unify repo names in system notices (go-gitea#36491)
  Allow scroll propagation outside code editor (go-gitea#36502)
  Refactor ActionsTaskID (go-gitea#36503)
  Update JS deps, remove `knip`, misc tweaks (go-gitea#36499)
  [skip ci] Updated translations via Crowdin
  Fix editorconfig not respected in PR Conversation view (go-gitea#36492)
  Add FOLDER_ICON_THEME configuration option (go-gitea#36496)
  Don't create self-references in merged PRs (go-gitea#36490)
  Use reserved .test TLD for unit tests (go-gitea#36498)
  Fix bug when list pull request commits (go-gitea#36485)
  Update some go dependencies (go-gitea#36489)
  chore: add comments for "api/healthz", clean up test env (go-gitea#36481)
  [SECURITY] Toolchain Update to Go 1.25.6 (go-gitea#36480)
  [skip ci] Updated translations via Crowdin
  ...

# Conflicts:
#	modules/templates/helper.go
#	options/locale/locale_en-US.ini
#	routers/web/repo/cherry_pick.go
#	routers/web/repo/editor.go
#	routers/web/repo/patch.go
#	templates/repo/editor/edit.tmpl
#	web_src/js/features/codeeditor.ts
@silverwind
Copy link
Copy Markdown
Member Author

Continued in #36534.

@silverwind silverwind closed this Feb 4, 2026
@silverwind silverwind deleted the tabs branch March 26, 2026 18:51
@go-gitea go-gitea locked as resolved and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code Editor: Allow enabling line wrap

5 participants