Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize Bundle Sizes, Improve Tree-Shaking, Documentation Consistency & Support Next.js 15 & React 19 #12918

Open
nguyenvanhieu1996 opened this issue Nov 15, 2024 · 0 comments

Comments

@nguyenvanhieu1996
Copy link

nguyenvanhieu1996 commented Nov 15, 2024

Summary

Hi Polaris team! 👋

We would like to suggest some improvements that could make it even better

  1. Optimize component bundle sizes (current TextField: 124.2k, Modal, Navigation)
  2. Better tree-shaking support for reduced build sizes
  3. Major documentation inconsistencies between platforms:
    • npm package shows deprecated components (e.g., LegacyCard)
    • Polaris website shows different implementations
    • GitHub documentation doesn't match either
  4. Support path for Next.js 15 & React 19
  5. Need more comprehensive examples of component props and variations
  6. Essential admin UI components like Modal, Navigation, Toggle, DatePicker, TimePicker, FileUpload, DataTable, TreeSelect, etc... are crucial for admin interfaces but currently are not available or deprecated in Polaris

Current challenges:

  • Large import sizes (TextField: 124.2k gzipped: 17.5k)
  • Confusing documentation across platforms
  • Deprecated components still shown in npm docs
  • Limited component usage examples
  • Lack of Next.js 15 & React 19 optimization guidelines

Image

Rationale

These improvements are essential for:

  1. Documentation Consistency:
  • Align documentation across all platforms:
    • NPM package documentation
    • Polaris official website
    • GitHub repository
  • Remove references to deprecated components (e.g., LegacyCard)
  • Update examples to current best practices
  • Clear indication of component deprecation status
  1. Performance & Bundle Size:
  • Optimize component sizes
  • Improve tree-shaking support
  • Reduce overall bundle impact
  • Better code splitting options
  1. Next.js 15 & React 19 Support:
  • Clear migration path for Next.js 15
  • React 19 compatibility preparation
  • Server Component optimization
  • App Router best practices
  • Performance guidelines for new React features
  1. Enhanced Documentation:
  • More comprehensive props examples
  • Real-world use cases
  • Complex component interactions
  • TypeScript implementation examples
  • Server/Client component guidelines
  • Clear component upgrade paths

These updates would significantly improve developer experience and ensure consistent, reliable documentation across all platforms while preparing for future framework updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant