munshkr / flok

Web-based P2P collaborative editor for live coding sounds and images
https://flok.cc
GNU General Public License v3.0
259 stars 39 forks source link

Sharing a Flok session link that already has targets sometimes pops-up "Configure Layout" #214

Closed tmhglnd closed 9 months ago

tmhglnd commented 9 months ago

Hey!

When I share a link to a flok session that already has one or more targets and open it in a private browser window it prompts with the "configure layout" message asking for a list of targets. If you accidentally click save it removes the unused panels and goes back to a default hydra panel...

I think this prompt should be disabled when panes are added and include some code already. Especially to avoid confusion or people accidentally removing things.

Steps to reproduce:

  1. Create new session in the browser (i'm using Brave), add 2 or more targets (eg. mercury-web, hydra)
  2. Add some code/text to both targets just to have something there
  3. Copy flok link and open in a private browser window (for Brave is shift+cmd+n) and paste
  4. It prompts the "configure layout" panel, and when you click save the mercury-web is removed
munshkr commented 9 months ago

Hey, thanks for reporting this, I noticed this bug yesterday too... I'll take a look later today!

tmhglnd commented 9 months ago

If I'm honest I liked the simplicity of just opening flok and not getting this prompt but just selecting the editor from the drop-down menu. But i'm also fine having this feature so no worries of course haha! Great work in any case!

munshkr commented 9 months ago

It should only show up if it's a new session, so in your case it shouldn't appear... Or you mean you liked it better when it used hydra by default?

munshkr commented 9 months ago

I also liked it better before, but it was confusing for newcomers. Maybe I can add a checkbox like "do not show again on new sessions"?

munshkr commented 9 months ago

Hmm there's another bug, if you cancel the dialog or click elsewhere, the session has no documents 😵‍💫

tmhglnd commented 9 months ago

Or you mean you liked it better when it used hydra by default?

Yes just hydra default and I just clicked the drop-down menu for mercury-web.

I also liked it better before, but it was confusing for newcomers. Maybe I can add a checkbox like "do not show again on new sessions"?

I see! Okay I'm fine keeping the configuration panel when it is a new session, no problem!

Hmm there's another bug, if you cancel the dialog or click elsewhere, the session has no documents 😵‍💫

Ah, yes! Well at least you can still add a panel from the menu hehe! But yes makes sense it defaults to hydra again if you don't click anything. (or some other editor, but maybe hydra is the most used in flok, i don't know? maybe it should be random if you don't decide, try something new haha)

munshkr commented 9 months ago

Ok, I've added a Welcome dialog that shows only once, and I've hidden the Configure dialog, so basically it behaves as before: it immediately starts with a hydra slot

tmhglnd commented 9 months ago

Looks good to me!