Skip to content

fix commit view JS features, reimplement folding - #9968

Merged
zeripath merged 3 commits into
go-gitea:masterfrom
silverwind:fix-commit-page
Jan 26, 2020
Merged

zeripath merged 3 commits into
go-gitea:masterfrom
silverwind:fix-commit-page

Conversation

@silverwind

Copy link
Copy Markdown
Member

File content folding was not working so I reimplemented it in a saner way. Then I noticed the issue was actually because of missing JS libraries (seen on the console of every commit with error
'SimpleMDE is not defined') resulting in most JS on that page in not being executed.

Fixed the libraries. I think the reimplementation is worth to keep.

Example page with such an error: https://try.gitea.io/silverwind/symlink-test/commit/98701cd58e49972ff22203d217176f3ad27c235c

File content folding was not working so I reimplemented it in a saner
way. Then I noticed the issue was actually because of missing JS
libraries (seen on the console of every commit with error
'SimpleMDE is not defined').

Fixed the libraries. I think the reimplementation is worth to keep.
Comment thread web_src/js/index.js Resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 24, 2020
@zeripath

Copy link
Copy Markdown
Contributor

@silverwind you wouldn't be able to switch us to EasyMDE would you?

I think simplemde is a bit dead...

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 24, 2020
@silverwind

Copy link
Copy Markdown
Member Author

@silverwind you wouldn't be able to switch us to EasyMDE would you?

Not sure if I'm motivated, SimpleMDE code is major spaghetti.

@codecov-io

codecov-io commented Jan 24, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #9968 into master will increase coverage by 0.03%.
The diff coverage is 22.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9968      +/-   ##
==========================================
+ Coverage   42.24%   42.27%   +0.03%     
==========================================
  Files         610      610              
  Lines       80276    80372      +96     
==========================================
+ Hits        33909    33976      +67     
- Misses      42204    42218      +14     
- Partials     4163     4178      +15
Impacted Files Coverage Ξ”
models/list_options.go 57.89% <ΓΈ> (ΓΈ) ⬆️
services/pull/pull.go 34.06% <ΓΈ> (-2.06%) ⬇️
routers/org/members.go 0% <ΓΈ> (ΓΈ) ⬆️
services/repository/repository.go 52.94% <ΓΈ> (-3.31%) ⬇️
services/mailer/mailer.go 26.92% <ΓΈ> (ΓΈ) ⬆️
routers/repo/pull.go 29.06% <ΓΈ> (+0.39%) ⬆️
models/repo.go 50% <0%> (+0.3%) ⬆️
modules/util/sanitize.go 50% <100%> (+50%) ⬆️
modules/indexer/code/git.go 57.39% <13.04%> (-11.76%) ⬇️
modules/repofiles/update.go 39.52% <35.71%> (-0.84%) ⬇️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update 0af08e7...b61ee77. Read the comment docs.

@zeripath zeripath added the topic/ui Change the appearance of the Gitea UI label Jan 25, 2020
@zeripath zeripath added this to the 1.12.0 milestone Jan 25, 2020
@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 Jan 26, 2020
@zeripath
zeripath merged commit fd094ee into go-gitea:master Jan 26, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
@wxiaoguang
wxiaoguang deleted the fix-commit-page branch December 18, 2025 08:57
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. topic/ui Change the appearance of the Gitea UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants