sindresorhus/refined-github

Add automated comment draft save #1598

krasi-georgiev posted onGitHub

would you consider adding the auto save for comments?

For example:

  1. start writing a comment
  2. close the tab or the browser.
  3. Open the same issue and the comment draft is there.

This is not a terrible idea, but the comments cache needs to be limited (to 10 comments or so)

Edit: now we have proper cache with expiration, so no need to limit it by count.

posted by bfred-it about 6 years ago

How about Add automated issue's title and content draft save?

Sometimes, I wrote a long-term issue, just ready to submit

If you accidentally click the close tab, the content will be lost.

Even if I reply to the tag with CTRL+T, the content will not be restored.

This is frustrating.

posted by axetroy almost 6 years ago

Idea:

  1. Every 10 seconds, save all the visible comment areas' contents into an array, eg. cache.set(`comment-backup:${location.pathname}`, ['comment 1', 'comment 2'], 1 / 2)
  2. When any page loads, check the cache, display a closable fixed element in a corner, that opens a dropdown that lets you copy each item

This lets us easily save multiple comment fields (e.g. reviews) without having to mess with their UI (e.g. reopening a new review comment for the same exact line; possibly overwriting GitHub's more recent version, etc)

<img width="804" alt="drop" src="https://user-images.githubusercontent.com/1402241/76712539-2ffad600-671a-11ea-8c5f-ecfaaa7a4459.png">

UI could be better, better yet if "forget all" is replaced by an X outside

<img width="195" alt="Screen Shot 2020-03-16 at 00 11 54" src="https://user-images.githubusercontent.com/1402241/76712614-c6c79280-671a-11ea-98b2-d10439d32b44.png">

Code mostly copied from https://primer.style/css/components/dropdown#alignment

posted by fregante about 5 years ago

This can be a global extension as it's not limited to GitHub. If you write such an extension or know one, please leave a comment

posted by fregante over 4 years ago

Fund this Issue

$0.00
Funded

Pull requests