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

feat: setup stencil development environment with component preview #1196

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

abretonc7s
Copy link
Collaborator

Description

This PR improves the development experience for SDK UI components by adding a Stencil development server and comprehensive component preview page.

Key Changes

Development Environment

  • Added development server configuration in stencil.config.ts
  • Configured hot-reload and live preview capabilities
  • Added dev command for streamlined development workflow

Component Preview Page

Added a new index.html that serves as a development playground with:

  • Navigation between different modal types (Install, Pending, Select)
  • Live examples of each component with proper props
  • Clean, organized layout for easy testing

Implementation Details

The development server runs on http://localhost:4444/ and features:

  • Hot-reload for immediate feedback during development
  • Easy switching between different modal components
  • Example implementations with commonly used props

Example usage for developers:

<!-- Install Modal Example -->
<mm-install-modal
  link="https://example.com/install"
  sdk-version="1.0.0"
  prefer-desktop="true"
>
</mm-install-modal>

<!-- Pending Modal Example -->
<mm-pending-modal>
</mm-pending-modal>

<!-- Select Modal Example -->
<mm-select-modal
  link="https://example.com/select"
  sdk-version="1.0.0"
  prefer-desktop="true"
>
</mm-select-modal>

image

Testing Instructions

  1. Start the development server:

    cd packages/sdk-install-modal-web
    yarn dev
  2. Open http://localhost:4444 in your browser

  3. Test different components using the navigation bar

  4. Make changes to component files and verify hot-reload functionality

  5. Test components with different prop combinations

@abretonc7s abretonc7s requested a review from a team as a code owner January 15, 2025 00:58
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.02%. Comparing base (53af746) to head (1255261).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1196   +/-   ##
=======================================
  Coverage   74.02%   74.02%           
=======================================
  Files         182      182           
  Lines        4343     4343           
  Branches     1064     1064           
=======================================
  Hits         3215     3215           
  Misses       1128     1128           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

chakra-guy
chakra-guy previously approved these changes Jan 15, 2025
Copy link
Collaborator

@chakra-guy chakra-guy left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from turborepo to main January 15, 2025 10:14
@abretonc7s abretonc7s dismissed chakra-guy’s stale review January 15, 2025 10:14

The base branch was changed.

@abretonc7s abretonc7s enabled auto-merge (squash) January 15, 2025 10:57
Copy link
Collaborator

@christopherferreira9 christopherferreira9 left a comment

Choose a reason for hiding this comment

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

LGTM

@abretonc7s abretonc7s merged commit 458c3fa into main Jan 15, 2025
36 checks passed
@abretonc7s abretonc7s deleted the stencildev branch January 15, 2025 11:49
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.

3 participants