Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Different result of getItemString and stringifyAndShrink depending on isWideLayout #51

Merged
merged 4 commits into from Nov 19, 2016

Conversation

zalmoxisus
Copy link
Collaborator

This PR implements the following:

@alexkuz
Copy link
Owner

alexkuz commented Nov 18, 2016

My suggestions:

  • Add text-overflow: ellipsis for preview in react-json-tree
  • Leave at least 1 item in narrow layout (I think it will fit most of the times)

@zalmoxisus
Copy link
Collaborator Author

zalmoxisus commented Nov 18, 2016

Sure text-overflow: ellipsis would do the trick, but we want truncation in middle. Not sure we want to see unterminated objects/arrays ({ key: ...).

1 item not always feats the narrow layout as well due to a long key (see pendingItemsLenderMarches). If it is not in the root the problem is even worse.

@alexkuz
Copy link
Owner

alexkuz commented Nov 18, 2016

Sure, but as a last resort it's fine, I think, it's just a preview.

As for '1 item' - true, I just looked at real-life example, it would overflow quite often actually, especially in nested trees. Let's leave it 'zero'-sized then.

@alexkuz alexkuz merged commit 780116c into alexkuz:master Nov 19, 2016
@zalmoxisus zalmoxisus deleted the wide branch January 10, 2017 15:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

State view word wrapping makes state harder to read Overly-aggressive string formatting in Diff output
2 participants