Skip to content

Improve network detail json text size and expand icon#498

Merged
rteyssandier merged 1 commit intoopenflocon:mainfrom
snappdevelopment:improve-jsontree-config
Feb 16, 2026
Merged

Improve network detail json text size and expand icon#498
rteyssandier merged 1 commit intoopenflocon:mainfrom
snappdevelopment:improve-jsontree-config

Conversation

@snappdevelopment
Copy link
Copy Markdown
Contributor

The text size which is currently used for JsonTree in the network detail screen and json screen feels a little bit too big. I decreased the text size by using one of Flocons TextStyles, which improves readability especially in the network details screen because there is less space.
I also fixed the chevron icon. It was pointing in the wrong direction when expanding objects. Now it points to the right when collapsed or down when expanded, like most tree views (e.g. Android Studios file tree).

@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 refines the visual presentation of JSON data within the application by adjusting text sizing and correcting an icon's directional behavior. These changes aim to improve the clarity and intuitive interaction with JSON tree views, making the display of structured data more user-friendly and consistent with common UI patterns.

Highlights

  • Improved JSON Tree Readability: The text size within the FloconJsonTree component has been reduced to FloconTheme.typography.bodyMedium, enhancing readability, especially in space-constrained areas like the network details screen.
  • Corrected Expand Icon Direction: The chevron icon used for expanding objects in the JSON tree has been updated from ChevronLeft to ChevronRight, ensuring it points correctly (right when collapsed, down when expanded) for better user experience.
Changelog
  • FloconDesktop/library/designsystem/src/commonMain/kotlin/io/github/openflocon/library/designsystem/components/FloconJsonTree.kt
    • Updated the import statement for the chevron icon from ChevronLeft to ChevronRight.
    • Introduced a textStyle parameter to the FloconJsonTree composable, defaulting to FloconTheme.typography.bodyMedium.
    • Modified the icon parameter passed to the internal JsonTree component to use Icons.Outlined.ChevronRight.
    • Passed the new textStyle parameter to the internal JsonTree component to control text appearance.
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

Thank you for this pull request. The changes to reduce the JSON text size and fix the expander icon direction are great improvements for usability and consistency. The code is clean and follows the intended goal. I have one suggestion regarding theme handling in the FloconJsonTree component to make it robust for both light and dark modes.

icon = Icons.Outlined.ChevronLeft,
icon = Icons.Outlined.ChevronRight,
searchState = searchState,
colors = defaultDarkColors,
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.

high

The JsonTree colors are hardcoded to defaultDarkColors. This will not look right when the application is in light theme. You should conditionally apply colors based on the current theme to ensure visual consistency.

You will also need to add the following imports:
import androidx.compose.foundation.isSystemInDarkTheme
import com.sebastianneubauer.jsontree.defaultLightColors

Suggested change
colors = defaultDarkColors,
colors = if (isSystemInDarkTheme()) defaultDarkColors else defaultLightColors,

@rteyssandier rteyssandier added enhancement New feature or request labels Feb 16, 2026
@rteyssandier rteyssandier merged commit 018f18e into openflocon:main Feb 16, 2026
2 checks passed
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