Skip to content

export modules for plugins#6261

Merged
adhami3310 merged 1 commit intomainfrom
export-modules-for-plugins
Mar 31, 2026
Merged

export modules for plugins#6261
adhami3310 merged 1 commit intomainfrom
export-modules-for-plugins

Conversation

@adhami3310
Copy link
Copy Markdown
Member

No description provided.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 31, 2026

Greptile Summary

This PR exports the sitemap, tailwind_v3, and tailwind_v4 plugin modules directly from both the reflex_core.plugins and reflex.plugins namespaces, enabling external plugin authors to access module-level utilities (e.g., SitemapLink, SitemapLinkConfiguration, Constants, etc.) without having to import deeply into internal packages.

Key changes:

  • reflex_core/plugins/__init__.py: Adds from . import sitemap, tailwind_v3, tailwind_v4 to expose the modules themselves alongside the existing class-level exports; all three are added to __all__.
  • reflex/plugins/__init__.py: Replaces the broad from reflex_core.plugins import * wildcard with a fully explicit import block that now includes sitemap, tailwind_v3, and tailwind_v4; __all__ is updated to match.

Confidence Score: 5/5

Safe to merge — the change is additive, replaces a wildcard import with explicit imports (no names are dropped), and no custom rules are violated.

All previously exported symbols are still explicitly imported in reflex/plugins/init.py, so there is no regression from removing the wildcard import. The three new module exports are additive only. No logic, security, or data-integrity concerns are introduced.

No files require special attention.

Important Files Changed

Filename Overview
packages/reflex-core/src/reflex_core/plugins/init.py Adds explicit submodule imports and extends all to expose sitemap, tailwind_v3, and tailwind_v4 as part of the public plugin API.
reflex/plugins/init.py Replaces wildcard import with explicit imports (no names dropped) and adds the three new module re-exports; all updated to match.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["reflex.plugins"] -->|"explicit import"| B["reflex_core.plugins"]
    B -->|"from . import"| C["reflex_core.plugins.sitemap"]
    B -->|"from . import"| D["reflex_core.plugins.tailwind_v3"]
    B -->|"from . import"| E["reflex_core.plugins.tailwind_v4"]
    B -->|"class export"| F["Plugin, CommonContext, PreCompileContext"]
    B -->|"class export"| G["SitemapPlugin, TailwindV3Plugin, TailwindV4Plugin"]
    B -->|"class export"| H["_ScreenshotPlugin"]
    C -->|"exposes"| C1["SitemapLink, SitemapLinkConfiguration, Plugin alias"]
    D -->|"exposes"| D1["TailwindV3Plugin, Constants, compile_config, ..."]
    E -->|"exposes"| E1["TailwindV4Plugin, Constants, compile_config, ..."]
Loading

Reviews (1): Last reviewed commit: "export modules for plugins" | Re-trigger Greptile

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 31, 2026

Merging this PR will not alter performance

✅ 8 untouched benchmarks


Comparing export-modules-for-plugins (b14b7cd) with main (2178184)

Open in CodSpeed

@adhami3310 adhami3310 merged commit dc936c3 into main Mar 31, 2026
44 of 46 checks passed
@adhami3310 adhami3310 deleted the export-modules-for-plugins branch March 31, 2026 19:03
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