Skip to content
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

feat: title prefix for different environments #1011 #1015

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

Conversation

mxmaher
Copy link

@mxmaher mxmaher commented Jan 27, 2025

Add a prefix to the browser tab title based on the current configured deployment env, this resolves issue #1011

Changes:

  • The environment callback can now return a dict with the label, color_accent and title_prefix keys.
  • This change is backward compatible with the current return value as a list of 2 items.
  • Added get_environment_context to the UnfoldAdminSite class that's is called in the each_context method to achieve the above changes.
  • Adjusted the templates and tests to reflect these changes.

Screenshots:
Screenshot from 2025-01-29 05-23-13

mxmaher and others added 2 commits January 27, 2025 21:41
Add a prefix to the browser tab title based on the current configured deployment env.

**Changes**:
- The environment callback can now return a dict with the `label`, `color_accent` and `title_prefix` keys.
- This change is backward compatible with the current return value as a list of 2 items.
- Added `get_environment_context` to the `UnfoldAdminSite` class that's is called in the `each_context` method to achieve the above changes.
- Adjusted the templates and tests to reflect these changes.
@mxmaher
Copy link
Author

mxmaher commented Jan 27, 2025

This requires manual testing of the UI which I'm still trying to figure out as I'm facing issues with my devcontainers setup.
Will update the PR with screenshots once I can @lukasvinclav

@mxmaher
Copy link
Author

mxmaher commented Jan 29, 2025

@lukasvinclav attached screenshot of the changes in the PR description, looking forward to your feedback

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.

1 participant