Homey Community Forum

Better looking and functioning default settings page in documentation

Currently I think the default settings page documentation is seriously lacking.

Take the save method for example:

saveElement.addEventListener('click', function(e) {
    Homey.set('username', usernameElement.value, function( err ){
        if( err ) return Homey.alert( err );
    });
    Homey.set('password', passwordElement.value, function( err ){
        if( err ) return Homey.alert( err );
    });
});

There is no indicator that Homey is busy saving your details nor any type of confirmation that they are saved.
Well, then you could add those yourself, but still no example on how to get a custom translation in a Homey.alert() or any preferred way of doing such things.
This does not help the Athom/Homey user experience much I’d think.

I would expect the save method in the documentation at the very least to:

  1. Include an indicator that settings are being updated

  2. A confirmation that they are updated / saved.

  3. A fallback for when something goes wrong and some promise never resolves so you won’t get stuck in busy updating status.

  4. Promises (callbacks were to be replaced in SDK v3 right?) should be nested or async and await should be used in order to be sure all are executed without errors prior to giving a confirmation that all is saved.

Is this really the best practice Athom wants to give to its developers?

Then there is the layout, in the example there is only one class used, “field row” but that does to say the least, not exactly cause this custom settings page to blend into the rest of the app.
I would at the very least expect the default example to include the styling to make that page blend into the rest of the settings app in the preferred way.

I know this is not the first topic of this sort, but come on, that one was years ago and perhaps I am mistaken but has since really nothing changed?