appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
33.95k stars 3.66k forks source link

[Feature]: Keep the Same Page URL When Deploying Apps Across Instances #33683

Open ame-appsmith opened 4 months ago

ame-appsmith commented 4 months ago

Is there an existing issue for this?

Summary

The customer wants to keep the same page URL when deploying apps to different instances. They are facing difficulties embedding Appsmith due to different URLs for pages across instances. More details in this ticket.

Why should this be worked on?

The inconsistency in page IDs makes it challenging to embed Appsmith pages effectively.

finchett commented 4 months ago

Thanks for raising this. Some use cases where this would be a big help.

  1. Embedding an Appsmith application. (Our use case)

We want to embed appsmith in another web application but it's difficult to deploy because every instance of the appsmith application has different page URLs.

  1. linking to a page more generally

There are plenty of reasons to link to page. Tying those links to a particular instance of appsmith will make it harder to keep those links valid across time.

Is there an existing issue for this?

  • [x] I have searched the existing issues

I think this has actually been raised before. And it might actually the intended behavior already? https://github.com/appsmithorg/appsmith/issues/29793 from last year gives me that impression.

infinitetrooper commented 4 months ago

@finchett - Thanks for the details, I have a couple of follow-ups.

  1. For embedding - when you are embedding the Appsmith app in another instance, do you have a use case to embed the staging and prod apps (or) just the prod app? Asking because if it's just the prod app, the URL slugs shouldn't matter.

  2. For linking page more generally - Is your use case that you want to hyperlink the pages based on the slug? Like [domain]/page-name-page-id?

finchett commented 4 months ago

Thanks @infinitetrooper

  1. Strictly speaking we'd only need to embed the prod app though it is certainly nice to be able to do both. Though could you elaborate a little? Do you mean to say the slugs can be omitted in production?

  2. I'm not fussed about how to urls are structured so much (though it would be nice to be able to omit the id entirely and have cleaner urls). It'd be useful to have a static link to an appsmith page which isn't tied to one instance.

infinitetrooper commented 4 months ago

On 1 - I meant that if you only need to embed the prod URL, you can directly hyperlink the complete URL, either it be random or "slugified". Slugs become more useful when you need to dynamically embed a URL.

For example, if you want to show a prod or stage app based on the user who logged in, you can embed the URL like [Domain]/slug and the domain will dynamically be replaced at runtime based on the user. Since slug remains the same, embedding becomes much easier.

finchett commented 4 months ago

Apologies. I had meant to refer to the page-id specifically. Not the slug.

I'm linking to an appsmith page like this in a separate react app.

https://localhost/app/application-name/some-page-{changing page id}

The trouble is appsmith isn't keeping the page id the same anytime we have a new instance of appsmith.

infinitetrooper commented 4 months ago

Okay, got it @finchett. I think I have a fair idea of the use case, I'll reach back if we need more info on this.