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

Add preview for object, null and undefined #570

Merged
merged 1 commit into from Dec 15, 2017

Conversation

megazoll
Copy link
Contributor

No description provided.

@rmevans9
Copy link
Collaborator

I think I understand what this code is trying to solve but just to be sure can you add a screenshot to this PR showing the before/after of this change when previewing an object?

Copy link
Contributor

@skellock skellock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens in the case where an object has a giant string? Do we still clip that?

@megazoll
Copy link
Contributor Author

Added clipping strings and screenshots

    console.tron.log(undefined);
    console.tron.log(null);
    console.tron.log({});
    console.tron.log({
        a: undefined
    })
    console.tron.log({
        a: undefined,
        d: {
            c: 1
        }
    })
    console.tron.log({
        a:1,
        b:2,
        c:3,
        d:4,
        e:5,
        f:6,
        g:7,
        h:8
    });
    console.tron.log({
        text: 'qweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqweqwe',
        text2: ''
    });

Master:
2017-12-15_15-35-09

PR:
2017-12-15_15-53-00

@skellock
Copy link
Contributor

Perfect!

Copy link
Contributor

@skellock skellock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I didn’t know I had wanted this.

@skellock skellock merged commit 4fd2ecd into infinitered:master Dec 15, 2017
@rmevans9
Copy link
Collaborator

This is awesome. Thanks @megazoll!

@megazoll megazoll deleted the fix-log-command branch December 16, 2017 13:10
@henrikra
Copy link
Contributor

@skellock Can you make new release since this is nice feature!

@skellock skellock added this to the 1.14 milestone Dec 16, 2017
@skellock
Copy link
Contributor

Ok, 1.14 is out. brew is still approving/seed. Usually takes a few hours. You can grab the binary from the release if you need it now.

@henrikra
Copy link
Contributor

@megazoll Can you add preview for booleans too?
Now if I do console.tron.log(false); the preview is empty :/

joshuayoes pushed a commit that referenced this pull request Jan 17, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
joshuayoes pushed a commit that referenced this pull request Jan 27, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
joshuayoes pushed a commit that referenced this pull request Jan 30, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
joshuayoes pushed a commit that referenced this pull request Feb 1, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
silasjmatson pushed a commit that referenced this pull request Mar 14, 2023
Co-authored-by: Renovate Bot <bot@renovateapp.com>
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.

None yet

4 participants