0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-01 07:51:58 +01:00
gitea/web_src/js
Hester Gong 8120c0c20c
Imrove scroll behavior to hash issuecomment(scroll position, auto expand if file is folded, and on refreshing) (#23513)
Close #23466

Right now on pull request "files Changed" tab, if a file is viewed, when
the comments' links are visited, the comment will not be shown as the
file is folded after viewed. This PR is to improve the behavior, to make
the comment seen even the related file is folded, like on github.

And right now scroll position will be remembered and hence it won’t
scroll to hashed comment after refreshing, this PR also adjust the
scroll position remembering behavior: When there is hash comment in url,
do not remember the scroll position.

Before:

https://user-images.githubusercontent.com/17645053/225512079-6cf79581-9346-44cf-95d6-06919642e6a8.mov

After:

https://user-images.githubusercontent.com/17645053/225523753-3f6728f2-977b-4ed0-a65c-63dcef2ace80.mov

Update - long comment's behavior after using `scrollTop ` (Comment div
scroll to the position which is 30px below the diff header, or 30px
below top on conversation tab):

https://user-images.githubusercontent.com/17645053/225614460-0602c1a6-229c-41f4-84d2-334e78251486.mov
2023-03-17 18:24:18 +08:00
..
components Remove stars in dashboard repo list (#23530) 2023-03-17 00:43:58 -04:00
features Imrove scroll behavior to hash issuecomment(scroll position, auto expand if file is folded, and on refreshing) (#23513) 2023-03-17 18:24:18 +08:00
markup update to mermaid v10 (#23178) 2023-03-04 00:39:07 -05:00
modules Fix aria.js bugs: incorrect role element problem, mobile focus problem, tippy problem (#23450) 2023-03-17 11:08:05 +08:00
standalone
test
utils Refactor branch/tag selector to Vue SFC (#23421) 2023-03-14 17:51:20 +08:00
webcomponents Add document for webcomponents (#23261) 2023-03-03 17:45:19 +08:00
bootstrap.js
index.js Refactor dashboard repo list to Vue SFC (#23405) 2023-03-14 12:09:06 +08:00
jquery.js
serviceworker.js
svg.js Refactor branch/tag selector to Vue SFC (#23421) 2023-03-14 17:51:20 +08:00
svg.test.js
utils.js
utils.test.js