Skip to content

feat: add display name for mocks#513

Merged
rteyssandier merged 6 commits intoopenflocon:mainfrom
nilsjr:feature/add-display-name-for-mocks
Mar 25, 2026
Merged

feat: add display name for mocks#513
rteyssandier merged 6 commits intoopenflocon:mainfrom
nilsjr:feature/add-display-name-for-mocks

Conversation

@nilsjr
Copy link
Copy Markdown
Contributor

@nilsjr nilsjr commented Mar 18, 2026

Here is my proposal for adding a display name for mocks. resolves #500

@nilsjr nilsjr changed the title Feature/add display name for mocks feat: add display name for mocks Mar 18, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 enhances the network mocking feature by adding a 'display name' capability. This allows users to assign descriptive names to their network mocks, making them more organized and easier to find within the application's UI. The change involved updating the database schema, modifying data models and mappers, and adjusting the user interface to support the new display name field.

Highlights

  • Display Name for Network Mocks: Introduced a new displayName field for network mocks, allowing users to assign a human-readable name to each mock for easier identification and management.
  • Database Schema Update: The Room database schema was updated to version 79 to accommodate the new displayName field in the MockNetworkEntity.
  • UI Enhancements for Mocks: The mock editing screen now includes a dedicated text field for the displayName, and the mock list view prioritizes displaying the displayName over the URL pattern, improving user experience.
  • Data Model and Mapper Updates: All relevant data models (UI, Domain, Entity, Exported) and their corresponding mappers were updated to correctly handle the new displayName property across the application layers.
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.

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 successfully introduces a displayName field for network mocks, enhancing their identification and management. The changes span across database schema, domain models, UI models, mappers, and UI components to integrate this new feature. My feedback focuses on ensuring UI consistency, proper layout alignment, and adherence to the theming rules for custom components.

Comment on lines +68 to +96
if (item.displayName.isEmpty()) {
Text(
text = item.urlPattern,
modifier = Modifier.weight(1f),
maxLines = 2,
overflow = TextOverflow.Ellipsis,
style = FloconTheme.typography.titleSmall,
color = FloconTheme.colorPalette.onSurface,
)
} else {
Column(Modifier.weight(1f)) {
Text(
text = item.displayName,
modifier = Modifier.fillMaxWidth(),
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = FloconTheme.typography.titleSmall,
color = FloconTheme.colorPalette.onSurface,
)
.padding(horizontal = 8.dp, vertical = 6.dp),
)
Spacer(Modifier.height(8.dp))
Text(
text = item.urlPattern,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = FloconTheme.typography.bodySmall,
modifier = Modifier.fillMaxWidth().alpha(.5f),
)
}
}
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 previous implementation of urlPattern included a distinct background and rounded corners, which helped in visual separation and readability. The current change removes this styling when displayName is empty, and for urlPattern when displayName is present, it's displayed with alpha(.5f). While the new layout with displayName is good, consider if the urlPattern still needs some visual distinction or if its reduced prominence (especially when displayName is empty and it becomes the primary text) affects readability.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

see #513 (comment)
Would say its readable :D

@rteyssandier rteyssandier added the enhancement New feature or request label Mar 18, 2026
@rteyssandier rteyssandier merged commit 9d453e4 into openflocon:main Mar 25, 2026
2 checks passed
@nilsjr nilsjr deleted the feature/add-display-name-for-mocks branch April 14, 2026 06:08
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.

[Feature]: Add names to mocks

2 participants