Skip to content

refactor: WP-876 customize tenant UI via config#106

Open
wesleyboar wants to merge 6 commits intotapis-project:devfrom
wesleyboar:refactor/WP-876-customize-tenant-ui-via-config
Open

refactor: WP-876 customize tenant UI via config#106
wesleyboar wants to merge 6 commits intotapis-project:devfrom
wesleyboar:refactor/WP-876-customize-tenant-ui-via-config

Conversation

@wesleyboar
Copy link
Contributor

@wesleyboar wesleyboar commented Feb 20, 2025

Overview

Customize UI per tenant via config instead of many if/else statements.

Related

Changes

  • injected context into all templates via api.py
    ⚠️ I used AI for this code.
  • added tenant customization values to configs.py
  • refactored branding.html to use UI config context
  • refactored login.html to use UI config context

Testing

  1. Run the app.
  2. Interact as default tenant.
  3. Verify login page has correct branding.
  4. Interact as APCD tenant.
  5. Verify login page has:
    • correct branding
    • /apcd/ in "Create Account" url
    • unique help link

UI

I can not test. My environment fails. I requested help.

Copy link
Contributor Author

@wesleyboar wesleyboar left a comment

Choose a reason for hiding this comment

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

There is Python code (not my specialty) by AI; please scrutinize. I also created a data structure that deserves an evaluation. The template code should be tested. I would if I could.

Comment on lines +24 to +27
@app.context_processor
def inject_tenant_ui_config():
return {'tenant_ui_config': TENANT_UI_CONFIG}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Warning

Code provided by AI and is untested.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note

👋 Opinions welcome. Naming? Structure? Location? Import?

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