Skip to content

Let deployments add their own tabs to the organization page (7.21.0) - #893

Merged
payamnj merged 2 commits into
masterfrom
organization-custom-tabs
Oct 22, 2026
Merged

payamnj merged 2 commits into
masterfrom
organization-custom-tabs

Conversation

@payamnj

@payamnj payamnj commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ORGANIZATION.CUSTOM_TABS so a deployment can show its own tabs on an organization's page. These are for settings that belong to the organization but not to the library, such as a payment provider connection. Inbox Academy will use it for a Stripe Integrations tab, which Stripe's app review requires.

  • Each tab is a custom element given by NAME, LABEL, SCRIPT_URL, STYLE_URL and COMPONENT_TAG. This is the same shape as the sidebar and dashboard custom components.
  • Custom tabs come after the built-in ones. ?tab=<NAME> opens one, so it can be linked to. A name that clashes with a built-in tab (general_info, members, newsletters, api_keys) is ignored.
  • The tag goes through the same sanitizeComponentHtml as the dashboard components, which strips event handlers and scripts. The tab's script and style URLs go into the same deduped list in the page head as the navbar and dashboard components.
  • To build the tabs per organization, override SingleOrganization.get_organization_custom_tabs(organization), for example to put the organization's id on the tag.
  • Documented in docs/source/installation.rst and the CHANGELOG. Bumps the version to 7.21.0.

Testing

  • pytest tests/platform: 628 passed. The coverage gate fails on this subset run only.
  • New view tests: no tabs by default; tabs are read from settings, with their assets added to the page head.
  • vitest Organization.test.jsx: 16 passed, including 4 new tests. They cover rendering a tab and its component, opening one from ?tab=, ignoring a name that clashes with a built-in tab, and stripping event handlers.
  • ruff, ruff format, mypy and eslint are clean.

🤖 Generated with Claude Code

payamnj and others added 2 commits October 22, 2026 21:03
ORGANIZATION.CUSTOM_TABS lists extra tabs shown after the built-in
ones, each a custom element given by NAME, LABEL, SCRIPT_URL,
STYLE_URL and COMPONENT_TAG, the same shape as the sidebar and
dashboard custom components. ?tab=<NAME> opens one, and a name that
clashes with a built-in tab is ignored. Override
SingleOrganization.get_organization_custom_tabs() to build them per
organization.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The organization page can show a deployment's own tabs, configured
with ORGANIZATION.CUSTOM_TABS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@payamnj
payamnj merged commit 6c5931c into master Oct 22, 2026
13 checks passed
@payamnj
payamnj deleted the organization-custom-tabs branch October 22, 2026 19:07
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