Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate renderer to solidjs #1664

Merged
merged 4 commits into from
Mar 26, 2024
Merged

feat: migrate renderer to solidjs #1664

merged 4 commits into from
Mar 26, 2024

Conversation

skokenes
Copy link
Contributor

@skokenes skokenes commented Mar 15, 2024

Migrates majority of malloy-render from Lit to SolidJS.

The final output remains the same: a web component called <malloy-render>, with the same API as before. This branch works with the existing VSCode extension as is.

This PR leaves Lit in place for now with the <malloy-bar-chart> component. I have a separate branch that involves a lot of charting changes, so it didn't seem worth it to migrate malloy-bar-chart as is here just to then refactor it in the next PR. That charting PR will handle dropping malloy-bar-chart and Lit and replacing with internal Solid components.

The bundling system has been switched to Vite. The esbuild bundle is still in place because malloy-py relies on it. In a separate PR, I will remove esbuild and its bundle so we will have just one bundled web component exported for all consumers.

For now, building the module source code is done with Vite as well, instead of the tsc approach from before. The reason is due to the need to support importing CSS into CSSStyleSheets. CSS Module Scripts will allow us to import CSS as modules natively; however they are not supported by all browsers nor TypeScript yet. Once supported by TypeScript, we can then revert the module build to just using tsc.

I had to add a jest test setup script for the rendering tests since the tests are run in node and not JSDOM as the environment. We need to come up with a better render testing approach in a separate PR.

@skokenes skokenes merged commit 4f4178c into main Mar 26, 2024
8 checks passed
@skokenes skokenes deleted the render-solid branch March 26, 2024 01:40
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.

1 participant