t-oster / VisiCut

A userfriendly tool to prepare, save and send Jobs to Lasercutters
https://visicut.org
Other
235 stars 115 forks source link

Suggest to preserve the user entered text in the JobName TextField #687

Closed jnweiger closed 1 year ago

jnweiger commented 1 year ago

Currently visicut deletes the value, when a) the laser is changed, b) material is changed, or c) the mapping is changed. This makes it tedious, if I want to e.g. laser the same file different mappings, which I frequently do. I'd prefer to just edit the prefix, instead of entering it again in full each time. Preserving the text is also nicer in the case an inexperienced user wants to enter the job name before choosing a mapping.

Also, I suggest to insert a whitespace after the prefix to make it look nicer.

ToWipf commented 1 year ago

That would be really helpful, it happens to me very often that I have to re-enter the text

jnweiger commented 1 year ago

@MaxGaukler @t-oster do you have an opinion about this?

mgmax commented 1 year ago

I don't have time for a full review; here are some first guesses from only looking at the code.

It's not optimal to never reset the field, but certainly better than resetting it way too often. It might, however, be confusing if user A uses VisiCut, sets a name, and then user B goes to the same PC, loads a file into VisiCut and then inherits the same job name. In total it is still better than before.

Looking at the diff: You did something unrelated to LibLaserCut, please revert. Otherwise it should be OK.

Some unrelated notes:

jnweiger commented 1 year ago

Thanks! I fully agree, that the UI is bad there. The generated default string should be always visible. When loading a different file, the field could reset to the filename. That would fix the case when a shared laptop is used without restarting visicut. (Never thought of this case)

There are indeed two extra chunks included: 1) An empty /dev/null LibLaserCut diff. That always seems to happen. I'll try to find out how to avoid this. 2) I am inserting a whitespace between the user-controlled prefix and the internal default, to avoid run-together words that become hard to read. This one I'd like to keep for readability.

Regarding your QR-Code question: Never tried to figure out what it does, nor saw anyone using it.

Half unrelated comment: There is some logic, that tries to use the filename per default. That never worked for me, I always get visicut123 when the job name prefix is empty. Before fixing this, we must make the default visible. It would be even more confusing to the user, to sometimes get visicut... and some other times get part of their filename. Currently it is somewhat reliable that the default job name is visicut plus a number.

jnweiger commented 1 year ago

I've manually restored commit 1a5e5c49c17bd862b63f2234b02edcbd6153cace into the LibLasercut submodule, that seems to help to get rid of the unintended change there.

@t-oster What do you think about resetting the jobname less frequently?

t-oster commented 1 year ago

Hi, I am not actively using visicut at the moment, so if @mgmax agrees, I am fine with it.