Giter Site home page Giter Site logo

Comments (10)

ghys avatar ghys commented on June 30, 2024

Looks nice!
Do you intend to fork ng-knob? I don't see it having this feature. For a change this significant we would have to come up with a way to keep forked external dependencies manageable.

I don't necessarily mind the new tab too much but I still tried to limit them because on devices in portrait mode it would wrap to a second line (which is ugly).

from org.openhab.ui.habpanel.

isigmund avatar isigmund commented on June 30, 2024

@ghys I have forked ng-knob and added the functionality to color the valueBar and the text according to the value. I will crate a PR after it's completely done. So I was thinking after that pull request to ng-knob has been integrated we can refer to the newer version that has then the ranges functionality. Wouldn't that work ?

Here is how the definition of the ranges does look like in the ng-knob (its almost finished, I am just not done yet to color the tron bar according to the ranges):
image

from org.openhab.ui.habpanel.

isigmund avatar isigmund commented on June 30, 2024

In regards to the additional tab. Technically the ranges belong to the bar, but the bar tab already has a lot of color setting which makes it quite big already. If I add the ranges there we would have even more color settings. That was the reason for me to decide for an additional tab.
Another option would be to use a bootstrap "well" control to display the color and clicking on the well would open the color settings you already use in an additional dialog. This would have the benefit that all other setting dialogs that have color settings would become smaller as well (no scrolling on smaller screens).
Let me know what you thing about this.

from org.openhab.ui.habpanel.

isigmund avatar isigmund commented on June 30, 2024

I am done with my changes on ng-knob and issued a PR. Hope this will be merged soon.
If you want to see it in action please visit https://isigmund.github.io/ng-knob/

from org.openhab.ui.habpanel.

ghys avatar ghys commented on June 30, 2024

Cool. I myself needed to fork it to add an "onEnd" callback and it never got merged - see the bower file actually points to my fork. Seems like @RadMie is not working actively on ng-knob anymore.

Since my change is necessary for HABPanel, and my fork is the one used as the bower dependency, if you don't receive a response from upstream I guess you could submit the PR to my repository instead.

from org.openhab.ui.habpanel.

isigmund avatar isigmund commented on June 30, 2024

@ghys I was finally able to complete the development for the color ranges of the knob widget. I am ready to create the PR but I first wanted to discuss the settings UI with you to see if you agree.
So first here is how some example knobs looks like with the color ranges:
image

The settings dialog for the ranges looks like this:
image

The first checkbox enables or disables the ranges. The second one does control if the text color should match the bar or of if it should just use the text color set on the Misc tab. I was thinking to move the + Button to the bottom of the accordeon since the normal flow is probably to create one range after the other and the button at the bottom prevents he user from having to scroll all time

For each range the accordeon shows this:
image

I have by purpose added a text field for the color in addition to the color picker. This adds the possibility to set other colors as the webcolorpicker allows. With this its possible to create nice gradients like in the second example above.

Let me know what you think....

Take care
Ingo

from org.openhab.ui.habpanel.

ghys avatar ghys commented on June 30, 2024

Hi @isigmund
Sorry for not responding sooner, I wasn't much available this weekend. 😉
Your PR is looking great! I also had the same idea about the color pickers (allowing a text entry option) actually, so it's something that could even be included in the color picker directive itself and be available everywhere.

I'll take a closer look at it ASAP and it's going to be merged in the next few days.
Thanks!

from org.openhab.ui.habpanel.

isigmund avatar isigmund commented on June 30, 2024

Closed with PR #102

from org.openhab.ui.habpanel.

LeDumpier avatar LeDumpier commented on June 30, 2024

Hi @isigmund

Great looking widget thanks.

Would you mind posting the colour values for the blue-to-red temperature widget as per your example?

image

Many thanks in advance,

Craig

from org.openhab.ui.habpanel.

isigmund avatar isigmund commented on June 30, 2024

from org.openhab.ui.habpanel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.