Refactor styles to CSS plus dev env to test#126
Open
SharonStrats wants to merge 19 commits intomainfrom
Open
Conversation
3 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the source-pane project to move inline styles to CSS classes and sets up a webpack-based build system (previously there was none). It also adds a dev environment with hot reloading for easier testing during development.
Changes:
- Replaced inline style assignments in
src/index.jswith CSS class-based styling using a newsrc/styles/sourcePane.cssfile - Added webpack build configuration (production and dev) with babel, CSS loaders, and UMD output
- Added a dev server environment (
dev/) for local testing with Solid login support
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/index.js |
Converted from CommonJS to ESM, replaced inline styles with CSS classes, restructured DOM elements with proper <td> cells |
src/styles/sourcePane.css |
New CSS file containing all extracted styles for the source pane |
webpack.config.mjs |
New production webpack config producing both minified and unminified UMD bundles |
webpack.dev.config.mjs |
New dev webpack config with dev server |
webpack.module.rules.mjs |
Shared webpack module rules for JS, CSS, and TTL files |
babel.config.mjs |
New babel config targeting modern browsers with TTL inline import support |
package.json |
Updated main entry, added build scripts, added webpack/babel/CSS dev dependencies |
.gitignore |
Added lib build output directory |
dev/index.js |
New dev entry point for testing the pane locally |
dev/index.html |
New dev HTML template |
dev/dev-global.css |
New dev-only global styles mimicking the mashlib environment |
dev/context.js |
New dev context helper (unused by dev/index.js) |
Comments suppressed due to low confidence (1)
src/index.js:159
contentType.split(';')returns an array (e.g.['text/turtle', ' charset=utf-8']), which when used as an object property key gets coerced to a comma-joined string like"text/turtle, charset=utf-8". This will never match any key in thecompactableobject, so the compact button will always be hidden. This should becontentType.split(';')[0]to extract the base content type.
💡 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.
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>
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