Skip to content

Adding color support for environments #829

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

BalaSubramaniam12007
Copy link
Contributor

PR Description

This PR introduces full environment color support throughout the application, enabling users to assign and visualize colors for different environments (e.g., red for prod, green for dev).

Key changes include:

Model Update: Added a color field to EnvironmentModel as a String? to store hex colors (e.g., #FF5733), ensuring serialization compatibility with Hive.

State Management: Enhanced EnvironmentsProvider to handle color in loadEnvironments, addEnvironment, updateEnvironment, and duplicateEnvironment.

UI Enhancements: Updated EnvironmentPopupMenu to display environment colors across the entire PopupMenuItem,

Create a new file named EnvEditorTitleAction as a mirror of EditorTitleAction, to add a color palette section feature that is available only for the environment page.

TODO: Added automatic unique color assignment for new environments and random color generation as a fallback, ensuring visual distinction.

Related Issues

Checklist

  • I have gone through the contributing guide
  • I have updated my branch and synced it with the project main branch before making this PR
  • I am using the latest Flutter stable branch (run flutter upgrade and verify)
  • I have run the tests (flutter test) and all tests are passing

image

image
image

Added/updated tests?

We encourage you to add relevant test cases.

  • Yes
  • No, and this is why: Initial implementation; test coverage will follow in future PRs.

OS on which you have developed and tested the feature?

  • Windows
  • macOS
  • Linux

…lor picker

Added color field to EnvironmentModel with state management in Environmenprovider.
Integrated flutter_colorpicker for color selection in EnvEditorTitleActions.
Displayed colors in EnvironmentDropdown and EnvironmentsList.

Signed-off-by: Balasubramaniam12007 <[email protected]>
@BalaSubramaniam12007 BalaSubramaniam12007 changed the title Usability improve Adding color support for environments Apr 23, 2025
@animator
Copy link
Member

The color palatte is hardly visible in the corner. the feature should show the option to pick color prominently.
The dropdown text over color is not visible.

@animator
Copy link
Member

Also, test on dark mode.

@BalaSubramaniam12007
Copy link
Contributor Author

@animator, thanks for the feedback! I’m a bit unclear on how to make the color palette more prominent.Would you suggest increase the button size, add a color swatch, or reposition it? Could you please clarify what you envision for making the "pick color" option stand out? Also, I plan to use a block picker (like the one I shared) with a curated set of colors for easier selection. Thanks!
image

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.

Adding color support for environments
2 participants