You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TimelineItem command callback values are now useless for "foreign" extensions #177319
This PR #169621 stopped providing TimelineItem instances in the callback of commands on items. GitLens was reliant on that to provide additional features on GitTimelineItems, e.g. Open Commit on Remote.
I was trying to see if there was a way to still provide this GL feature, but now the only thing returned in the callback is a Uri to the file -- not a git: url with the sha or any other context.
Can the Uri that is returned be a qualified git: scheme Uri with the SHA embedded, or better yet some additional context object that would provide more details on the timeline item itself (so this wouldn't be specific for just Git based timeline entries)?
Reacted by Victor Lin, Earlopain, Peter Strömberg, Paul Cernek, Hiroki Shimamoto, Julian Alarcon, mladendinev, Tom Rees-Herdman, Delgan, Sylvain Roy and 7 more
The reason for this change is we don't have other places that we expose extension objects to other extensions. This seemed like an oversight rather than a feature. I think the proposed fix would probably come from some sort of API with the built-in git extension not the API. An extension should opt-in to have its objects modified
While I understand that you'd like to avoid giving out "live" objects, that doesn't have to impede providing the data/information from those objects. With the #169621 change, extensions can no longer get any meaningful information about a timeline item.
There doesn't need to be a new API or anything. You can either provide a plain object with some relevant metadata about the timeline item itself (e.g. its public properties?) OR at a VERY least provide a Uri that actually provides context for the actual timeline item selected.
Also the idea of not providing live objects in callbacks is actually provided elsewhere -- TreeViewItem callbacks provide the TreeItem itself. Which is exactly what the Timeline was modeled on.
some relevant metadata about the timeline item itself (e.g. its public properties?)
Yeah, that is the plan. Give 3rd party extensions a clone that is the public API and give the origin extension its instance (with extra props etc). Tho, for the timeline we can only do that once it is finalised.
Activity
lramos15 commentedon Mar 16, 2023
The reason for this change is we don't have other places that we expose extension objects to other extensions. This seemed like an oversight rather than a feature. I think the proposed fix would probably come from some sort of API with the built-in git extension not the API. An extension should opt-in to have its objects modified
eamodio commentedon Mar 25, 2023
While I understand that you'd like to avoid giving out "live" objects, that doesn't have to impede providing the data/information from those objects. With the #169621 change, extensions can no longer get any meaningful information about a timeline item.
There doesn't need to be a new API or anything. You can either provide a plain object with some relevant metadata about the timeline item itself (e.g. its public properties?) OR at a VERY least provide a
Urithat actually provides context for the actual timeline item selected.Also the idea of not providing live objects in callbacks is actually provided elsewhere --
TreeViewItemcallbacks provide theTreeItemitself. Which is exactly what the Timeline was modeled on.jrieken commentedon Mar 28, 2023
Yeah, that is the plan. Give 3rd party extensions a clone that is the public API and give the origin extension its instance (with extra props etc). Tho, for the timeline we can only do that once it is finalised.
Removes timeline command as it cannot be supported