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

Jump to error #145

Merged
merged 2 commits into from
Apr 21, 2023
Merged

Jump to error #145

merged 2 commits into from
Apr 21, 2023

Conversation

gksander
Copy link
Contributor

This PR adds ability to "jump" to errors in JSON explorer when response fails schema validation.

json-error-jumper.mp4

@vercel
Copy link

vercel bot commented Apr 21, 2023

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

Name Status Preview Updated (UTC)
groqd ✅ Ready (Inspect) Visit Preview Apr 21, 2023 7:59pm

@gksander gksander requested a review from carloskelly13 April 21, 2023 20:00
const pathString = path.map((v) => String(v)).join(".");
const lineEl = document.getElementById(`json-item-${pathString}`);
if (lineEl instanceof HTMLElement)
lineEl.scrollIntoView({ behavior: "smooth", block: "start" });
Copy link
Contributor

Choose a reason for hiding this comment

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

such a nice API, oddly coming to Safari just last year.

@gksander gksander merged commit 457a01e into main Apr 21, 2023
@gksander gksander deleted the jump-to-error branch April 21, 2023 23:25
@github-actions github-actions bot mentioned this pull request Apr 21, 2023
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.

2 participants