theRAPTLab / gsgo

GEM-STEP Foundation repo migrated from GitLab June 2023
1 stars 1 forks source link

Window Management Fixes - [merged] #705

Closed benloh closed 1 year ago

benloh commented 2 years ago

Merges dev-bl/next-needs-saving -> dev-next

Two quick window management fixes.

Managing Script Editor Windows

The original window design philosophy assumed that Main would be the primary game server being projected on a centralized screen, and that script editing would happen on networked client computers. So when you open a script for editing, it opens in a new window.

Issues

There are multiple problems with this:

  1. Browsers by default will open new windows in a tab.
  2. Most browsers will reduce the activity of pages running in background tabs. So Main gets less CPU cycles. This means it becomes less responsive to network requests, so script submissions from the Script Editor, for instance, are not updated in a timely manner and you might get a "Waiting for Main" message. Similarly if a simulation is running, it will receive fewer updates. It is a little less noticeable if you're working on a single machine, but if there is another network client machine depending on Main, it may act like Main has gone offline.
  3. Users are confused by too many windows.

Stopgap Solution

Because of the different use models, a single solution might be difficult to come by. For example, when opening a Script Editor, we cannot simply have it open on MAIN -- we NEED it to open in a different window because if Main is being projected for the whole class, it needs to remain up and running.

This merge request tries to mitigate the issues in the following ways:

We can explore other methods if needed.

Close Confirmation

The Script Editor window should now only display the "Do you want to leave this site? Changes you made may not be saved." dialog when either the script page or the line editor needs saving.

benloh commented 2 years ago

requested review from @jdanish

benloh commented 2 years ago

changed target branch from dev-next-gui to dev-next

benloh commented 2 years ago

added 32 commits

Compare with previous version

benloh commented 2 years ago

mentioned in commit f8fa54a2673967da5d8c622da5fd873af7f6b048

benloh commented 2 years ago

In GitLab by @jdanish on Jul 31, 2022, 13:52

Looks good to me. Only odd thing I noticed was that methods which I presume are meant for "if" are showing up under prop methods (e.g., eq) but that's fine for now.

benloh commented 2 years ago

In GitLab by @jdanish on Jul 31, 2022, 13:53

I also noticed you are using brackets to call out a keyword rather than bold or something else. Any chance we can use embedded html, markdown, or similar? The brackets are slightly awkward, though we can live with them if needed.

benloh commented 2 years ago

This is probably a second (third? fourth?) layer of symbolizing that we need to deal with.

benloh commented 2 years ago

You'll be able to edit all of that in codex-keywords.yaml. Theoretically we should able to include Markdown, but I'd need to take a closer look. I'm less crazy about HTML.

benloh commented 2 years ago

In GitLab by @jdanish on Aug 2, 2022, 10:17

Yeah - that's why I was wondering about different formatting. If it helps, we added a markdown react component in both meme and netcreate.

benloh commented 2 years ago

Yeah we just need to be judicious about Markdown is implemented or it can completely bog down the system due to redraws. NetCreate has some issues along those lines.

benloh commented 2 years ago

In GitLab by @jdanish on Aug 2, 2022, 10:26

Fair. Why don’t we put markdown on the list of nice to have at spot 3 or 4 for now and return later?

benloh commented 2 years ago

Heh, already added it. But I'll move it up to spot 3. It should be relatively easy.