mavoweb / mavo

Create web applications entirely by writing HTML and CSS!
https://mavo.io
MIT License
2.84k stars 176 forks source link

Do dynamic mv-default properly #100

Open LeaVerou opened 7 years ago

LeaVerou commented 7 years ago

Post-release leftover work from #93

Current behavior: If a primitive's value is the same as its (previous) default when the default changes, then its value will update to the default.

This could be useful in some cases, but really irritating when the elements involved in the default go through a range of values (e.g. spinners and sliders), so it might happen that at some point the value matches randomly, without any actual user intention behind it.

The proper solution is to keep track whether the default is actually used, and only use it in the beginning or when the user deletes the current value.

karger commented 7 years ago

Just checking, but by "default is actually used" I presume you mean the complement of "user has set a non-default value"?

On 12/25/2016 5:29 PM, Lea Verou wrote:

Post-release leftover work from #93 https://github.com/LeaVerou/mavo/issues/93

Current behavior: If a primitive's value is the same as its (previous) default when the default changes, then its value will update to the default.

This could be useful in some cases, but really irritating when the elements involved in the default go through a range of values (e.g. spinners and sliders), so it might happen that at some point the value matches randomly, without any actual user intention behind it.

The proper solution is to keep track whether the default is actually used, and only use it in the beginning or when the user deletes the current value.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LeaVerou/mavo/issues/100, or mute the thread https://github.com/notifications/unsubscribe-auth/ABFpXpDA1lzgQykor4B7dsBf8bdK8SDwks5rLu5RgaJpZM4LVem2.

LeaVerou commented 7 years ago

Well, user has set a value, whether it matches the default or not.