forgejo/web_src/js
Şahin Akkaya e9be8b25ae
Implement contributors graph (#27882)
Continuation of https://github.com/go-gitea/gitea/pull/25439. Fixes #847

Before:
<img width="1296" alt="image"
src="https://github.com/go-gitea/gitea/assets/32161460/24571ac8-b254-43c9-b178-97340f0dc8a9">

----
After:
<img width="1296" alt="image"
src="https://github.com/go-gitea/gitea/assets/32161460/c60b2459-9d10-4d42-8d83-d5ef0f45bf94">

---
#### Overview
This is the implementation of a requested feature: Contributors graph
(#847)

It makes Activity page a multi-tab page and adds a new tab called
Contributors. Contributors tab shows the contribution graphs over time
since the repository existed. It also shows per user contribution graphs
for top 100 contributors. Top 100 is calculated based on the selected
contribution type (commits, additions or deletions).

---
#### Demo
(The demo is a bit old but still a good example to show off the main
features)

<video src="https://github.com/go-gitea/gitea/assets/32161460/9f68103f-8145-4cc2-94bc-5546daae7014" controls width="320" height="240">
  <a href="https://github.com/go-gitea/gitea/assets/32161460/9f68103f-8145-4cc2-94bc-5546daae7014">Download</a>
</video>

#### Features:

- Select contribution type (commits, additions or deletions)
- See overall and per user contribution graphs for the selected
contribution type
- Zoom and pan on graphs to see them in detail
- See top 100 contributors based on the selected contribution type and
selected time range
- Go directly to users' profile by clicking their name if they are
registered gitea users
- Cache the results so that when the same repository is visited again
fetching data will be faster

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: hiifong <i@hiif.ong>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: yp05327 <576951401@qq.com>
(cherry picked from commit 21331be30cb8f6c2d8b9dd99f1061623900632b9)
2024-02-17 23:24:31 +01:00
..
components Implement contributors graph (#27882) 2024-02-17 23:24:31 +01:00
features Implement contributors graph (#27882) 2024-02-17 23:24:31 +01:00
markup Remove jQuery from the comment task list (#29170) 2024-02-17 23:24:30 +01:00
modules [gitea] Avoid showing unnecessary JS errors when there are elements with different origin on the page (#29081) 2024-02-10 10:53:43 +01:00
render Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
standalone [API] Forgejo API /api/forgejo/v1 2024-02-05 14:44:32 +01:00
utils Implement contributors graph (#27882) 2024-02-17 23:24:31 +01:00
vendor Vendor jquery.are-you-sure with strict mode fixes (#26901) 2023-09-06 00:02:44 +00:00
webcomponents [gitea] Fix gitea-origin-url with default ports (#29085) 2024-02-10 10:53:43 +01:00
bootstrap.js Avoid duplicate JS error messages on UI (#28873) 2024-01-21 14:23:08 +00:00
bootstrap.test.js Avoid duplicate JS error messages on UI (#28873) 2024-01-21 14:23:08 +00:00
htmx.js Introduce htmx and use it to avoid full page load on Subscribe and Follow (#28908) 2024-01-30 15:45:54 +01:00
index.js Implement contributors graph (#27882) 2024-02-17 23:24:31 +01:00
jquery.js Upgrade jQuery to 3.5.0, remove jQuery-Migrate, fix deprecations (#11055) 2020-04-18 18:46:29 -04:00
svg.js Show whether a PR is WIP inside popups (#28975) 2024-02-04 22:37:45 +00:00
svg.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
utils.js Replace ajax with fetch, improve image diff (#27267) 2023-10-11 12:34:21 +00:00
utils.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
vitest.setup.js [gitea] Move vitest setup file to root (#29097) 2024-02-10 10:53:43 +01:00