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

Smithy Roadmap #2

Open
rbalicki2 opened this issue Mar 27, 2019 · 0 comments
Open

Smithy Roadmap #2

rbalicki2 opened this issue Mar 27, 2019 · 0 comments

Comments

@rbalicki2
Copy link
Owner

rbalicki2 commented Mar 27, 2019

This issue is where I document specific aspects of Smithy I would like to improve. If you have questions, please open a new issue!

Make Smithy generic

  • Make Smithy generic over Event, Dom and Node type
  • For example, mount can have the signature
fn mount<Node: 'static, Event, Canvas>(
  mut app: Box<dyn Component<Node = Node, Event = Event, Canvas = Canvas>>,
  mut el: Canvas,
) where
  Event: CanRegisterWith<Canvas> + 'static,
  Canvas: CanPaint<Node> + 'static,
{

(though I think we can improve upon this, as there should only be two free type variables.)

  • Follow up: Derive CanRegisterWith<HtmlElement> for an enum of events, where which events are included is set via crate features.
  • Follow up: Make Smithy work with another Canvas, e.g. TUI

Alternative lisp-like syntax

  • The Smithy engine (i.e. the glue code that manages your component lifecycle) and the macro syntax (smd!(...)) are decoupled
  • Make an alternative macro that works like
rsx![(
  div
  { attribute: "value" }
  { on_click: |_| count += 1 }
  ["current count ", count]
)]
  • Priority: Low
  • Status: Work ongoing

General areas of improvement

  • Decrease file size
  • Compile on stable
  • Stability and introspection
  • Fail gracefully, e.g. if DOM is modified
  • Audit memory leaks, and prevent them if possible
  • Better error messages
  • Better documentation

Specific improvements

  • Loosen restrictions on interpolated variables
  • Tests of Smithy, not of just smd!
  • Derive Component for more types
  • Organize feature flags sanely
  • Do not use thread_local!, but create instances in mount
  • Allow for multiple Smithy apps on the same page
  • Handling spacing after interpolated variables correctly
  • Ensure that the local cache works on windows (or remove the local cache?)
  • Catalog nightly features in use by smithy.
  • Upgrade to the latest nightly
  • Re-do the existing smd! parser
  • Remove ref section if there are no ref's in an smd! node
  • Benchmark performance
  • Sanitize input

NOTE: if you have questions, please file new issues

Repository owner deleted a comment from TitanThinktank Sep 1, 2019
Repository owner deleted a comment from TitanThinktank Sep 1, 2019
Repository owner deleted a comment from TitanThinktank Sep 1, 2019
Repository owner locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant