Added Time Travel Functionality#55
Conversation
ctrlaltvikas
left a comment
There was a problem hiding this comment.
On line 48 in docs/index.html, the text can be modified.
|
The CSS could be different in the previous commits so it doesn't really make sense to show just the HTML content. |
|
Added functionality to keep going down the commit trail until a change was made to index.html. |
|
@sangeeth96 Agree with you. Have made a start on fixing that. If anyone wants to join me on this you're welcome. |
|
Thanks @vikaskyadav , I've updated the text to make it cleaner. If someone would like to find an icon and place it perhaps at the bottom right of the screen that could work too. |
|
I love this! :D |
|
This is incredible. I was hoping someone would attempt this! If you can think of a more durable way to implement, I'd love to merge. Right now the interaction is a bit confusing and I don't have a lot of confidence in the approach to loading the content. The file handling is too fragile, for example. We could add a build script to create a static directory for each commit under |
|
This is awesome! Something like a slide UI to travel thru time would be amazing. |
|
@dvdsgl Agree with your suggestions. I've added a build functionality which downloads the html and css files for every change to index.html and stores them in docs/history. We could eliminate all Github API calls completely but that would require some sort of static site generator functionality, a build step for index.html, which I'm not sure we want to include into this project. Going back in time now displays the name of the commit maker and their commit message. More changes still to go, currently, the page keeps getting larger as you 'go back in time'. Also the theme button stops working. Whether the styles getting applied is also unclear. If anyone would like to join in and perhaps make a sidebar with the commits or replace the current page (with the correct CSS applied) rather than adding to the page I think it would work quite well. |
|
@georgewritescode Love the idea, I'll give the sidebar a shot |
|
Why not a single directory per commit and keep the historical filenames? Then use an iframe to display the contents of each commit directory. |
|
@georgewritescode @dvdsgl That's what I'm doing as well, except that I'm pulling PRs instead of commits, since that seems to be a bit more meaningful. |
|
That's fantastic. I wonder if a bar across the bottom could be a better design? The design is centered horizontally so it would be less disruptive to the composition. Also, we need a way to toggle time travel view–maybe an icon in a corner? |
|
For the sidebar, I think If we do horizontal, it's possible that the page inside the iframe won't be displayed in full (have to scroll to see full page). Since the website is already well optimized for small width, I think it works well with a vertical sidebar. I would love to revisit & give horizontal a try though. Corner icon probably works — I'm thinking bottom right fixed, what do you folks think? |
|
Maybe a toggle inline with the theme switcher, so we begin to develop a localized control strip. |
|
Sounds great. I'll make a new PR after fixing up some stuff so we can talk more about implementation. |
|
@d4rekanguok Great job! This looks fantastic. I love the idea of using Pull Requests rather than commits too. I've merged your PR and given you collaborative access to the repo. Let's make this a reality! |
|
Is |
|
Also, how should people discover this? Perhaps we can change the |
|
@georgewritescode thanks George!! I saw the invite. @dvdsgl Ah sorry my PR was meant to be a work in progress, I haven't updated the build script & readme yet, will update in a sec. For discovery, perhaps we can rework the |
|
If we decide to merge this, this is a list of stuff I think would be good to have before then:
Tried to put in a few commits before the getting back to work. Have a good week folks! |
|
I'm eager to merge once conflicts are resolved! |
|
@dvdsgl I've just cleaned it up! |
|
Brilliant work, everyone! |
|
Oh shit I didn’t realize ignoring a conflict while rebasing will just take out that commit altogether, so George’s commits are not in the history. Will do it again from a local branch, sorry @georgewrstescode !! Oh shit it’s merged. I’m so sorry +___+ |
|
Oops! Please just prepare another branch with the fix and I will force-push over master real quick. |
|
Guys, this is probably the coolest thing I've ever seen happen on GitHub. |
|
Or, if there is a way to do this without a rewrite, that would be ideal. |
|
Awesome! It’ll be hard for me to work on this now but I’ll try to work in a rebase in a few hours |
|
I know this is old, but I found this just now so... THIS IS SO NICE! Open Source <3 |

This commits adds a 'Time Travel Back' link at the bottom of the page.
It looks at the past commits and gets the index.html at that time and inserts it at the bottom of the page.
It's pretty cool to keep scrolling down and see how the change has changed over time. It keeps going down the commit trail until a change to index.html was made in the commit.
Could have a few improvements but perhaps something we can build upon?