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

NPM Module #160

Open
jakiestfu opened this issue Feb 28, 2022 · 4 comments
Open

NPM Module #160

jakiestfu opened this issue Feb 28, 2022 · 4 comments

Comments

@jakiestfu
Copy link

jakiestfu commented Feb 28, 2022

Is your feature request related to a problem? Please describe.
I'm building a music project editor and would love to include Signal as an editor within the page.

Describe the solution you'd like
import { Signal } from 'signal-react'

Additional context
This would require publishing on NPM and including a bundle that doesn't include things like Sentry.

@ryohey
Copy link
Owner

ryohey commented Mar 1, 2022

That's an interesting idea.
Since signal is designed for full screen layout and uses global CSS etc., just publishing on npm may not be enough for embedding.
I thought it would be better if there was a layout for embedding, like CodePen, CodeSandbox, or JSFiddle.
https://blog.codepen.io/documentation/embedded-pens/#example-2

What do you think about that?

@jakiestfu
Copy link
Author

To be a little more specific, I'm building an electron app that already uses Material UI and has its own theme defined. It would play very well with something like Signal, especially considering Signal renders well at most sizes.

Screen Shot 2022-03-02 at 8 26 14 AM

That being said, it can pose an interesting opportunity to expose APIs for controlling things like key bindings and events like onSave, onExport, etc. Even hiding/showing parts of the GUI.

const [project, setProject] = useState<SignalProject>()

<Signal value={project} onChange={setProject} />

At the end of the day, I suppose what I'm looking for is an export that does not include Sentry and simply exports the App/App in a more refined way. Might not need GlobalCSS for example, but I could live with it.

@jakiestfu
Copy link
Author

If you're interested, what I think would be a good first step is looking into GitHub actions that can run a build on push to master and publish to NPM.

@jakiestfu
Copy link
Author

jakiestfu commented Dec 28, 2022

Any thoughts on exposing the midi editor in Signal as a standalone component, @ryohey?

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

No branches or pull requests

2 participants