Change to inline editing behaviour in Toaster
A few pages in the Toaster build functionality allow you to edit values without refreshing the page. You click a 'change' icon, the item you just selected becomes editable, and you can then amend the value or type a new one, click a 'save' button, and your change will get through your next build. The 'Configuration variables' page behaves this way, and so does the editable layer details page.
The design specs say that such 'save' buttons should be disabled whenever their attached input field is empty. While implementing the project page, however, Alex made a fair point: he enabled the 'save' button only when the value has changed, "to avoid making calls to the backend where nothing changed. The original test was "fieldValue.length > 0"; I changed it to "fieldValue.length > 0 OR fieldValue != newFieldValue".
This is probably a good thing to do, so I think we should apply this across the whole Toaster interface.
Just a heads up, since I know it will impact the work of people implementing the 'configuration variables' and the 'layer details' pages.
Cheers
Belén
Hi,
Just a note - this was implemented in the project page with an ng-disabled tag; obviously this is angular-dependent.
In other pages, we can rely on jQuery's .chage() API, to update the state of the button to "enabled" when the input text is changed. The downside is that the effect is a bit changed, i.e. the button will be updated only after the user has ended editing, and not as soon as the user edits the text. If we want a similar effect, we need to use the .keyup() API.
Hope this helps,
Alex
Quoted 31 lines · Belen
A few pages in the Toaster build functionality allow you to edit values without refreshing the page. You click a 'change' icon, the item you just selected becomes editable, and you can then amend the value or type a new one, click a 'save' button, and your change will get through your next build. The 'Configuration variables' page behaves this way, and so does the editable layer details page.
The design specs say that such 'save' buttons should be disabled whenever their attached input field is empty. While implementing the project page, however, Alex made a fair point: he enabled the 'save' button only when the value has changed, "to avoid making calls to the backend where nothing changed. The original test was "fieldValue.length > 0"; I changed it to "fieldValue.length > 0 OR fieldValue != newFieldValue".
This is probably a good thing to do, so I think we should apply this across the whole Toaster interface.
Just a heads up, since I know it will impact the work of people implementing the 'configuration variables' and the 'layer details' pages.
Cheers
Belén
--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster
Signature · 3 lines
Alex Damian Yocto Project SSG / OTC
Quoted 6 lines · Alexandru
Hi,
Just a note - this was implemented in the project page with an ng-disabled tag; obviously this is angular-dependent.
Quoted 6 lines
In other pages, we can rely on jQuery's .chage() API, to update the state of the button to "enabled" when the input text is changed. The downside is that the effect is a bit changed, i.e. the
button will be updated only after the user has ended editing, and not as soon as the user edits the text. If we want a similar effect, we need to use the .keyup() API.
Let's aim for the Angular behaviour and use keyup then. Consistent control behaviour does wonders for usability.
Thanks!
Belén
Quoted 56 lines
Hope this helps,
AlexOn Tue, Sep 30, 2014 at 10:59 AM, Barros Pena, Belen <[email protected]> wrote:
A few pages in the Toaster build functionality allow you to edit values without refreshing the page. You click a 'change' icon, the item you just selected becomes editable, and you can then amend the value or type a new one, click a 'save' button, and your change will get through your next build. The 'Configuration variables' page behaves this way, and so does the editable layer details page.
The design specs say that such 'save' buttons should be disabled whenever their attached input field is empty. While implementing the project page, however, Alex made a fair point: he enabled the 'save' button only when the value has changed, "to avoid making calls to the backend where nothing changed. The original test was "fieldValue.length > 0"; I changed it to "fieldValue.length > 0 OR fieldValue != newFieldValue".
This is probably a good thing to do, so I think we should apply this across the whole Toaster interface.
Just a heads up, since I know it will impact the work of people implementing the 'configuration variables' and the 'layer details' pages.
Cheers
Belén
--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toasterSignature · 4 lines
Alex Damian Yocto Project SSG / OTC