Refactor/styles separate css#135
Closed
SharonStrats wants to merge 36 commits intofeature/add-dev-envfrom
Closed
Conversation
This reverts commit 29ffe34.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the Source Pane to move UI styling out of inline JS into dedicated CSS, and introduces a Webpack-based build/dev setup so the package can ship compiled artifacts (with CSS handling) under lib/.
Changes:
- Refactor
src/sourcePane.jsto ES module syntax, import CSS, and replace inline styling with CSS classes insrc/styles/sourcePane.css. - Add Webpack configs (prod + dev) plus Babel config to build
lib/source-pane(.min).jsand support local dev viawebpack-dev-server. - Update Jest setup with module mappers/mocks for CSS and
solid-ui, and adjust tests/helpers for the new module format.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/sourcePane.js |
Switch to ESM, import CSS, and replace inline visibility/color styling with class toggles. |
src/styles/sourcePane.css |
New stylesheet for Source Pane layout and state/visibility styling. |
webpack.module.rules.mjs |
Centralize loader rules for JS/TS, CSS, CSS modules, and TTL assets. |
webpack.config.mjs |
Production build to lib/ (UMD) with minified variant and styles copied to lib/styles. |
webpack.dev.config.mjs |
Dev-server configuration for local development with HTML template and polyfills. |
babel.config.mjs |
Babel preset config and TTL inline-import plugin configuration. |
package.json |
Publish/build changes: output in lib/, build scripts, CSS sideEffects, dev server script, new devDependencies. |
jest.config.mjs |
Update Jest module mapping for $rdf, solid-ui, and CSS imports. |
test/sourcePane.test.js |
Adjust import pattern to handle default export interop and reorganize result variable scope. |
test/helpers/setup.js |
Replace solid-logic store usage with an rdflib graph+Fetcher for tests. |
test/helpers/solidUiMock.js |
Add a minimal solid-ui mock (icons/widgets/ns) for DOM tests. |
test/helpers/styleMock.js |
Add CSS import mock for Jest. |
test/helpers/rdfMock.js |
Add $rdf mapper target for Jest (re-export rdflib). |
dev/index.js |
Add a local dev entry that loads a target URI and renders the pane. |
dev/index.html |
Add HTML template for the dev server. |
dev/dev-global.css |
Add local-only global CSS for dev UX. |
dev/context.js |
Add a dev context helper using solid-logic store/singleton. |
README.md |
Document AI-assisted refactor note. |
.gitignore |
Ignore lib/ build output. |
Comments suppressed due to low confidence (1)
test/sourcePane.test.js:12
resultis now shared across the siblingtext/turtle fileandtext/plain filedescribes. This can cause state leakage between suites (especially if additional tests are added later). Prefer scopingresultinside eachdescribe(or reinitializing it in eachbeforeEach) so each suite has its own isolated DOM.
describe("test button compact", () => {
let result
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Bumps the npm_and_yarn group with 1 update in the / directory: [picomatch](https://github.com/micromatch/picomatch). Updates `picomatch` from 2.3.1 to 2.3.2 - [Release notes](https://github.com/micromatch/picomatch/releases) - [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md) - [Commits](micromatch/picomatch@2.3.1...2.3.2) --- updated-dependencies: - dependency-name: picomatch dependency-version: 2.3.2 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
…yarn-66413a1f6e Bump picomatch from 2.3.1 to 2.3.2 in the npm_and_yarn group across 1 directory
Add GitHub release step after npm publish
Implement GitHub release workflow
Fix syntax for version tag in CI workflow
Bumps [solid-ui](https://github.com/SolidOS/solid-ui) from 3.0.5 to 3.0.6. - [Release notes](https://github.com/SolidOS/solid-ui/releases) - [Commits](SolidOS/solid-ui@v3.0.5...v3.0.6) --- updated-dependencies: - dependency-name: solid-ui dependency-version: 3.0.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…-3.0.6 Bump solid-ui from 3.0.5 to 3.0.6
Bumps the npm_and_yarn group with 1 update in the / directory: [@xmldom/xmldom](https://github.com/xmldom/xmldom). Updates `@xmldom/xmldom` from 0.8.11 to 0.8.12 - [Release notes](https://github.com/xmldom/xmldom/releases) - [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md) - [Commits](xmldom/xmldom@0.8.11...0.8.12) --- updated-dependencies: - dependency-name: "@xmldom/xmldom" dependency-version: 0.8.12 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
…yarn-282a1442c2 Bump @xmldom/xmldom from 0.8.11 to 0.8.12 in the npm_and_yarn group across 1 directory
Updated Node.js version in CI workflow from 22 to 20.
Change Node.js version to 20 in CI workflow
Bumps the npm_and_yarn group with 1 update in the / directory: [@xmldom/xmldom](https://github.com/xmldom/xmldom). Updates `@xmldom/xmldom` from 0.8.12 to 0.8.13 - [Release notes](https://github.com/xmldom/xmldom/releases) - [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md) - [Commits](xmldom/xmldom@0.8.12...0.8.13) --- updated-dependencies: - dependency-name: "@xmldom/xmldom" dependency-version: 0.8.13 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com>
…yarn-0a68a62365 Bump @xmldom/xmldom from 0.8.12 to 0.8.13 in the npm_and_yarn group across 1 directory
milestone3m v3.1.0
Contributor
Author
|
taken in milestone3m. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: SolidOS/solidos#244
Tested in solid-panes using local source-pane.