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

Update mockup diff visualization #90

Merged
merged 20 commits into from
Jun 27, 2019
Merged

Update mockup diff visualization #90

merged 20 commits into from
Jun 27, 2019

Conversation

conorsexton
Copy link
Member

This PR updates the visualization of mockup data in the Destination panel (#59)

Instead of a <textarea> element, we’re leveraging the React Diff Viewer library.

Now, ResponseComponent cards hide the modified data by default. Users can click “Show diff” to view a GitHub style diff of any changes.

Known issues

  • Clicking a line number will throw an error: onLineNumberClick is not a function since we haven’t defined a function to process line clicks
  • Large diffs don’t automatically collapse like with GitHub. This is a limitation of the library itself, but it still seemed like a good solution based on how straightforward it was to implement. Given more time, we could consider switching to a more feature-rich library like react-diff-view

@conorsexton conorsexton merged commit 2270159 into dev Jun 27, 2019
@conorsexton conorsexton deleted the touchup-diff-viz branch June 27, 2019 12:59
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

Successfully merging this pull request may close these issues.

3 participants