Change widgets on Homepage to Monthly
complete
Amrayu78
We have several widgets that are always the same. I'd like to change the data collected to show monthly, so things can change and look more fresh.
Please see attached screenshots.
Most Viewed This Month
Most Thanked This Month
Most Downloaded Subtitles This Month
Most Requested Subtitles This Month
Amrayu78
complete
Amrayu78
Max Romanchenko task for you when you get the chance. Thanks!
Max Romanchenko
Amrayu78
That’s a great suggestion! At this stage, we can implement monthly tracking only for the “Most Downloaded Subtitles” widget, since it's the only one with time-based data currently available (currently, the downloads data is stored at the attachment level, so I need to test the effectiveness of such queries.). For the others, we’d first need to start storing monthly stats - I can begin setting that up if you approve, but the changes wouldn’t be visible until next month.
So, in order to query data, we need to start storing it somehow :)
Additionally, I recommend enhancing the widgets by displaying data in two tabs: “This Month” and “All Time.” It would make the interface more dynamic and informative for users. Please let me know your thoughts.
Max Romanchenko
Amrayu78 Okay, I've thought about it and I think the most effective method for us is this:
To display statistics for the current month, I will add a separate meta field (*_monthly) for each section - for example, do_monthly_downloads, do_monthly_views, etc. The statistics are updated when the user performs actions (viewing, downloading, thanking, etc.). At the beginning of each month, the meta fields are automatically reset via a cron job to start collecting data again.
This approach:
- is effective - all statistics are cached, no heavy calculations are required;
- allows us to easily sort by monthly metrics on the main and archive pages (in the future);
- limited to the current month – it doesn’t support querying arbitrary historical periods, but delivers optimal performance and simplicity.
Please let me know if you agree with this solution (as well as what you think about the tabs) or if you have your own vision.
Thank you!
Amrayu78
Max Romanchenko are we able to save these monthly stats from now on like the hall of fame for oshi leaderboards? It’ll be nice to have an archive of these stats to view later to look for trends.
I’m okay with this approach. Thanks
Max Romanchenko
Amrayu78 Interesting idea! Yes, that's possible. It would be something like a separate page in the admin panel where you can view stats, right?
Amrayu78
Max Romanchenko both in admin panel and publicly on some stats archive page. Is weekly too much? I’m just thinking of ways to make the content more dynamic.
Max Romanchenko
Amrayu78 It could be weekly, but I'm not sure how it would look on a separate statistics page. It's easy to say when it comes to months - it could be dropdown stats for July, August. But what about weeks... This adds a certain level of complexity, but it's still possible.
Please let me know which option you prefer.
I think we can work on the statistics page in parallel. Perhaps we could create an additional ticket for this? That way we'll have a better idea of how to use it in different places (widgets on Homepage and stats page).
Amrayu78
Max Romanchenko I’ll create another ticket for the stats archive then. I’ll think of a way to mock it up. For now, we’ll focus on the monthly part for the widgets on the homepage.
Max Romanchenko
Amrayu78 Ok, thanks!
Just to confirm: monthly or weekly widget updates on the homepage?
Which is better for you?
Amrayu78
Max Romanchenko let’s go with weekly to keep the homepage fresh.
Max Romanchenko
Amrayu78
Got it.
What about the idea of displaying data in tabs?
- tab Current Week
- tab All Time
Max Romanchenko
And one more question. Which day should be considered the beginning of the week, Sunday or Monday?
Amrayu78
Max Romanchenko yes tabs is a good idea
Amrayu78
Max Romanchenko Sunday
Max Romanchenko
Amrayu78 Got it, thanks.
Max Romanchenko
Amrayu78 I am happy to announce that changes to four widgets are now visible on the homepage. Please check it.
Amrayu78
Max Romanchenko looks great! Just some minor style changes.
Can we remove the borders and create tabs like Oshi Shrines Timeline Entries?
Screenshots attached.
Max Romanchenko
Amrayu78 Great! I agree with you. I made buttons similar to those on the timeline, but... I felt that it didn't look harmonious (see screenshot).
Then I experimented a little and came up with the current version, dark gray buttons. I think this version is better. It looks more like tabs, and the dark gray color of the tabs does not visually conflict with the buttons below (see screenshot).
Please check it out and let me know what you think.
Max Romanchenko
Amrayu78 By the way, while surfing the site, I noticed a bug (when the timeline contains many years) LOL.
I used a slider to filter by year. It looks fine to me. I hope you like it too.
Amrayu78
Max Romanchenko good idea! I like this. can we make the padding a little less?
Amrayu78
Max Romanchenko looks good!
Amrayu78
Max Romanchenko or maybe something more subtle like what twitter uses for tabs.
Current selected pane has a line underneath.
On hover, the tabs have a background color.
Max Romanchenko
Amrayu78 Done, I reduced the padding as you showed at the screenshot. Please check it.
Max Romanchenko
Amrayu78 Please check, I changed the look of the tabs.
Amrayu78
Max Romanchenko thanks! It looks great. Can we change the blue to red though? I don’t think we have blue anywhere on the site. Thanks!
Max Romanchenko
Amrayu78
Exactly, you're right! I got too carried away with the Twitter style :)
It's red now, please check.
Amrayu78
Max Romanchenko Looks good! We can close this out.