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

Visual Namespace Diffs (in Share) #3368

Open
Tracked by #3338
ChrisPenner opened this issue Aug 26, 2022 · 3 comments
Open
Tracked by #3338

Visual Namespace Diffs (in Share) #3368

ChrisPenner opened this issue Aug 26, 2022 · 3 comments
Assignees

Comments

@ChrisPenner
Copy link
Contributor

ChrisPenner commented Aug 26, 2022

I think it wouldn’t be too hard to build an online PR viewer that just showed the diff between two namespaces; even without the ability to leave comments or w/e it would be better than the current process haha.
UCM could just build a link like
share.unison-lang.org/diff?src=@chrispenner/prs.base.thing&dest=@unison/base.main

Once we have the bones of it , should be easy to integrate that work into any PR or projects workflow we add in the future.

@hojberg
Copy link
Member

hojberg commented Aug 26, 2022

This is gonna be fun to jam on!

@ChrisPenner
Copy link
Contributor Author

Yup definitely!

After a chat with @cody about it we realized it might not be quite as simple as I'd expected TBH;

there are many different types of changes users might care about, and we'll want to treat them differently, maybe with options to expand into more detail on some of them, e.g.

  • We probably don't want to show a diff for changes that were auto-propagated, these sorts of changes wouldn't show up in a git diff anyways since the 'names' in a traditional source file wouldn't have changed.
  • In cases where names did change it would probably be nice to allow hovering or clicking it to see the source of the new thing (and maybe the old thing)?

Maybe we want to have a collapsible definition browser alongside the diff view so users can keep whatever context they like alongside as they read through the diff?

Arya has requested a 3-way-diff if possible, which makes sense for merges, (though might not be part of the MVP); it'd be cool to be able to toggle between LCA <-> Left, LCA <-> Right, Left <-> Right and Left <-> LCA <-> Right, but getting all of that info crammed into a single UI is going to be tough!

@ChrisPenner
Copy link
Contributor Author

I think for a first approach maybe we show a summary of all the namespace changes at the top, then provide simple line-level definition diffs over the terms as they appear pretty printed within the scope of their respective branches for all the adds and updates below?

Changes which came from a propagate would probably just show in the summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants