Provide your own name when remixing?

Hi all, I am currently providing remix links to my users, like so:

https://glitch.com/edit/#!/remix/delerious-charming-capri

This is great since it lets them quickly get up and running, but, I’d love to be able to generate my own project names that I provide to the remix URL. I found another answer on here that suggested using remix URLs like so (with the final part of the URL being the “projectID” which you get by issuing application.currentProjectId() from the console):

https://glitch.com/edit/#!/remix/you-provide-name-here/c0455e13-cb5d-4b82-b6a2-bbc4dbd9f1c3

I would love it if the name provided was the one assigned to the remixed project. So in the example above it would be assigned the name “you-provide-name-here” (instead of some random three characters).

Is this possible somehow?

Thanks!

1 Like

Hmm I don’t see how it would be possible unless there was a field created for it like projectID? You can change the subdomain name for any of your projects by changing the contenteditable field. Then remix.

If I’m reading your post right, I don’t think it’d be a good idea to easily change subdomains for remixed projects, imho. It would only encourage people to pass off work as their own, despite the fact that you can include a license.

What is the end goal here? Can’t anyone (and I don’t know but I assume so) rename any project to virtually any unique, unused name at any time?

I’m slightly curious about what the benefits are.

this would be useful

I personally want to build a static widget to embed a Glitch editor that remixes a given project or uses an existing one if the user already remixed it.

the question was, then, how does the widget come to know the name of the project after the user’s first remix.

a simple way to do that would be to have the widget come up with a random name in the first place.

Thanks for the reply but I still don’t get it. Is this a special case where someone is remixing and then wants another remix and perhaps another and wants them to have the same “base” name? If so, is that commonplace?

But as a solution (and again I really am not picturing the usage here) is there an API with a rename function? Could it be done after creation?

I must clarify. the first time the user uses the widget, it remixes a template project T into the user’s copy C. on subsequent uses, the widget displays project C.

Appreciate your clarification. I think the problem is I have never needed to do such a thing so I can’t see where the problem is. I probably don’t know what a remix offers either. I thought of it as a clone of a project it may be more than that.

I will also guess I’m a bit “old school” in that I would push a copy out to GitHub and/or pull a copy onto my PC, change whatever I needed and push it back up. I find that most projects don’t follow my preferences for folder, file and variable naming conventions and these would need to be changed as well. In any case, if it is a good idea perhaps it will be implemented.

I have a form that designers are filling out that creates an app manifest for them to use to create a new slack app. The glitch remix will function as the brains of the slack app. So right now the designers have to:

  1. Create a glitch remix.
  2. Get the random three word string
  3. Paste that string into a form that generates a slack app manifest
  4. Get the generated slack app manifest
  5. Paste that into a form on slack’s dev api site (to create the new slack app).

I want to eliminate steps 1 & 2 so that they can:

  1. Generate a slack app manifest (with the glitch app URL which will function as the endpoint for the slack app pre-populated)
  2. Paste that manifest into a form on slack’s dev api site (to create a new slack app)
  3. Click a button (on the form from step 1) that opens a remix (with a name I provided) for their glitch app (which functions as the endpoint for their slack app).

The way this would work to ensure “unique names” for the glitch remix could look something like:

Original app name (say, “thundercats”) + user’s name + some sort of timestamp when the manifest was created.

So, when they “Generate a slack app manifest” in step 1, it would have the moment of its creation, “thundercats_cmcculloh_080220212157” (August 2, 2021, 9:57 PM) for instance, assigned as the name of the glitch app (which would be inserted into the app manifest, and then used to name the remix).

1 Like

Hi there, @cmcculloh - While this is not possible to do, I think it’s a great idea and I appreciate the thoughtful write-up on the use case around it. I’ve added this to my report of product suggestions from the community for us to consider!

2 Likes

now that we have the staff response that you can’t, let’s move on to the juicy workaround ideas

remix through the API

the remixing API lets you specify a preferred project domain, and it does a pretty good job. though I suppose this isn’t applicable here because you’re targeting a web workflow.

maybe you could have a server that has its own Glitch login credentials to create the project and subsequently use the API to transfer ownership to the user. but who knows how hard it is to prevent people from abusing such a service?

curious that there’s indeed a route set up in the glitch frontend to read parameters from that .../preferred-domain/original-project-guid format you mentioned in the first post but that it isn’t hooked up to this API.

and I suppose if you were doing this from a backend area, you could just as easily create one without a preferred domain and record what gets created.

cross-frame messaging

imagine this: you embed an iframe to the remix URL. Glitch remixes it and opens the editor. the editor (as of recently) embeds another iframe with a preview of the app.

what if the preview of the remixed project would do a postMessage to window.parent.parent to inform your site of the domain that it’s running on? that seems like it could work.

remixed project phones home

supposedly you can specify environment variables to add to the remixed project. maybe what you could do is give a user of your website some unique ID, set that to be added to the remixed project’s environment, then have the template project be designed that when it first boots up, it looks at the environment and uploads something to your site associating that user ID with its project domain. now your site knows that user’s remixed project domain.


I think I might try the middle one myself :thinking:

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.