openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
218 stars 239 forks source link

Volunteering to update HABPanel web frontend... #560

Open cajones314 opened 3 years ago

cajones314 commented 3 years ago

Which UI are you reporting an issue for?

The problem

HABPanel is currently using Angular 1.5.9 which is over four years old. The code is not written in Typescript and isn't positioned to benefit from the improvements that have been made to Angular over the years.

Your suggestion

I want to get permission to refactor the Frontend for HABPanel, and before beginning any work, I would like to get feedback from @ghys and any other openHAB developers.

I propose that one of the following is done with the FrontEnd:

I would volunteer to do the heavy lifting. I have been developing primarily in React for the past several years, but before then used Angular extensively. My preference would be React, but I am willing to do in either framework.

Your environment

N/A

Additional information

Roadmap

  1. Convert/Upgrade to community decided Framework
  2. Depending on Framework, convert from Javascript to Typescript
  3. Implement Material
  4. Redesign Widget Gallery, and types of widgets supported to use Material
  5. Streamline OH event processing on frontend to be fine grained, instead of its current coarse grained approach
ghys commented 3 years ago

Many thanks for volunteering @cajones314!

My concern with this approach of "updating" HABPanel, with the extent of what you're proposing, is that it would be a completely different app, which would have absolutely nothing to do with the current HABPanel anymore.

As you know there are many people who have invested time in developing widgets, panels etc. and a complete overhaul is not likely to be backward compatible. So instead of superseding the current version with a completely different and incompatible rewrite, maybe it would be better to start working from scratch on that other app, call it something else, and offer it in parallel to the current HABPanel. I can assure you that a good well-written tablet UI will have its place as an official new UI in the distribution. I have no preferences wrt. frameworks and languages used to write these apps, as long as you're willing to maintain it long-term. Another suggestion, of course, would be to contribute to the main UI that will ship with openHAB 3.0 and add the features you're missing.

HABPanel had a good run, but I'm ok with considering it "legacy" and eventually remove it from the distribution when the time is right - perhaps in openHAB 4.0? -, if and when an eventual new app gains more traction and next to nobody uses it anymore.

IMHO there would be less confusion that way.

About AngularJS being stuck to 1.5.x - it's the last version with the "expression sandbox" which I wanted to keep, 1.6 and up removes it and all expressions are evaluated directly, which I didn't like from a security perspective (even if the sandbox wasn't bulletproof).

Let me know what you think, and again, thanks for stepping up!