Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add initial wiki page text when editing the page #23984

Merged
merged 2 commits into from
Apr 9, 2023

Conversation

wxiaoguang
Copy link
Contributor

The $content was prepared above, but forgot to put it into the editor ....

Fix #23979

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 7, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 7, 2023
@delvh delvh added type/bug topic/ui Change the appearance of the Gitea UI lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Apr 7, 2023
@delvh delvh added this to the 1.20.0 milestone Apr 7, 2023
@jolheiser jolheiser added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 7, 2023
@delvh delvh changed the title Fix wiki editor bug: the content is lost Re-add initial wiki page text when editing the page Apr 7, 2023
@wxiaoguang
Copy link
Contributor Author

This could be skip-changelog

@delvh delvh added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Apr 7, 2023
@delvh
Copy link
Member

delvh commented Apr 7, 2023

Agreed

@silverwind
Copy link
Member

silverwind commented Apr 8, 2023

Can we add TextareaPlaceholder here as well? I think every textarea should have one.

@wxiaoguang
Copy link
Contributor Author

Can we add TextareaPlaceholder here as well? I think every textarea should have one.

No need, there is always $content

See above

			{{$content := .content}}
			{{if not .PageIsWikiEdit}}
				{{$content = .locale.Tr "repo.wiki.welcome"}}
			{{end}}

@codecov-commenter
Copy link

Codecov Report

Merging #23984 (9a62bca) into main (f521e88) will decrease coverage by 47.15%.
The diff coverage is n/a.

❗ Current head 9a62bca differs from pull request most recent head b2820d9. Consider uploading reports for the commit b2820d9 to get more accurate results

@@             Coverage Diff             @@
##             main   #23984       +/-   ##
===========================================
- Coverage   47.14%        0   -47.15%     
===========================================
  Files        1149        0     -1149     
  Lines      151446        0   -151446     
===========================================
- Hits        71397        0    -71397     
+ Misses      71611        0    -71611     
+ Partials     8438        0     -8438     

see 1149 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lunny lunny merged commit 2f46838 into go-gitea:main Apr 9, 2023
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 9, 2023
@wxiaoguang wxiaoguang deleted the fix-wiki-editor-bug branch April 9, 2023 09:45
@silverwind
Copy link
Member

Can we add TextareaPlaceholder here as well? I think every textarea should have one.

No need, there is always $content

See above

			{{$content := .content}}
			{{if not .PageIsWikiEdit}}
				{{$content = .locale.Tr "repo.wiki.welcome"}}
			{{end}}

Unless it's being deleted 😉

zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 10, 2023
* upstream/main: (39 commits)
  Fix protected branch for API (go-gitea#24013)
  [skip ci] Updated translations via Crowdin
  Fix markdownlint (go-gitea#24024)
  Introduce lint-md and compliance-docs pipeline (go-gitea#24021)
  Fix https setup doc zh-cn (go-gitea#24015)
  Replace tribute with text-expander-element for textarea (go-gitea#23985)
  Improve GetBoards and getDefaultBoard (go-gitea#22981)
  Expand/Collapse all changed files (go-gitea#23639)
  Show errors for KaTeX and mermaid on the preview tab (go-gitea#24009)
  Show protected branch rule names again (go-gitea#23907)
  Reference the `zh-CN` version of `reverse-proxies` in `https-support` (go-gitea#24016)
  Fix lint problem in `https-support.zh-cn.md` (go-gitea#24014)
  docs: HTTPS configuration for zh-cn (go-gitea#23039)
  Re-add initial wiki page text when editing the page (go-gitea#23984)
  [skip ci] Updated translations via Crowdin
  fix: do not escape space between PyPI repository url and package name… (go-gitea#23981)
  Make bindata static build parse builtin templates correctly (go-gitea#24003)
  Group template helper functions, remove `Printf`, improve template error messages (go-gitea#23982)
  Adjust sticky pr header to cover background (go-gitea#23956)
  Update github.com/google/go-github to v51 (go-gitea#23946)
  ...
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebGUI Wiki Editor does not show Text of wiki page. Pressing save deletes all.
7 participants