discoveryjs / discovery

A framework for rapid data (JSON) analysis, shareable serverless reports and dashboards
https://discoveryjs.github.io/discovery/
MIT License
331 stars 6 forks source link

Allow configuration of maxStringLength and maxLinearStringLength for struct view #93

Closed FeltBoots closed 2 years ago

FeltBoots commented 2 years ago

What changed

  1. Move maxStringLength and maxLinearStringLength to config of struct view
  2. Simplify condition inside string length comparison to prevent misunderstanding of new properties

Motivation

I believe this feature might be useful for some projects. For example, it will be convenient for me. I run discovery inside browser devtools and want to tweak these params a little bit on window resize.

If you find my explanation not perfect in src/views/struct/struct.usage.js let me know I fix it.

lahmatiy commented 2 years ago

@FeltBoots Thank you for the feature request and PR! I thought about adding such options into struct's config. Looks like it's time to do it.