feat: add display name for mocks#513
Conversation
Summary of ChangesHello, 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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
| 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), | ||
| ) | ||
| } | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
see #513 (comment)
Would say its readable :D
Here is my proposal for adding a display name for mocks. resolves #500