-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Blame UI improvements #44287
Blame UI improvements #44287
Conversation
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits 8e8c772 and ef9aa16 or learn more. Open explanation
|
103016e
to
53e3fb4
Compare
53e3fb4
to
40a0c6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhchabran Do we have a list of changes needed before we roll out the git streaming more broadly? Adding support for the user query would be necessary as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@philipp-spiess catching up with GH as I'm back from PTO. It seems that the new code handles this differently, is this comment still relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhchabran Yeah this is still required. With the GraphQL query it's possible to load the user
from a git author but with our streaming endpoint this is not included yet. Do you think it would be a lot of work to add this to the JSON payloads?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhchabran @mrnugget I’m unsure about the authz.DefaultSubRepoPermsChecker
field here. Do you have any advice on what I should be doing? 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I verified that the other code path to resolve commits use the same thing:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. cc @sourcegraph/iam
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. cc @sourcegraph/iam
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// We can not access the light theme from the view props beacuse we need | |
// We can not access the light theme from the view props because we need |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! These are huge improvements!
@taras-yemets Yeah I wrote about this in the PR test plan. I don't want to invest too much into the old view given that Code Mirror is going to be the default with the same release as this change anyway. Does this make sense? |
@philipp-spiess, I somehow missed it, sorry. |
@taras-yemets No worries! What are your thought? I assume that maybe a few users could be left on the old view until we remove the code in the following release. For them the experience would be subpar but also not horribly broken. And they can always enable CodeMirror to fix it and get a lot of other improvements like faster rendering |
CodeMirror blob is enabled by default on dotcom and s2 instances and would likely be the default in the upcoming release. With that said, I think we can even not ship recency and hunks separators for the table code view (unless it adds too much code overhead in reused |
I fixed the line height at least, that way it doesn't feel broken anymore
Not sure I understand (the GIF is very small 😢) but yeah the hover area feels weirder now. Let's do this as a follow-up though? |
Screen.Recording.2022-12-21.at.18.24.33.mov
Makes sense 👍🏻 |
@taras-yemets Much better! This is now with the legacy blob view: |
ae06a82
to
9369ef7
Compare
// The values are sampled from the following function: | ||
// y=0.005*1.7^x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally. It looks awesome!
Closes #44397
This improves the git blame view based on the design input from: https://www.figma.com/file/ecHi31BUCccGtjZsOrNR56/Git-blame-improvements?node-id=1816%3A3628
I made one substantial change from the final Figma: Instead of the zebra-striped background pattern, I decided to implement an earlier revision and use a border to visually distinguish blame hunks. The reason for this has to do with the streaming implementation of git blame that we're currently testing for some customers: In that implementation, chunks are loaded lazily and we do a first render pass with incomplete chunk data. Because of this, we don't know how many chunks appear above a rendered line and thus the zebra calculation is not possible (we don't know if we're on an even or odd chunk). IMO, changing to a border is the easiest way to fix this. We can always change this later though.
Test plan
I've tested this with the none-CodeMirror view as well. The UI for that is not awesome but it's a reasonable fallback. The next release enables code mirror by default anyways.:
Screenshot
App preview:
Check out the client app preview documentation to learn more.