Skip to content

history panel: add user setting to show absolute timestamps

Warren Gifford requested to merge mrn/history-absolute-timestamps into main

Created by: mrnugget

This fixes #31712 (closed) by adding the history.preferAbsoluteTimestamps user setting that determines whether the history panel shows relative (default) or absolute timestamps. If it's true it will show absolute timestamps but relative timestamp will be shown in tooltip (which is the flipped behaviour).

While this can be used to switch to absolute timestamps in all displays of git commits, I only do that in the history panel because I didn't want to query the user settings everywhere.

Screenshot

screenshot_2022-02-25_12 05 34@2x

Test plan

  • Tested locally by viewing history panel and toggling user setting history.preferAbsoluteTimestamps on/off
  • Added a toggle to existing story and ran yarn run storybook to test that the knob does the expected thing.

Merge request reports

Loading