Skip to content
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

Added a chart to the Habits History, and misc improvements. #62

Merged
merged 2 commits into from Dec 4, 2022

Conversation

BlakeTNC
Copy link
Contributor

@BlakeTNC BlakeTNC commented Nov 29, 2022

Added a new Habit History Chart.

  • The Habit History chart style is similar to the Dailies History chart.
  • The Habit History chart shows the Net number of Plus and Minus clicks for each habit, on each date.
  • The Habit History chart includes a "Days Since Active" value for each habit.
  • The Habit History and Dailies History charts now have indicators to show the start of each week.
  • The previous view for Habit History is still available. It was renamed to "Habit Details", and is located lower on the same page.
  • An explanation section was added to the Habit History page. It covers both the Habit History chart and the Habit Details.

Made improvements to the Dailies History chart.

  • The Dailies History chart shows the latest one month (31 days) of data.
  • The Dailies History chart will not have any missing date columns.
  • The Dailies History chart always includes "Today".
  • Like all chart dates, today is specific to the user's local time zone.
  • The Dailies explanation section was updated for the changes.

# Added a new Habit History Chart.
- The Habit History chart style is similar to the Dailies History chart.
- The Habit History chart shows the Net number of Plus and Minus clicks for each habit, on each date.
- The Habit History chart includes a "Days Since Active" value for each habit.
- The Habit History and Dailies History charts now have indicators to show the start of each week.
- The previous view for Habit History is still available. It was renamed to "Habit Details", and is lower on the same page.
- An explanation section was added to the Habit History page.

# Changes to the Dailies History Chart
- The Dailies History chart shows the latest one month (31 days) of data.
- The Dailies History chart will not have any missing date columns.
- The Dailies History chart always includes "Today". 
- Like all chart dates, today is in the user's local time zone.
- The Dailies explanation section was updated as needed.
@Alys
Copy link
Owner

Alys commented Nov 29, 2022

This sounds cool! I'll look at it this weekend. Thank you!

Adjusted styling for the task title columns.
@Alys Alys merged commit de7df63 into Alys:develop Dec 4, 2022
@Alys
Copy link
Owner

Alys commented Dec 4, 2022

So, I've merged it and put it onto the oldgods site, but my trackpad stopped working this weekend so I can't actually click on any links in the DDT's table of contents. I can use regular links with my keyboard but it turns out those javascript links - no. They are not anywhere near as accessible as they should be - I blame me. :)

So anyway, I can't properly test your PR yet, so I haven't made the new code live yet. It is however here on a test version of the page, if you want to start using it right away: https://oldgods.net/habitica/habitrpg_user_data_display_new.html

I'll get back to this in a day or two if I can and review and test it properly. Thanks again for this!

@Alys
Copy link
Owner

Alys commented Dec 6, 2022

The new Habit History table is good! It's nice to have it in the same format as Dailies History. I'll keep the original version of Habit History (and call it Habit History List or something) in case there's people who will still prefer it.

I'm afraid I'll have to remove the changes to the Dailies History because there'll be people who'll want to see their full history. I've seen enough comments over the years to know that only 31 days won't be enough for some people. :)

I won't make this live till I've made those adjustments, but as you might have seen, I've given you a contributor tier for this already (yesterday I think).

You might have seen in the Aspiring Socialites guild that Habitica's staff have fired the entire moderation team, including me. This means that I no longer have the access needed to give any further contributor tiers for changes to the Data Display Tool. You're still very welcome to submit PRs if you wish and I'll continue to review and accept them whenever possible, but if you wanted credit towards further Comrade tiers, you would need to ask Habitica's staff for that. Please be aware that I cannot guarantee that the staff would say yes. They gave me permission long ago to give Comrade tiers to people who helped with this tool, but I don't know if they will continue to do that themselves.

@BlakeTNC
Copy link
Contributor Author

BlakeTNC commented Dec 6, 2022

There'll be people who'll want to see their full history.

Here are some thoughts, and some options to keep all the functionality, old and new.

Thoughts:

  • The only functionality that I can think of in the old table format, that is not included in the new table format, is the skipped columns. (And of course the full history.) Unless I'm missing something.
  • It seems like a good assumption that if most people are generally doing "at least one" daily, well, daily, then the old functionality of skipping columns on certain dates might have little utility. (Might not save much table space.) But that is a judgement call. I don't know other peoples usage patterns.

Options using the new table only:

  • You could change the max days to show to any desired value. 60, 90, 180, 365 etc.
    (currently it is: var maxDaysToShow = 31;)
  • It would be easy enough to detect the date of the oldest found history entry, and ensure that the maxDaysToShow encompasses that date. Thus showing all available history but with no skipped columns.

Options using both tables:

  • If you see continuing value in both table formats, you could keep both tables, and show them both directly on the page with different names.
    (Recent History, Full History?)
  • You could keep both tables, and hide one of them by default behind one of your magic javascript expansion links.

@BlakeTNC
Copy link
Contributor Author

BlakeTNC commented Dec 6, 2022

PS, Another option:

  • Generate two copies of the new table format. One copy with recent history, limited to a month or something, and displayed by default. Another copy of the new table with full history to the last known date, hidden behind a javascript expansion link. (As opposed to the previously written option of keeping the old table format behind a javascript link.)

@Alys
Copy link
Owner

Alys commented Dec 20, 2022

Hey. I'm sorry about the delay with this. I'm going to finish it off and reply to your points here after Christmas day (definitely before the end of the year). This month has not been good for having free time I'm afraid.

Alys added a commit that referenced this pull request Dec 29, 2022
Alys added a commit that referenced this pull request Dec 29, 2022
Also renamed matching function from habitHistory to habitHistoryList.

This is to allow for a new graphical habit history section
from #62 by BlakeTNC.
Alys added a commit that referenced this pull request Dec 29, 2022
This is from #62 by BlakeTNC
except that I have changed the terminology from "chart" to "table"
because "chart" was already used by the Habit Trends section.

I still need to remove duplicated code that I've introduced by
splitting BlakeTNC's change into this new section and
a separate section for the original Habit History List.
@Alys
Copy link
Owner

Alys commented Dec 29, 2022

Your new Habit History feature is live now, although I've made a few changes, primarily:

  • It's in a separate section (called Habit History Table), with the original section renamed to Habit History List, so that people who want the list can see it without scrolling (that will be helpful for anyone with dozens of Habits).
  • I used the term "Table" instead of "Chart" (in the user-visible text and the code) because "Chart" was already used in the Habit Trends section.

See the commits from today for more details: https://github.com/Alys/tools-for-habitrpg/commits

Let me know if you see anything wrong or bad there!

@Alys
Copy link
Owner

Alys commented Dec 29, 2022

Regarding the Dailies History section, from your previous comment here:

The only functionality that I can think of in the old table format, that is not included in the new table format, is the skipped columns. (And of course the full history.)

Yes, that's correct, just those.

The distinction between entire days that were skipped (currently shown with skipped columns) and days when a Daily was not completed is important because it can affect the Dailies' values change. It may also be an important distinction from a user behaviour point of view (e.g., someone might want to see the difference between them using Habitica but not completing any Dailies that day as opposed to them just not using Habitica at all.

It would be possible to still show the days when you didn't use Habitica with some other symbol to distinguish those days than a hypen. If that were done, then a column for every day could be shown.

It seems like a good assumption that if most people are generally doing "at least one" daily, well, daily, then the old functionality of skipping columns on certain dates might have little utility. (Might not save much table space.) But that is a judgement call. I don't know other peoples usage patterns.

I'd guess that someone using Habitica primarily for work would regularly skip Habitica on weekends. People may also skip Habitica when they are away on holiday.

I'm not too concerned about saving table space because as you say the current method of leaving out columns probably doesn't save much. That's because I think that for power users, who would be most likely to use this tool, a large amount of skipped days would be less likely.

It would be easy enough to detect the date of the oldest found history entry, and ensure that the maxDaysToShow encompasses that date. Thus showing all available history but with no skipped columns.

I'd be in favour of that as long as the days that were skipped had a different marker than the hyphen.

If you'd like to make a new PR for the Dailies History section to do that, you'd be welcome to. (But please don't feel obliged to.)

If you'd like to make any other changes, a separate PR for each may be best. This would help me test and merge them separately.

Thanks again for your work on the DDT! I like your improvements!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants