You can now click the gear icon in the text editor and create a “collab link” for your generator. If you share that link with others, they’ll be able to edit/save the generator, and you’ll be able to see each others text cursors/carets.

You can disable/invalidate the link, and regenerate a new one.

Please let me know if there are any issues! I may be able to improve the performance/latency of it after some more work on the server.

  • VioneTM
    link
    English
    313 days ago

    Currently testing the Collab with a few people on https://perchance.org/collab-testing-01-01

    Here are some notes and bugs that I found:
    Bugs

    Notes

    • If the gen owner CTRL-Zs, it affects everyone’s edit if they are editing in real time.
    • Changes are to the editors are LIVE, but a reload/auto-reload is needed for generator viewers to see the changes in the preview window.
    • It needs the owner to ‘save’ the generator to create a backup of the old edit.
    • If there are changes made by other collaborators and the gen owner tries to refresh the page, there would be a prompt that there are unsaved changes, but the changes are still applied to the page.
    • Opening the ‘Collab Link’ on Edge Incognito, Opera GX, Opera OG, and Arc Browser on the same computer and editing + saving works.
    • @perchanceOPM
      link
      English
      1
      edit-2
      5 days ago

      I think all the weird browser issues are fixed (I think it was to do with bad cache headers resulting in different versions depending on when editor was first loaded in the browser being tested), but please let me know if not.

      If the gen owner CTRL-Zs, it affects everyone’s edit if they are editing in real time.

      Thanks! I think this is fixed now, if not let me know.

      It needs the owner to ‘save’ the generator to create a backup of the old edit.

      I’m not sure what you mean by “create a backup of the old edit” - but to be clear it should be possible for anyone with the collab link to save - i.e. not just the owner. Please let me know if that’s not the case.

      Changes are to the editors are LIVE, but a reload/auto-reload is needed for generator viewers to see the changes in the preview window. If there are changes made by other collaborators and the gen owner tries to refresh the page, there would be a prompt that there are unsaved changes, but the changes are still applied to the page.

      The “unsaved changes” prompt is actually correctly warning you in the sense that you need to save the changes to be sure that they’re not lost, since (currently) if all collaborators leave, then the collab server will (eventually) “garbage collect” the session. I could make it so the session state is persisted to disk - that would perhaps be more intuitive (this may have to wait for now though, so the warning should be taken seriously until it no longer appears).


      Also, in https://perchance.org/collab-testing-01-01 you have Password: hello (or maybe someone else added that), but it’s not possible to manually set an “edit password” (unless I’ve forgotten a feature I added…). It should be a random string of letters/numbers. Note that the edit password is different to the collab password/link. Edit passwords are really only necessary for anon-created generators, which is why you’re not given an edit password for generators that are created when you’re logged in. The “edit password” gives you more permissions than the collab password. For example, the edit password has the capability to disable/enable collab links. Whereas the collab link/password just gives you the ability to edit/save a generator and participate in the live editing session.

      • VioneTM
        link
        English
        14 days ago

        By creating a backup, I mean something like the version control on perchance in which every save creates a version of the previous generator without the changes. If you are editing with the collab link, and you aren’t the owner/creator of the page, there is no ‘backup’ icon on the top right, meaning the changes aren’t saved in a version although the changes are saved on the generator, thus I think it requires the owner to manually save to create a backup version, unless I’m mistaken.

        As for the edit password, I’ve attached an image on my previous comment of the example prompt that shows up when I click the “Collab Link” on another generator that I don’t own. For example, on this one, I clicked the “Collab Link” on /beautiful-people and it shows this prompt:

        Also, when I previously created a collab link, it asked me for an edit password, but now I don’t see it, which is why I provided the Password: hello previously since I’ve set it to that, and checking with you if there should be an edit password if you don’t have the collab link.