Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new set of Lit-based “v2” Web Components (header + auth buttons) and wires them into the build/test pipeline so they can be consumed via package subpath exports (solid-ui/components/*).
Changes:
- Add Lit Web Components:
<solid-ui-header>,<solid-ui-login-button>,<solid-ui-signup-button>plus READMEs and unit tests. - Update webpack to emit per-component bundles under
dist/components/<component>/index.*and updatepackage.jsonsubpath exports accordingly. - Adjust Jest/TypeScript test configuration and update existing unit snapshots.
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.config.mjs | Builds multiple entrypoints and emits component bundles under dist/components/*. |
| tsconfig.test.json | Includes src/**/*.test.ts in the test TS project. |
| test/unit/index.test.ts | Updates index export contract test. |
| test/unit/header/snapshots/index.test.ts.snap | Snapshot updates for legacy header DOM output. |
| test/helpers/setup.ts | Minor cleanup in test setup. |
| src/v2/components/header/Header.ts | New Lit-based header component implementation. |
| src/v2/components/header/index.ts | Registers <solid-ui-header> and exports types. |
| src/v2/components/header/README.md | Documents header component usage and API. |
| src/v2/components/header/header.test.ts | Adds unit tests for the new header component. |
| src/v2/components/loginButton/LoginButton.ts | New Lit-based login button with popup flow. |
| src/v2/components/loginButton/index.ts | Registers <solid-ui-login-button>. |
| src/v2/components/loginButton/README.md | Documents login button component usage and API. |
| src/v2/components/signupButton/SignupButton.ts | New Lit-based signup button. |
| src/v2/components/signupButton/index.ts | Registers <solid-ui-signup-button>. |
| src/v2/components/signupButton/README.md | Documents signup button component usage and API. |
| src/utils/headerFooterHelpers.ts | Changes ns import and tweaks getPod() behavior. |
| src/pad.ts | Formatting / string quoting adjustments. |
| src/footer/index.ts | Refactors footer link creation and styling placement. |
| src/acl/access-groups.ts | Minor string concatenation tweak. |
| scripts/build-component-dts.mjs | Adds a postbuild script to generate dist/components/* type wrappers. |
| README.md | Adds top-level documentation for Web Components and build pipeline. |
| package.json | Adds subpath exports for components and adjusts build scripts/deps. |
| jest.config.mjs | Expands transform ignore patterns for Lit packages + CSS mock mapping. |
| babel.config.mjs | Enables allowDeclareFields for TS preset (needed for declare). |
| mocks/styleMock.js | Adds Jest mock for CSS imports. |
Comments suppressed due to low confidence (1)
webpack.config.mjs:33
- With multiple new entrypoints (
header,loginButton,signupButton) sharing the sameoutput.library.name: 'UI', loading more than one of the emitted UMD bundles via script tags will overwritewindow.UI(last bundle wins). Consider omitting the global name for component bundles or using a per-entry library name to avoid clobbering the mainUIglobal.
const common = {
entry: {
main: './src/index.ts',
header: './src/v2/components/header/index.ts',
loginButton: './src/v2/components/loginButton/index.ts',
signupButton: './src/v2/components/signupButton/index.ts'
},
output: {
path: path.resolve(process.cwd(), 'dist'),
library: {
name: 'UI',
type: 'umd'
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "description": "UI library for Solid applications", | ||
| "main": "dist/solid-ui.js", | ||
| "types": "dist/index.d.ts", | ||
| "sideEffects": false, | ||
| "exports": { | ||
| ".": { |
There was a problem hiding this comment.
Removing "sideEffects": false disables tree-shaking for the entire package. If this was done to preserve custom-element registration side effects, consider using a sideEffects allowlist (e.g. only the component entrypoints) so consumers can still tree-shake the rest of the library.
There was a problem hiding this comment.
we take this out until we have a better solution for components.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This is for solid symposium