enhance organization components with proper types and additional props#21
enhance organization components with proper types and additional props#21PJ-Snap wants to merge 1 commit intoTimChild:mainfrom
Conversation
PJ-Snap
commented
Apr 7, 2026
- Use Appearance, rx.Component, bool, dict, list types instead of Optional[str]
- Add missing props: skip_invitation_screen, hide_slug, organization_profile_props, hide_personal
- Add per-prop docstrings for better IDE support
- Export organization components from package init.py
…l props - Use Appearance, rx.Component, bool, dict, list types instead of Optional[str] - Add missing props: skip_invitation_screen, hide_slug, organization_profile_props, hide_personal - Add per-prop docstrings for better IDE support - Export organization components from package __init__.py
There was a problem hiding this comment.
Pull request overview
This PR refines the Clerk organization component wrappers by improving prop typing, adding missing/renamed props, and exposing these helpers from the package root to simplify imports for consumers.
Changes:
- Replace overly broad
Optional[str]prop types with more accurate types (e.g.,Appearance,rx.Component,bool, etc.). - Add additional Clerk organization props (e.g.,
skip_invitation_screen,hide_slug,organization_profile_props,hide_personal) and per-prop inline documentation. - Export organization component factory functions from
custom_components/reflex_clerk_api/__init__.py.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| custom_components/reflex_clerk_api/organization_components.py | Updates organization component prop types and adds additional props + inline prop documentation. |
| custom_components/reflex_clerk_api/init.py | Re-exports organization component helpers from the package root. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from .organization_components import ( | ||
| create_organization, | ||
| organization_profile, | ||
| organization_switcher, | ||
| organization_list, | ||
| ) |
There was a problem hiding this comment.
The new from .organization_components import (...) block is out of import-sort order for this module (ruff/isort is enabled via extend-select = ["I", ...]). To avoid CI/lint failures, move this import to its alphabetically correct position among the local imports (likely before .pages/.unstyled_components).
| custom_pages: list | None = None | ||
| "An array of custom pages to add to the organization profile." |
There was a problem hiding this comment.
custom_pages is typed as list | None, which loses element type information and is inconsistent with the more specific generics used elsewhere in the package (e.g., list[str], dict[str, Any]). Consider typing this as a parameterized list (e.g., list[dict[str, Any]] | None) to preserve type safety and IDE support.