JuliaPluto / PlutoUI.jl

https://featured.plutojl.org/basic/plutoui.jl
The Unlicense
299 stars 54 forks source link

[FR] Update default value to current value #214

Open KronosTheLate opened 2 years ago

KronosTheLate commented 2 years ago

I have made a certificate generator for a customer with a BUNCH of in-data fields. When the customer changes what certificate they generate, they want to change the default values of e.g. where the data is located, so that is stays until next time.

A key point is that the customer does not know how to program, and should be shielded from code as much as possible.

The current duct-tape fix has been to create a cell with exposed code defining default values so that the customer does not have to look inside the string-interpolated @bind commands to change defaults.

It would be EXTREMELY useful in this case to have a button that said "Change default value to current value". Having such a button that applied to all fields would be the bee's knees.

fonsp commented 2 years ago

Hey @KronosTheLate ! Our plan for this use case is https://github.com/fonsp/Pluto.jl/pull/1551 , where the value of a bond is stored as Julia code in the file, making it persistent. This PR might be done before 2023, but no promises 🙈

fonsp commented 2 years ago

If you're happy with some hacking, and you know JavaScript, then take a look at https://fonsp-disorganised-mess.netlify.app/editme.html (permalink https://github.com/fonsp/disorganised-mess/blob/a1052388a4707fc61247f30a2c33f567e03edc33/editme.jl )