StefanSchippers / xschem

A schematic editor for VLSI/Asic/Analog custom designs, netlist backends for VHDL, Spice and Verilog. The tool is focused on hierarchy and parametric designs, to maximize circuit reuse.
Other
318 stars 21 forks source link

propose to change Configure simulators and tools button default behavior in src/xschem.tcl #154

Closed cnMuggle closed 9 months ago

cnMuggle commented 9 months ago

Reason for the proposal: It feels really strange to me when Accept and Close button doesn't save the setup into file by default. It means if I don't click the save configure to file button before 'Accept and Close', all the changes I made will lost. So I add the save to file feature into the 'Accept and Close button' and also change the text description.

I will keep this open for a few days, feel free to ignore/dislike it. I can pull it back.

  1. change 'Accept and close' button to save changes into file and then close. a. remove the original behavior to keep the change in the memory and lose it if the dialog is closed b. change the button name slightly from 'Accept and close' to 'OK and Close'
  2. change button name from 'Save Configuration to file' to 'Apply (Not Close)'

eventually, the button name can be simplified to 'OK' and 'Apply'

image

image image

StefanSchippers commented 9 months ago

This will break the ability to make non-persistent changes to the simulation commands, this was an explicit request from other users. In many cases you want to test different options to the simulator and make experiments but do not want to mess up the saved settings, My counter proposal is to change the button names and functions to make it more clear:

1

I have made a commit to implement the above changes, please have a look. Happy new 2024!

cnMuggle commented 9 months ago

Thank, Stefan for your reply.

It's glad to know the reason why it's designed in this way but not the other way. I think it's more about personal preference and hence I will pull this request back.

Here is a few arguments that I want to express:

  1. When the button name has 'no save', I am confused why it's "not saved". Even though what it actually mean is that the setup is saved in memory but not in file. Then I would argue why not give a name like "Accept, save to memory and Close", however, that name is too long. It also request user to be familiar with a computer concept of save to memory or save to file/disk. From the GUI perspective, I personally feel it's not necessary. If I want to debug on that level whether the change made will mess up with the saved setting, I will back up my setting first. I worry more about my setup is lost. We cannot guarantee the program won't crash suddenly but the change has not been saved. Unfortunately, that's how the 'Accept, not save and close' button behave.
  2. I am so used to the way how "OK" and "Apply" works for me in Cadence Virtuoso. And I agree with this part of GUI design philosophy (I really don't like its GUI response speed but there are still many good practice that the Cadence virtuoso has) The biggest fear I have is that something I did is not saved (as the 'OK, not save and close' button does, it only saves to memory). So I always look for a button to save my changes to file while I want to view the changes again before I click OK to close the window or just OK to save to file and close. So, I still prefer 'OK' and 'Apply'. It's just like we are both used to Ctrl+C for copy in Windows GUI but the Linux cmd use Ctrl+C to terminate program. Again, I think that's personal preference :)
  3. the original name of "Save Configuration to file" give me an impression that another pop up window will shows up for me to give a filename path to save my configuration. It's until I read the HELP, I realized it's automatically saved to ~/.xschem/simrc. So this change is definitely appreciated. But, I still think we should have a button like 'Apply' or the original 'Save configure to file' does that it save the change to file but doesn't close the pop up windows for user to view their changes. Right now, the way how 'Accept, Save and Close' and 'Accept, no Save and Close' work, cannot provide that behavior.
  4. on tcl script side, the biggest lesson learnt I have is that to use "" to include the command for -command. It takes me quite a while to figure out how to put "simconf_saveconf $scrollframe" work together with { set_sim_defaults destroy .sim xschem set semaphore [expr {[xschem get semaphore] -1}] }

Lastly, since the xschem.tcl file is kept after the installation in share/xschem/xschem.tcl. I think leaving it for CAD/individuals to customize is totally fine.

Happy New Year too.