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

fix show all feature for json tree #246

Merged
merged 1 commit into from
Jul 18, 2024
Merged

Conversation

steppy452
Copy link
Contributor

@steppy452 steppy452 commented Jul 18, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #245

What is the new behavior?

  • showAll defaults infinity list size to Infinity and ignores showAllLimit. it also gets propagated through to child nodes
  • showAllLimit gets propagated through to child nodes. also updated the comment to show when showAll is false
  • added storybook story to demonstrate showAll

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@steppy452 steppy452 requested a review from amcdnl July 18, 2024 22:29
Copy link

vercel bot commented Jul 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
reablocks-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2024 10:29pm

@steppy452 steppy452 requested a review from ghsteff July 18, 2024 22:29
Copy link

netlify bot commented Jul 18, 2024

Deploy Preview for reablocks-storybook ready!

Name Link
🔨 Latest commit 2862222
🔍 Latest deploy log https://app.netlify.com/sites/reablocks-storybook/deploys/6699974f629103000807da5e
😎 Deploy Preview https://deploy-preview-246--reablocks-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines +18 to 20
* The limit for the number of nodes to show when `showAll` is false.
*/
showAllLimit?: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

showAllLimit is kind of a confusing name imo, but I get you're not tryna break the API. Not even sure what a good name would be anyway, maybe expandCount - similar to the existing expandDepth

Copy link
Contributor

Choose a reason for hiding this comment

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

or expandLimit

Copy link
Contributor

Choose a reason for hiding this comment

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

eh none of those are great haha

Copy link
Member

Choose a reason for hiding this comment

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

Agreed odd name but she just followed the other name. I think fine for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea didn't want to change it as it'd be a breaking change

@amcdnl amcdnl merged commit 9a5fc28 into master Jul 18, 2024
7 checks passed
@amcdnl amcdnl deleted the syang/245/json-tree-showall branch July 18, 2024 23:35
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