-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
User action heatmap #5131
User action heatmap #5131
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5131 +/- ##
==========================================
+ Coverage 37.44% 37.48% +0.04%
==========================================
Files 308 309 +1
Lines 45718 45782 +64
==========================================
+ Hits 17119 17162 +43
- Misses 26141 26159 +18
- Partials 2458 2461 +3
Continue to review full report at Codecov.
|
I don't think we need special setting to enable/disable this |
I like the option of enable/disable as not everyone wants this and it
can cause load on the database.
On Sat, Oct 20, 2018, at 2:55 PM, Lauris BH wrote:
I don't think we need special setting to enable/disable this
— You are receiving this because you commented. Reply to this email
directly, view it on GitHub[1], or mute the thread[2].
|
@lafriks @techknowlogick I also thought this can make massive load on the database, which is why I implemented the setting. I also did some benchmarks and discovered the mariadb caching on this itself is already very good (After the query was executed a few times, it takes @lafriks As I already implemented it and set it to on by default, I don't think there's a need to remove the setting. If it still bothers someon, they can disable it. |
@kolaente Second one looks super, though that last green cell is bugging me a bit since it's skewed more on the right, after the end of the grey separation line on the bottom. Also, how does it behave on small screens such as phones? Oh, and thanks for your effort, by the way. You're our hero. |
@Jd342 not that good on small screens, as I said it doesn't really scale well.
I think that is a bug in the library we're using to display this... hmmmmm..... |
@kolaente Is it possible to display only the last month instead of the whole year for that case? I like your animosity in the last commit of that screenshot. You might want to get a coffee with some sugar, or some crackers. |
I don't think that library can do that.
That's nothing I wrote, its a git alias which gets a random commit message from http://whatthecommit.com/ - that way I dont need to do `git commit -am "now think of a commit message && git push" every time I test someting. I'm fine, don't worry. (I didn't even recognize the commit message until you pointed it out) |
Oh it seems like it can. I'll try it. |
Github disables the heatmap on mobile. That could be an option. |
It's probably just some missing margin/padding, since the same thing happens in the left with the names of the day.
Gotcha. Do consider the crackers, though. I want you to feel energetic and give your best in this PR. I like productive people, especially when they do work for me for free. |
I've just done that, seems to be the easiest solution. |
Bummer. It'd have been nice to see it on mobile as well. If it's an issue, I could help out on this - maybe by opening a PR myself after this one. |
That seems like a good idea, my current priority is to get the heatmap itself merged, we can think about such enhancments later. |
The heatmap is great. I noticed when I was creating a test on https://try.gitea.com that as a new user, the heatmap does not render until you have submitted the first commit. Until that happens, it is perpetually displaying the "heatmap.loading" icon. I was able to replicate on several local copies of Gitea as well. Prob should just show an empty heatmap? Should I submit a bug or is this comment good enough? |
This pr adds heatmaps to user's profile, just like the ones on github or gitlab. It takes every action from the
action
table to build the grid, this means things like issue comments are also included, not only code commits. The fetching is done via a new api endpoint.I also added a config option to globally disable this.
With some tests, it does not seem like this is something which draws a lot performance (takes ~0.005 sec on a prod gitea server), so I see no reason to implement extra caching.
@markuman I saw your example and tried to re-use some things frontend wise, but unfortualy, the code is minified, so I couldn't use it. Feel free to comment if you have some ideas on how to improve the frontend code, js is not my strength.
Closes #6 and #4918
Screenshot