Skip to content

Add Vite-based samples browser with simplified build process#1077

Open
Copilot wants to merge 15 commits intovnextfrom
copilot/create-vite-samples-browser
Open

Add Vite-based samples browser with simplified build process#1077
Copilot wants to merge 15 commits intovnextfrom
copilot/create-vite-samples-browser

Conversation

Copy link
Contributor

Copilot AI commented Nov 17, 2025

Implements a new samples browser using Vite in browser-vite/, eliminating Gulp dependency and simplifying the build pipeline.

Implementation

Copy Process

  • Single Node.js script (scripts/copy-samples.js) replaces Gulp tasks
  • Scans /samples for package.json files to identify 936 samples
  • Extracts HTML structure from each sample's index.html
  • Generates unified metadata JSON for navigation

Browser Architecture

  • Vite 7.2.2 with TypeScript configuration
  • Client-side routing supporting both browser view (/) and direct sample URLs (/charts/category-chart/overview)
  • Collapsible navigation tree organized by component group → category → sample
  • Dynamic sample loading via ES module imports

Sample Compatibility

  • Zero modifications required to existing sample source
  • HTML content extracted via regex from <div id="root"> to </body>
  • Sample TypeScript files copied as-is from src/ directories

Structure

browser-vite/
├── scripts/copy-samples.js      # Replaces gulp pipeline
├── src/
│   ├── main.ts                  # Router + navigation logic
│   ├── samples/                 # Copied from /samples (generated)
│   └── samples-metadata.json    # Navigation data (generated)
├── index.html                   # Navigation UI
└── vite.config.js               # Build configuration

Usage

cd browser-vite
npm install
npm run dev      # Copies samples + starts dev server
npm run build    # Production bundle

Screenshots

Navigation interface with collapsible categories:

Browser UI

Sample categories expanded:

Navigation

Original prompt

This section details on the original issue you should resolve

<issue_title>Create a new vite-based samples browser</issue_title>
<issue_description>Create a new samples browser with vite. Add it as a separate folder called browser-vite.

  • It needs to follow the same structure where samples come from the /samples folder and are copied before the browser is run similar to how it's done at the moment with the gulp scripts. However, don't use gulp and have the copy process be as simple as possible. Sample source should be the same or at worse require very small changes .
  • The samples should be browsable with a navigation list but also viewable separately with a different path (similar to how routing works for the current browser)</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits November 17, 2025 14:39
Co-authored-by: ChronosSF <2188411+ChronosSF@users.noreply.github.com>
Co-authored-by: ChronosSF <2188411+ChronosSF@users.noreply.github.com>
Co-authored-by: ChronosSF <2188411+ChronosSF@users.noreply.github.com>
Copilot AI changed the title [WIP] Create new vite-based samples browser Add Vite-based samples browser with simplified build process Nov 17, 2025
Copilot AI requested a review from ChronosSF November 17, 2025 15:01
@ChronosSF
Copy link
Member

ChronosSF commented Feb 11, 2026

@HUSSAR-mtrela , we are planning to retire the webpack build and replace with vite and rolldown. The app itself is entirely vibe-coded and can probably look better in terms of code cleanliness but it seems to work okay and we'll continue testing it . It also follows the structure of the old SB pretty closely.

I think I will however merge it after making it completely replace the old SB (instead of as an addition). Was wondering if you can think of any concerns you might have with this change and based on the code changes.

The app is also available on staging under : https://staging.infragistics.com/webcomponents-demos-new/samples
And it of course supports the embedded URL format for docfx e.g. https://staging.infragistics.com/webcomponents-demos-new/inputs/combo/overview

@ChronosSF ChronosSF marked this pull request as ready for review February 11, 2026 14:50
@ChronosSF ChronosSF added status: in-test PR ready for testing squash merge Squash merge the commits of this PR labels Feb 11, 2026
@HUSSAR-mtrela
Copy link
Collaborator

@ChronosSF thanks for notifying me and we will review it ad let you know if we find anything to change.

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

Labels

squash merge Squash merge the commits of this PR status: in-test PR ready for testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a new vite-based samples browser

5 participants