Skip to content

Refactor styles to CSS plus dev env to test#126

Open
SharonStrats wants to merge 19 commits intomainfrom
refactor/styles-separateCSS
Open

Refactor styles to CSS plus dev env to test#126
SharonStrats wants to merge 19 commits intomainfrom
refactor/styles-separateCSS

Conversation

@SharonStrats
Copy link

@SharonStrats SharonStrats commented Mar 13, 2026

Ticket: SolidOS/solidos#244

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.js with CSS class-based styling using a new src/styles/sourcePane.css file
  • 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 the compactable object, so the compact button will always be hidden. This should be contentType.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.

SharonStrats and others added 10 commits March 13, 2026 13:31
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants