01-25-2025, 01:54 PM
Yes, thanks for explaining how the new editor works in the local browser. If I would encounter again performance bottlenecks while editing, then I will know that it is not a bad Internet connection nor some server thingy at phyphox.org, it will be a problem on my local computer (while having 2 browser instances with 30 tabs open at the same time and the OS is trying to apply some eco mode stuff and the browser itself wants to unload some tabs ... too many smart players involved). This understanding helps in more quickly finding the root cause of such probelms and avoiding frustration because of not knowing what's really going on.
Speaking of browsers ...
I started to edit directly the XML files in a simple text editor and, of course, introduced some error (example: forgot to define a container that was used in the analysis). When loading that invalid Phyphox file to the new editor, there was apparently no error message, only thing I noticed was that the corresponding editor tab was just empty (in this case the Analysis tab). Apparently the editor tab understood that something was wrong, because it was not displaying anything. I just was puzzled because of the empty screen. Some kind of error message would have helped. Took a while to figure out the root cause.
I was wondering about the many empty lines in my experiment's multiline description until I found the pattern behind this: when saving and reloading an experiment the description was getting longer and longer. Since this is about white spaces, kindly select the code examples to see what I want to show: with each load/save cycle an additional line with 2 spaces and a return seems to be introduced (not sure if you can notice the 2 space characters when displaying the code examples in this post, but in the forum editor the extra lines look for me this way:
"
" = <space><space><return>).
Save experiment with a simple multiline description "Test<return key on your keyboard, whatever actual character this would introduce, newline, linefeed, or carriage return, have not checked>" (in this example the second line of the multiline description is just an empty line).
Load the saved experiment again (notice new number in file name), you get then:
Repeat this cycle and you get:
Same behavior also when the second line is not empty but comes with some text (my original case which I don't show here).
Has not happened for a single line description like this:
Speaking of browsers ...
- I believe it is not possible to load the same XML file again to the editor. After loading an older experiment I continued to work on it, but then noticed that I would go coding-wise in the wrong direction and I decided to start over (whithout saving my changes) by just loading the same XML file again. The editor was not coming back from the load popup und I needed to close that popup to continue with the editor. While loading the same file again was not working, it is perfectly working to load another file (name) into the editor and overwriting this way the unsaved changes. Maybe there could be some kind of warning when loading a new file while there are unsaved changes to the current experiment in the editor. Maybe there is already such a check for unsaved changes, but only in case the same file name should be loaded again and this freezes the load popup. Ah, I used Edge on Windows with the file selection popup ... but with drag and drop it is the same behavior. My workaround for loading the same file again was:
- To skip any changes to the currently loaded experiment and to load the same XML file again I just delete the whole browser cache and reload the editor from its source at https://phyphox.org/editor/neweditor/ ... and because I'm already anticipating your comment on my workaround I was just trying out for the very first time the reset button in the editor. Works nicely, no workaround needed any longer.
(But the reset does not reset the old file name at the load popup, which still is being displayed despite the fact that after the reset no experiment is being loaded. Ok, the file name displayed at this popup is not the currently loaded file, but it is just a history record to show the file that has been loaded most recently independent from if it is still being loaded or not.)
- To compare two experiments I was using until now two different browsers, Firefox and Edge, in the assumption that their caches would not have any impact on each other. Would it be possible to also load two experiments into the same browser instance? Even if I load in Edge the new editor via "Start the editor" at https://phyphox.org/editor I get the same experiment displayed I already have opened in the other Edge tab. I see only a difference at the load popup: at the old tab the loaded file name is being displayed whereas at the load popup in the new tab I see "No file selected" (or whatever the correct translation into English language would be, I get the text displayed in German language). When I start editing the experiment in one tab the changes are not visible immediately at the other tab, but they become visible at the other tab when I reload the other tab. This indicates that it is not possible to work on two different experiments in the same browser. When loading a new experiment to a second tab and then reload the first tab I get the newly loaded experiment also in the first tab. But the same is not true for the displayed loaded file name at the load popup, indicating that there are possibly some tab specific data stored in the cache whereas other data is shared between tabs. For static experiment comparison it might work using the same browser (without any tab reloads), but when additionally changing one experiment at the same time, no, this would be too risky for me and I would use two different browser brands that don't do cache sharing. Maybe by introducing some tab specific keys at the chaches it would be easily possible to work independently on two experiments in the same browser.
I started to edit directly the XML files in a simple text editor and, of course, introduced some error (example: forgot to define a container that was used in the analysis). When loading that invalid Phyphox file to the new editor, there was apparently no error message, only thing I noticed was that the corresponding editor tab was just empty (in this case the Analysis tab). Apparently the editor tab understood that something was wrong, because it was not displaying anything. I just was puzzled because of the empty screen. Some kind of error message would have helped. Took a while to figure out the root cause.
I was wondering about the many empty lines in my experiment's multiline description until I found the pattern behind this: when saving and reloading an experiment the description was getting longer and longer. Since this is about white spaces, kindly select the code examples to see what I want to show: with each load/save cycle an additional line with 2 spaces and a return seems to be introduced (not sure if you can notice the 2 space characters when displaying the code examples in this post, but in the forum editor the extra lines look for me this way:
"
" = <space><space><return>).
Save experiment with a simple multiline description "Test<return key on your keyboard, whatever actual character this would introduce, newline, linefeed, or carriage return, have not checked>" (in this example the second line of the multiline description is just an empty line).
Code:
<description>Test
</description>
Load the saved experiment again (notice new number in file name), you get then:
Code:
<description>Test
</description>
Repeat this cycle and you get:
Code:
<description>Test
</description>
Same behavior also when the second line is not empty but comes with some text (my original case which I don't show here).
Has not happened for a single line description like this:
Code:
<description>Test</description>