Skip to content

Add auto-scroll for search results on the Json Screen#494

Merged
rteyssandier merged 1 commit intoopenflocon:mainfrom
snappdevelopment:add-jsontree-autoscroll
Feb 16, 2026
Merged

Add auto-scroll for search results on the Json Screen#494
rteyssandier merged 1 commit intoopenflocon:mainfrom
snappdevelopment:add-jsontree-autoscroll

Conversation

@snappdevelopment
Copy link
Copy Markdown
Contributor

  • Adds auto-scrolling between search results. This makes finding the next result more convenient in long Jsons.
  • Removes the restriction on the up and down arrows, because JsonTree automatically jumps up to the first result when reaching the end and vice versa.
  • Updates JsonTree to the latest version which has some minor performance improvements.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @snappdevelopment, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user experience when interacting with JSON data by introducing auto-scrolling to search results, making it easier to locate findings in extensive documents. It also refines the search navigation controls for a more fluid interaction and incorporates performance benefits from an updated underlying library.

Highlights

  • Auto-scrolling for JSON search results: Implemented automatic scrolling to the currently selected search result within the JSON viewer, improving navigation convenience for long JSON documents.
  • Enhanced search navigation: Removed restrictions on the 'up' and 'down' arrow buttons for search results, allowing users to cycle through results continuously without being limited by the start or end of the list.
  • JsonTree library update: Updated the JsonTree library to version 2.6.0, which includes minor performance improvements.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a valuable auto-scroll feature for search results within the JSON viewer, significantly improving navigation in large files. The implementation correctly uses a LaunchedEffect and hoists the LazyListState. The accompanying update to the JsonTree library and the adjustment to the search navigation controls are also appropriate. I've included one suggestion to enhance the auto-scroll behavior, making it more robust and predictable for the user.

Comment on lines +80 to +82
if(resultIndex != null && !listState.isScrollInProgress) {
listState.animateScrollToItem(resultIndex)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The !listState.isScrollInProgress check might lead to confusing behavior. If the user is in the middle of a scroll (e.g., a fling) and clicks to go to the next/previous search result, the auto-scroll won't trigger. This could make the navigation feel unresponsive. The user's explicit action to navigate should likely take precedence. Consider removing this check to make the auto-scroll behavior more predictable and reliable.

Suggested change
if(resultIndex != null && !listState.isScrollInProgress) {
listState.animateScrollToItem(resultIndex)
}
if(resultIndex != null) {
listState.animateScrollToItem(resultIndex)
}

@rteyssandier rteyssandier merged commit 328b726 into openflocon:main Feb 16, 2026
2 checks passed
@rteyssandier rteyssandier added enhancement New feature or request labels Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants