question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configurable raw object editor control

See original GitHub issue

Is your feature request related to a problem? Please describe Controls addon for objects displays json using react-editable-json-tree. It is set to not use raw editor by default. This causes a bit of a problem for automated cypress tests as it is easier to interact with simple textarea than with json tree component.

Describe the solution you’d like We would like to have configurable object editor through argTypes, something like: control: { type: 'object', useRaw: true }

Describe alternatives you’ve considered I didn’t found any alternative to this.

Are you able to assist to bring the feature to reality? maybe yes 😃

Additional context image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:5
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
leepowelldevcommented, Sep 18, 2021

I’m seeing raw mode when the default value is and empty object. Would be great to have this configurable.

1reaction
tripolskypetrcommented, Jan 11, 2022

I think for now monkey-patch the html with auto-clicker script will be the simplest. If you want, you can use this project as a sample

const observer = new MutationObserver(() => {
    const expandButtons = [...document.querySelectorAll('button[type=button] > span')]
        .filter((el) => el.innerHTML === 'RAW')
        .map((el) => el.closest('button'));
    for (const button of expandButtons) {
        if (!button.classList.contains(EXPANDED_CLASS)) {
            button.classList.add(EXPANDED_CLASS);
            button.click();
        }
    }
});
observer.observe(document.body, {
    childList: true,
    subtree: true,
});

P.S. Check webpack config in config/main. After production build, the patch will be installed automatically

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make local adjustments in Camera Raw - Adobe Support
Learn how to use the Adjustment Brush, Graduated Filter tools, and masking controls to make local adjustments in Adobe Camera Raw.
Read more >
Using the Raw XML Editor - Infoblox NetMRI 7.5.3 Administrator Guide
The Raw XML editor enables the creation of more sophisticated Rule logic than is possible through other Editor types such as the Simple...
Read more >
Configuration Editor - Varigence Support Documentation
The Configuration Editor is used to manage standard Columns and how, when and where these are added to Objects. These standard columns can...
Read more >
Adjust object tracking in Final Cut Pro - Apple Support
Edit tracking keyframes in the timeline · Choose Clip > Show Tracking Editor (or press Option-Command-T). · Control-click the clip in the timeline...
Read more >
Raw File Destination - SQL Server Integration Services (SSIS)
Append and New File Options; Configuration of the Raw File Destination; Related Tasks; Related Content; Raw File Destination Editor ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found