justgage icon indicating copy to clipboard operation
justgage copied to clipboard

Discussion: Lit-Element for Justgage

Open robertsLando opened this issue 4 years ago • 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.

robertsLando avatar Sep 25 '19 12:09 robertsLando

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.

toorshia avatar Sep 26 '19 12:09 toorshia

@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!

deezone avatar Dec 01 '19 01:12 deezone

Yes it looks amazing, we should also check if it is possibile to get events like Raphael does.

We could start a dev branch with the porting to LitElement?

Daniel

On 1 Dec 2019, at 02:35, deezone [email protected] wrote:

 @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!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

robertsLando avatar Dec 02 '19 08:12 robertsLando

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

What are your thoughts on my comments @toorshia ? https://github.com/toorshia/justgage/issues/333#issuecomment-560037230

deezone avatar Dec 09 '19 04:12 deezone

@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?

toorshia avatar Dec 12 '19 10:12 toorshia

Yes but should not be that hard in my opinion, the only thing I actually don’t know is how to support Raphael events we currently bind too without using Raphael

Daniel

On 12 Dec 2019, at 11:15, Bojan Djuricic [email protected] wrote:

 @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?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

robertsLando avatar Dec 12 '19 11:12 robertsLando

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

toorshia avatar Dec 12 '19 14:12 toorshia

I think that we could start another repo because it would be a complete rewrite, almost everything will change in the code. What about a Justgage2?

Daniel

On 12 Dec 2019, at 15:36, Bojan Djuricic [email protected] wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

robertsLando avatar Dec 14 '19 10:12 robertsLando

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

toorshia avatar Dec 14 '19 22:12 toorshia

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 :)

robertsLando avatar Dec 16 '19 07:12 robertsLando

Sure thing 👍:)

toorshia avatar Dec 16 '19 14:12 toorshia