Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for a timeline (file history) view #89262

Merged
merged 10 commits into from
Jan 27, 2020
Merged

Conversation

eamodio
Copy link
Contributor

@eamodio eamodio commented Jan 25, 2020

This PR fixes #84297

This is just the initial pass at a Timeline view with a registered TimelineProvider in the Git extension to provide Git history for the active file.

To enable this view, set "timeline.showView": true

@eamodio eamodio self-assigned this Jan 25, 2020
@eamodio eamodio added this to the January 2020 milestone Jan 25, 2020
src/vs/workbench/api/browser/mainThreadTimeline.ts Outdated Show resolved Hide resolved
}
}

function* map<T, TMapped>(source: Iterable<T> | IterableIterator<T>, mapper: (item: T) => TMapped): Iterable<TMapped> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even tho this is workbench-only we don't use "modern" JS because the editor still supports IE11. This should be flagged as TS compile error, no clue why not 🤷‍♂

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also mean to Iterable and such, basically no globals that IE11 doesn't support (and that cannot be poly-filled)

Copy link
Member

@joaomoreno joaomoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is dayjs localized across all languages we support? We probably should be rolling our own library here, just for the localization support.

extensions/git/package.json Outdated Show resolved Hide resolved
authorEmail?: string | undefined;
authorDate?: Date;
authorName?: string;
authorEmail?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I'll wait for this to come in before merging #89005.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The merge probably wouldn't go very well, since I changed the parsing from how it was. But I can easily add commitDate in if we want.

extensions/git/src/git.ts Show resolved Hide resolved
src/vs/workbench/api/browser/mainThreadTimeline.ts Outdated Show resolved Hide resolved
Need to revisit how we will handle long running providers
@eamodio
Copy link
Contributor Author

eamodio commented Jan 27, 2020

@joaomoreno RE: day.js -- I don't know if they have all the languages we support. I started implementing this myself using the Intl.RelativeTimeFormat but I gave up because I wanted to make sure this landed and didn't want that to be the hold up. I can revisit going down that path, but even using Intl.RelativeTimeFormat we'd be beholden to the localized strings supported there.

@eamodio eamodio merged commit 6c61920 into master Jan 27, 2020
@eamodio eamodio deleted the eamodio/timeline branch January 27, 2020 20:28
@eamodio eamodio added the timeline Timeline view issues label Jan 28, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
timeline Timeline view issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API support for Timeline view
3 participants