Side-by-side code diff view UX #4185
Replies: 5 comments 1 reply
-
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary. Sorry, I don't know how to help with that. I did do a search though, and I managed to find these other Discussions that might be similar or related to your question. Give them a read to see if they answer your question. If they do, head back here and update this discussion and mark it as answered, pointing others to the related discussion:
|
Beta Was this translation helpful? Give feedback.
-
The Paste design system includes a <CodeEditorDiff
theme="vs-dark"
height="90vh"
language="typescript"
original={originalCode}
modified={modifiedCode}
/> For integrating this within a table, you can use the <DataGridCell>
<Text as="div" fontFamily="fontFamilyCode">
<Truncate title="Full code diff here">Truncated code diff</Truncate>
</Text>
</DataGridCell> This setup ensures that the table remains clean and readable, while still providing access to detailed code diffs when necessary [1][2]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
Hi Colleen, Thank you for reaching out! Could you please provide more details about how the interaction for displaying the side-by-side diff in the table is intended to work? Looking forward to your response! |
Beta Was this translation helpful? Give feedback.
-
The idea is that you would select a row in the table, and view the original state versus the new state. Happy to sign up for office hours and discuss more, but I think the original discussion started by Brandon a couple years ago sums it up. Segment is still using the Evergreen component for showing diffs in lieu of a Paste one. |
Beta Was this translation helpful? Give feedback.
-
Hi Colleen, Best, |
Beta Was this translation helpful? Give feedback.
-
Hi!
Wondering if we have a pattern for showing side-by-side code diff views accessible via a table?
Hightouch ex:
Audit table where it would be accessed from (maybe a truncated version could live in the columns...?)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions