FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.41k stars 637 forks source link

WebComponents for UI #634

Open ibnesayeed opened 8 years ago

ibnesayeed commented 8 years ago

I was looking at the #608 and thought why should we think about tying it to a specific library why not WebComponents? Additionally, there is the Polymer Project that comes with a handful of pre-existing components developed by Google and other developers parties. If each component is configured to be bound with some sort of data and emit some events/requests, I can think of individual ungit-* components being utilized in Web Apps and orchestrate the whole UI is various ways.

ghost commented 8 years ago

+1

I have been using Polymer for a month. So far i like it. Once you get used to the web components way i found it very productive and easy.

The speed is good now. Version 0.5 had speed issues.

The encapsulation is great, with a standard way to communicate across components. https://elements.polymer-project.org/elements/iron-signals

It would also allow other developers to help on the GUI, because the way the project is structured and developed is highly transparent

jung-kim commented 8 years ago

I'm very exited about Polymer, although I have my own questions and doubts about them as well. In fact, Polymer is the reason why I didn't start with React despite how strongly it is endorsed. However, two features I'm most exited about Polymer are HTML Imports and Shadow dom and they are not supported outside of chrome at all. And in fact, I don't know if it will ever be supported for IE or Safari unless Polymer API becomes standardized by w3c.

I guess what I'm saying is that is to early for a product to adopt to it, at least that is how I feel. But I will fully endorse ones effort to develop and it will be really cool to see it.

ibnesayeed commented 8 years ago

Polimer API does not need to be standardized by W3C, it is the Custom Elements, HTML Imports, Shadow DOM, and Templates that need to be standardized and they already are, it's just that browsers are now catching up the recommendations in their implementations. Polymer is just a library that leverages these capabilities when available, and provides polyfills to support many of the rest.

When it comes to the browser compatibility, I assume that the user base of Ungit consists of mostly developers, who have pretty good sense of what a modern browser is and what should they be using for development.

ghost commented 8 years ago

@codingtwinky Yep i agree with @ibnesayeed.

In fact i went through the same react or polymer thinking process. I did one project with react, and now 2 with polymer. I would choose Polymer for classic web apps, and React for graphics intensive stuff.

There is nothing stoping using Polymer for everything, and using all the existing Web API used. I do think that writing the Branching UI can be done reasonably easily because of the flexbox build into Polymer. Its takes a bit of getting used to, but one there i have had it work across all mobiles and desktops. Really make it much easier than wrestling with lots of CSS, DIvs, etc.

The thing will be to find a Polymer component that does some similar things to the current GIT Branch view. It will be a good base from which to extend from. If anyone finds one please post here.

jung-kim commented 8 years ago

Hmm, I guess this is where my lack of knowledge is obvious. If webcomponents indeed have decent cross browser coverage as you suggest, I think it would be great.

Ajedi32 commented 8 years ago

It's not so much that Web Components has good browser support as it is that it has good polyfills: https://github.com/WebComponents/webcomponentsjs#browser-support

I also think there's a lot to like about Web Components, but I'm not really involved with Ungit's internals so I can't really say whether it's something that you'd find worth using or not.

Keep in mind that Polymer and Web Components are not the same thing. Web Components are a standard, whereas Polymer is a library built on top of web components designed to make creating custom elements easier. Just thought I'd point that out, since a lot of people tend to confuse the two.