Closed Bug 1673269 Opened 4 years ago Closed 3 years ago

Use more exact timestamps in screenshot filenames

Categories

(Firefox :: Screenshots, enhancement, P3)

Firefox 81
enhancement

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: david, Assigned: kajalsah107)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

Using the screenshot tool multiple times on the same page and using the "Download" button to save them to the disk.

Actual results:

The save file dialog appears with a default file name in the pattern of "Screenshot_{year}-{month}-{day} {title of page}".

I do some web development so I'm often taking multiple screenshots of the same page after I enable/disable some feature to create before/after images, but the screenshot tool's default file name will generate the same file name each time if they're taken less than 24 hours apart.

The formatting is also wildly inconsistent with underscores, dashes, and spaces.

Expected results:

  • Use milliseconds in the time stamp, whether that's in a YYYY-MM-DD-HH-MM-MS or YYYY-MM-DD-MS format. Something to realistically give each screenshot a different file name.
  • Use underscores instead of spaces and dashes everywhere in the filename, including in the page title
Component: Untriaged → Screenshots

Thanks for suggesting this!

For consistency with devtools (https://searchfox.org/mozilla-central/rev/f982032c7c7618c626165bb557968f478a1952dc/devtools/shared/locales/en-US/screenshot.properties#84-88), I think we should keep the spaces but introduce minutes and seconds into the timestamp.

So the new file name should be "Screenshot {year}-{month}-{day} at {minute}-{second} {title of page}".

Severity: -- → S4
Priority: -- → P3
Summary: Remove spaces from screenshot filenames and use more exact timestampts → Use more exact timestamps in screenshot filenames

Taking this up as an initial contribution for Outreachy 2021. I will ask if there are any doubts.

Assignee: nobody → kajalsah107
Pushed by emalysz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/12436fa7a836
Use more exact timestamps in screenshot. r=emalysz
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: