-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Human-friendly URLs / Generate cleaner slugs in the browser. #46
Comments
It seems like we have the choice between
The issue is that the URL stores information about the catalog structure (e.g. all parents) so that a breadcrumb can be shown. If we remove this and only show the location of the current file, I can only lazy load the parents and they need to be present for that in the links, of course. The question is what is more desirable? Of course, I could try to cache things in local storage to mitigate the issue a bit. Nevertheless, on a page reload it would need to load all parents. If parents are not given, you are stuck anyway. I'd like to get people in a discussion what they would prioritize... cc @cholmes |
What we could rely on is a set of pre-defined catalog structures a publisher could choose from. For example, the old best practice (we've changed it recently to be not very useful here any longer, see radiantearth/stac-spec#925) would have allowed to make breadcrumbs based on the folder structure. If we go for clean slugs, the breadcrumb would miss some levels of the catalog. For example the CBERS link from above: You'd be able click the Side Note: I could also request all "parent" catalogs via additional HTTP requests. This is currently also done by STAC Browser, but this leads to quite a lot of data to transfer and I'd like to make the Browser more lightweight with data transfer consumption. |
Some catalog structures that we could make configurable to get nicer slugs:
* = With the recent change in radiantearth/stac-spec#925 this is not true any longer and in each folder there could also be a collection.json instead of a catalog.json. Thus, for some catalogs it is true that the collection.json is only at a specific level (e.g. root -> catalog -> collection -> catalogs... -> items) and thus an option to set the "collection level" would be required (maybe multiple levels?). The following catalogs fullfil the requirements:
The issue with setting this is that for general-purpose deployments (STAC Index) one would need to specify this individually and thus usually the default would be active and have |
This comment has been minimized.
This comment has been minimized.
I don't think I fully understand your request. So right now the Mars data can be "shared" with this link: Is this not "clean" due to the "strange" URL? Or is the issue that the catalogs reside on different (sub-)domains/buckets? And yes, it's planned to solve the issue with different domains/buckets, too. Right now it just uses URL without protocol in the URL, but I may actually also implement that you can define aliases for certain "base URLs" so that it looks more like |
@m-mohr I think I had some cacheing issues going on. The link looked and worked really well. I was having that link resolve with a NoSuchKey error and thought it was due to the URL. Apologies for the noise on this issue. I'll hide the post to keep this issue on topic! |
Alright, if you find any other issues or have feature requests, let me know. |
Clean-urls have been implemented in STAC Browser v3 |
Current stac-browser uses a Base58 encoding of a STAC object's relative path to its root catalog as the slug for the URL path. This produces slugs that can be directly decoded into paths, but the URLs are long and not human readable.
The goal of this issue is to develop better slugs for STAC objects.
#29 represents a draft that solves the issue by utilizing conventions.
The text was updated successfully, but these errors were encountered: