Announcement

Collapse
No announcement yet.

I miss the old PageBuilder stuff

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • dmurphy
    replied
    Seems to me learning bootstrap would be a good use of time while I wait for hs4.2 pdk.

    came across this..... https://www.w3schools.com/bootstrap4 Lots of online examples to play with.

    regarding pinegrow seems like $12/month after 7day free trial...I won’t need it much has anybody tried other alternatives?

    Leave a comment:


  • dmurphy
    replied
    salvesen what did you have to change?

    Leave a comment:


  • salvesen
    replied
    I managed to get it working by modifying the samples.

    Leave a comment:


  • salvesen
    replied
    Originally posted by mnsandler View Post
    have you tried the sample vb.net plugin. it has a working example
    I have checked the sample C# plugin. Looks like it is similar to the VB one. Still I am not getting PostBackProc to trigger in my plugin with the simple code above.

    Leave a comment:


  • mnsandler
    replied
    have you tried the sample vb.net plugin. it has a working example

    Leave a comment:


  • salvesen
    replied
    Anyone figured out this yeat? :P Just started working on feature pages, and oh man it is frustrating. Trying for the bare minimum of triggering postbackproc with button. But I cant get it to work. Any help would be highly appriciated!

    HTML Code:
    
    <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!--This maintains the scale of the page based on the scale of the screen--> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="author" content="HomeSeer Technologies"> <!--This liquid tag loads all of the necessary css files for HomeSeer--> {{includefile '/bootstrap/css/page_common.css'}} <title>Sample Blank Feature Page</title> </head> <body class="body homeseer-skin"> <!--These liquid tags add the HomeSeer header and navbar to the top of the page when appropriate--> {{includefile 'header.html'}} {{includefile 'navbar.html'}} <!--Primary container for the page content The .container class ensures the page content is fit and centered to the screen--> <div class="container"> <!--This is an intentionally blank page that you can use as a blueprint to create feature pages from--> <button type="button" class="btn btn-default" action="button_press">Save</button> </div> <script> $(document).on('click','button', {} ,function(e){ var data; $(this.attributes).each(function() { var parts = this.nodeName+"="+this.nodeValue; if(data==null) { data = parts; } else { data = data+"&"+parts; } }); var fdata = $(this.form).serialize(); if(fdata != null) { data = data+"&"+fdata } AjaxPost(data,"teslaSeerTest/blankTest.html"); }); </script> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> {{includefile 'bootstrap/js/page_common.js'}} </body> </html>
    Code:
    public override string PostBackProc(string page, string data, string user, int userRights) { HomeSeerSystem.WriteLog(HomeSeer.PluginSdk.Logging.ELogType. Error, "Postback: ", Name); return ""; }

    Leave a comment:


  • Michael McSharry
    replied
    I find HS4 and its SDK to be a step up from HS3, but it has taken a lot of time to start to get my head around it. The bootstrap tutorial is actually quite good.

    There is more focus on client-side operation in HS4 to make the UI compatible with a variety of clients. This part did not exist in HS3. I had always liked tight presentation to fit as much in a small space as I could. With the HS4 views the layout is more spread out to better accommodate fat fingers. What had fit nicely on a standard monitor now needs scrolling to see the entire page.

    The Actions and Triggers are much easier in HS4 than they were in HS3. I left these to last as they looked to me to much different than what I had in HS3 and I wanted to take smaller bites at the start. It may have been easier to start with them. I suspect, however, that they were only easy because because I did my learning in other areas first.

    The PageFactory and general setting of devices/features/VSP/VGP is a little different, but the conversion is easy once you get the hang of it. I have not benchmarked yet, but I am concerned that device-oriented operations will be slower in HS4 as the option no longer exists to used the cached device. Each update needs to remote to get a new copy of the device property. I also had many times were I updated a set of properties of a device at one time before saving the device, but now each property needs to be updated individually.

    The Hubitat plugin was pretty small, had minimal dependence on the UI and a limited set of Device/VSP types of needs. That one got the brunt of the basic learning curve of using the new SDK.

    mcsMQTT is a different story. It is heavy in the UI, does multiple Actions and Triggers, and makes extensive use of Device-oriented methods. It has been about a month of focused development to do its conversion. As I indicated earlier in this thread I wanted to have minimum change in the UI as all the client side logic was complex and too easy to break it with a new design. From the developer side it looks much like the jQuery but bootstrap styling rather than jQuery styling was used to construct each control/view.

    On the journey I have submitted 20 or 30 issues to GitHub. For most I worked around the problems. For some it will result in a plugin limitation until the bug is fixed. Initially I could not determine a bug vs. a lack of understanding. This was the time when I made most use of this forum.

    Both Hubitat and mcsMQTT for HS3 have been in active development during the time I was doing the HS4 port. This meant I had to update both sets of source code to keep the plugins in sync. There is no hope for having a single code base for these two. I am still hoping that I can keep mcsSprinklers with a single code base as I have done since the original standalone and HS1 versions. I have not cracked the book open on this one, but will be doing it soon now that the other two have been completed.

    I will likely go back at some point in the future and make some design changes now that I have a better understanding, but what does exist now is totally acceptable and are going into the HS4 updater.

    Leave a comment:


  • chrisgo
    replied
    I get the frsutration on this thread. HS4 sounded like an incremental update but it's not. It's a total rewrite of the UI which impacts every bit of the product including our plugins.

    To the end user, sure it's a new interface. To the devs, a steep learning curve...

    ​​​​​​I agree with the strategy to abstract the code from the the HTML. I also agree with the approach to use published standards, for example bootstrap, which I'd never heard of before getting involved with HS4 (I am not a pro dev).

    For me, it's an old dog learning new tricks. Luckily I revel in the weeds so it's all just exciting. I do get the pain though.

    ​​

    Leave a comment:


  • alexbk66
    replied
    Originally posted by kriz83 View Post
    I agree with alexbk66 here. This should not be our problem. All the necessary tools/frameworks/documentation should be provided for the developers. I have the feeling we need to spent way too much time on this. The time vs revenue was not really high, but this the step to HS4 makes it even lower :-(
    The idea of HS4 SDK was to make our life easier. But it turns out to be opposite. I created pretty solid framework for HS3 plugins, but now it's a waste and I have to start again.

    Leave a comment:


  • kriz83
    replied
    Originally posted by alexbk66 View Post

    May be you get some vacation or PhD student to do that?
    I agree with alexbk66 here. This should not be our problem. All the necessary tools/frameworks/documentation should be provided for the developers. I have the feeling we need to spent way too much time on this. The time vs revenue was not really high, but this the step to HS4 makes it even lower :-(

    Leave a comment:


  • Michael McSharry
    replied
    I highly recommend you also read through the MDBootstrap documentation as some of the components require initialization using javascript before they will be rendered correctly. For example, select lists must all be initialized with
    I understand the document.ready event as being the trigger for materialSelect() when the page is originally built. What event is raised following an Ajax postback response for the case where a select view is being replaced by an updated select view in the specified div? Is there an event that is raised when a div is updated?

    Leave a comment:


  • alexbk66
    replied
    Originally posted by rjh View Post
    We have discussed maybe creating some kind of framework to assist but we are bit overloaded at the moment
    May be you get some vacation or PhD student to do that?

    Leave a comment:


  • rjh
    replied
    You only need to know how post a form and we give you the code for most of the code you need. I have some generic functions in the included HTML files that simply post everything from any form. After the post you can simply refresh the page so you don't need to even return anything. I really don't feel that this is much. We give you all the code you need in the current pages.

    But if you are stuck on something, just post and I will do my best to help.

    Leave a comment:


  • alexbk66
    replied
    Originally posted by shill View Post
    When I look at the Chromecast "manage-hubs" page, it uses AjaxPost, but "add-hub" uses $.ajax
    shill where did you find that (Chromecast)?

    Leave a comment:


  • alexbk66
    replied
    Originally posted by shill View Post
    "you better know JavaScript if you want to do anything useful in a plugin page". That last part is the biggest surprise I suspect.
    +1

    Leave a comment:

Working...
X