Added just the dev environment in this branch#128
Added just the dev environment in this branch#128SharonStrats wants to merge 30 commits intomainfrom
Conversation
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>
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>
There was a problem hiding this comment.
Pull request overview
This PR adds a webpack-based dev environment and build pipeline for the source-pane project, refactoring from CommonJS to ES modules and migrating inline styles to CSS classes.
Changes:
- Added webpack configs (dev + production) with babel, CSS loaders, and a dev server, plus a
dev/folder with an HTML harness for local development. - Converted
src/index.jsfrom CommonJS (require/module.exports) to ES modules (import/export default) and replaced inline style manipulation with CSS class-based visibility/state management. - Updated Jest config and test helpers to mock
solid-ui,rdflib, and CSS imports, removing the directsolid-logicdependency from tests.
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
webpack.config.mjs |
Production webpack config with UMD output (normal + minified) |
webpack.dev.config.mjs |
Dev webpack config with dev server and polyfills |
webpack.module.rules.mjs |
Shared webpack module rules for JS, CSS, and TTL |
babel.config.mjs |
Babel config with preset-env and TTL inline-import plugin |
src/index.js |
Converted to ES modules; replaced inline styles with CSS classes |
src/styles/sourcePane.css |
New CSS file for source pane styling |
package.json |
Updated main entry, added build/start scripts, new dev dependencies |
jest.config.mjs |
Updated module name mappings for mocked dependencies |
test/sourcePane.test.js |
Updated import for ES module default export |
test/helpers/setup.js |
Replaced solid-logic store with rdflib graph directly |
test/helpers/solidUiMock.js |
New mock for solid-ui widgets/icons/ns |
test/helpers/rdfMock.js |
New mock re-exporting rdflib |
test/helpers/styleMock.js |
Empty mock for CSS imports in tests |
dev/index.html |
Dev server HTML template |
dev/index.js |
Dev server entry point rendering the pane |
dev/context.js |
Dev context object (unused by dev/index.js) |
dev/dev-global.css |
Global CSS variables and resets for dev environment |
.gitignore |
Added lib directory to gitignore |
Comments suppressed due to low confidence (1)
src/index.js:159
contentType.split(';')returns an array (e.g.,["text/turtle", " charset=utf-8"]), and using it as an object property key coerces it to a comma-joined string like"text/turtle, charset=utf-8", which will never match the keys incompactable. This should becontentType.split(';')[0]to extract just the MIME type, consistent with how it's done on line 360 of this file.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
344d5d2 to
25a3950
Compare
timea-solid
left a comment
There was a problem hiding this comment.
@SharonStrats you have more than teh dev en in this PR.
Also a remark, try, in general, on all repos, not to rename src/sourcePane.js src/index.jssrc/sourcePane.js renamed to src/index.js
|
@timea-solid Sorry I'm not sure I understand. I thought we wanted to have an index.js in each repo? I should rename back to source pane.js? |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
I've removed the non dev environment code from this PR. |
I separated out the dev environment work as it wasn't part of the grant.