toorshia/justgage

Discussion: Lit-Element for Justgage

robertsLando opened this issue · 11 comments

Hi @toorshia and @deezone, I have found this interesting project on github that uses Lit-Element that is

A simple base class for creating fast, lightweight web components

It is really interesting because it allows to write really clean code for web components and maybe could allow us to also remove Raphael as dependence.

Any thoughts about it? The example I have linked shows a round slider that is not so far from this.

Hey @robertsLando. Thanks for researching into this. I like the idea of removing Raphael as a dependence. I am wondering if Lit-Element can provide us with the drawing features Raphael does? Can you research into pros/cons? I totally support this initiative, unless it limits us in achieving stuff from roadmap for 2.0, and future developments.

@robertsLando did you see the demo that @robertsLando is pointing to: https://github.com/thomasloven/round-slider

In effect, the demo shows how Lit-Element supports SVG (https://www.w3.org/Graphics/SVG/). You can see the setup here:

import {
  LitElement,
  html,
  css,
  svg,
} from "lit-element";

https://github.com/thomasloven/round-slider/blob/master/src/main.js#L1-L6

And where the magic happens:
https://github.com/thomasloven/round-slider/blob/master/src/main.js#L295-L336

Looks great to me!

Ooops, I flagged @robertsLando when I meant @toorshia :)

What are your thoughts on my comments @toorshia ?
#333 (comment)

@deezone just saw it, I see in example he wrote his custom "renderArc" method, right? Does this mean we would have to re-create all the drawing methods rom Raphael we are currently using?

Allrighty then, let's start a dev branch for LitElement! 👍 @robertsLando can you take a crack at this?

Whatever you say, chief. You're the engineering brains around here :)

Unfortunally now I would not have much time to spend on it because I have many others repo to keep updated, I'm focusing on fixing bugs/compatibility issues but no time for new features/projects right now. Let's keep this open for the future, I would be glad to implement this :)

Sure thing 👍:)