Skip to content

Alternative approach for comments-time-machine-links #2618

Closed

Description

@fregante

The timemachine link is useful but I never click it unless I really need that version, and most of the time I don't know this until I click the main link.

I suggest dropping the icon (closes #2131) and, instead, waiting for the user to click the link.

On the resulting page:

  • if the linked file still exists, add the timemachine permalink near branch-buttons:
    linked
  • if the linked file is gone, add the timemachine link somewhere on the 404 page

This also makes it easier to enable #1953 because we don't have to query each link on the page before adding the link: we just query the current page.


For this to be possible, instead of adding an icon to these links, we should add a ?linked-time=${timestamp} parameter so this information is available on the linked page.

Test

Activity

  1. sindresorhus commented on Dec 12, 2019

    @sindresorhus
    Member

    Sounds good 👍

  2. fregante commented on Feb 28, 2020

    @fregante
    MemberAuthor

    Here's something easy to add in both cases (existing file or 404 page) and easy to understand:

    Example code:

    <div id="js-flash-container">
      <div class="flash flash-full flash-notice">
    	  <div class="container-lg px-2">
    	    <button class="flash-close js-flash-close" type="button" aria-label="Dismiss this message">{xIcon()}</button>
    		You can also <a href="">view this file as it appeared at the time of the comment</a> (4 days ago)
    		</div>
    	</div>
    </div>
  3. added
    small
    and removed on Feb 28, 2020
  4. self-assigned this
    on May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

acceptedchange requestsmall

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions