Skip to content

enhance organization components with proper types and additional props#21

Open
PJ-Snap wants to merge 1 commit intoTimChild:mainfrom
snap-analytics:pr/enhance-org-components
Open

enhance organization components with proper types and additional props#21
PJ-Snap wants to merge 1 commit intoTimChild:mainfrom
snap-analytics:pr/enhance-org-components

Conversation

@PJ-Snap
Copy link
Copy Markdown
Contributor

@PJ-Snap 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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +28 to +33
from .organization_components import (
create_organization,
organization_profile,
organization_switcher,
organization_list,
)
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines +61 to +62
custom_pages: list | None = None
"An array of custom pages to add to the organization profile."
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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.

2 participants