gitea/web_src/js
Giteabot 22911a1ece
Imrove scroll behavior to hash issuecomment(scroll position, auto expand if file is folded, and on refreshing) (#23513) (#23540)
Backport #23513 by @HesterG

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

Co-authored-by: Hester Gong <hestergong@gmail.com>
2023-03-17 22:59:18 -04:00
..
components Replace Less with CSS (#23508) 2023-03-16 21:04:39 -04:00
features Imrove scroll behavior to hash issuecomment(scroll position, auto expand if file is folded, and on refreshing) (#23513) (#23540) 2023-03-17 22:59:18 -04:00
markup update to mermaid v10 (#23178) (#23299) 2023-03-05 02:13:50 -05:00
modules Make time tooltips interactive (#23526) (#23527) 2023-03-16 16:23:11 -05:00
standalone Add new JS linter rules (#17699) 2021-11-22 16:19:01 +08:00
test Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 2023-02-06 12:09:18 -06:00
utils Fix the show/hide methods for string selector (#23042) 2023-02-21 11:09:03 -06:00
webcomponents Introduce customized HTML elements, fix incorrect AppUrl usages in templates (#22861) 2023-02-17 22:02:20 +08:00
bootstrap.js Quick fixes monaco-editor error: "vs.editor.nullLanguage" (#21734) 2022-11-09 18:02:19 +08:00
index.js Improve AppUrl/ROOT_URL checking (#22836) 2023-02-09 11:14:45 -05:00
jquery.js Upgrade jQuery to 3.5.0, remove jQuery-Migrate, fix deprecations (#11055) 2020-04-18 18:46:29 -04:00
serviceworker.js Fix serviceworker output file and misc improvements (#11562) 2020-05-24 08:36:40 +01:00
svg.js Fix adding of empty class name (#23352) (#23360) 2023-03-07 17:15:19 -05:00
svg.test.js Remove vitest globals (#21505) 2022-10-19 14:50:19 +08:00
utils.js Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
utils.test.js Fix links for the menus in the view file page (#22795) 2023-02-08 00:08:44 +08:00