Skip to content

Minimize cross-package dependencies in component packages#6515

Draft
Alek99 wants to merge 3 commits into
mainfrom
codex/issue-6324-package-deps
Draft

Minimize cross-package dependencies in component packages#6515
Alek99 wants to merge 3 commits into
mainfrom
codex/issue-6324-package-deps

Conversation

@Alek99
Copy link
Copy Markdown
Member

@Alek99 Alek99 commented May 15, 2026

Summary

  • Move the connection banner implementation into the main reflex package so reflex-components-core no longer depends on Lucide or Sonner for that module.
  • Remove Sonner's Lucide dependency by typing loading_icon as a generic Component.
  • Keep upload rejection toasts working from reflex-components-core via the existing toast ref instead of importing Sonner directly.
  • Add regression tests that assert the intended package boundaries stay clean.

Connection Banner Visual Check

The connection banner should look the same as before. I tested origin/main and this PR branch with the same fixture, viewport, light page background, and forced websocket disconnect. The only expected text difference is the dynamic local websocket port.

Connection banner old vs new

I also compared the rendered output for ConnectionBanner, ConnectionModal, and ConnectionPulser against origin/main; all matched.

Validation

  • uv run ruff format --check reflex/components/banner.py reflex/app.py reflex/utils/codespaces.py packages/reflex-components-core/src/reflex_components_core/core/__init__.py packages/reflex-components-core/src/reflex_components_core/core/upload.py packages/reflex-components-sonner/src/reflex_components_sonner/toast.py tests/units/components/core/test_banner.py tests/units/components/test_package_dependencies.py
  • uv run ruff check reflex/components/banner.py reflex/app.py reflex/utils/codespaces.py packages/reflex-components-core/src/reflex_components_core/core/__init__.py packages/reflex-components-core/src/reflex_components_core/core/upload.py packages/reflex-components-sonner/src/reflex_components_sonner/toast.py tests/units/components/core/test_banner.py tests/units/components/test_package_dependencies.py
  • uv run pytest tests/units/components/core/test_banner.py tests/units/components/core/test_upload.py tests/units/components/test_package_dependencies.py
  • uv run pyright packages/reflex-components-sonner/src/reflex_components_sonner/toast.py packages/reflex-components-core/src/reflex_components_core/core/upload.py reflex/components/banner.py
  • Render output comparison against origin/main for ConnectionBanner, ConnectionModal, and ConnectionPulser
  • Browser screenshot comparison against origin/main with the same forced-disconnect fixture

Fixes #6324

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 15, 2026

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing codex/issue-6324-package-deps (764e9fa) with main (9ed3692)

Open in CodSpeed

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.

Minimize cross-package dependency in packages/

1 participant