TheOdinProject / theodinproject

Main Website for The Odin Project
http://www.theodinproject.com
MIT License
3.55k stars 2.06k forks source link

Feature: Add link to lesson commit history #4570

Closed MaoShizhong closed 2 weeks ago

MaoShizhong commented 2 weeks ago

Because

It would be good to see when a lesson was last updated and go directly to the lesson's commit history to see the changelog, directly from the lesson page itself. This should help alleviate some confusion when something in the lesson changes when someone is midway through - they'll now be able to see that it was changed and find out what the change was, without having to go to GitHub of their own accord and navigate through the files to find out.

This PR

Issue

Closes #XXXXX

Additional Information

image

Pull Request Requirements

MaoShizhong commented 2 weeks ago

For QA

  1. Navigate to any lesson or project page
  2. Scroll to the bottom where "Improve on GitHub" and "Report an Issue" links are
  3. Observe a new link indicating "Last updated ... (see changelog)".
  4. Clicking this link should navigate to the lesson file's commit history on GitHub, and the latest commit's date should match the time_ago_in_words given in the link.
KevinMulhern commented 2 weeks ago

This should help alleviate some confusion when something in the lesson changes when someone is midway through

Great stuff @MaoShizhong! love the problem description 🤌. I've seen this catch learners out time and time again and think this is a great solution for it.

Would this lose much of its usefulness if we dropped the date and just had "Change log"? Theres a couple of reasons why I think the date could potentially cause us problems:

If you think including the date is absolutely necessary, thats good enough for me. But it's worth considering if its more trouble than its worth.

MaoShizhong commented 2 weeks ago

@KevinMulhern Thanks for the further insights! Just having a changelog link without the date would still be a good 80:20. My original justification for including the date was to help more with the problem highlighted about changes when mid-lesson. As in, someone could very easily just see that the lesson was last edited at X datetime, without having to navigate to another page (which they may be unfamiliar with) just to find out when something happened (no issues with needing someone to do that to find out the contents of those changes though).

But given what you said about things that could affect the date shown, I think it makes sense that we go with just the changelog link for now. If we feel adding the date in is really vital, we can look into a more accurate way of doing so, like with the last_commit_date idea of yours.

KevinMulhern commented 2 weeks ago

Thanks @MaoShizhong, I can definitely see where you're coming from. Going with the simplest version for now and enhancing with the date if needed later sounds very reasonable.