-
Notifications
You must be signed in to change notification settings - Fork 140
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
Add collection assets and summaries #47
Add collection assets and summaries #47
Conversation
This commit refactors the Assets tab into it's own component and adds an asset tab to the collection page if there are assets on the collection per the collectio-asset extension. Also, add role information to asset information.
The URL resolving was erroring on paths that have a colon in them. This change to resolve works around this issue by escaping any colongs besides the :// for the schema.
I checked this PR in STAC Browser mostly regarding Collection Assets / Summaries. It looks pretty good and seems to work so far. Some remarks:
Unfortunately, I couldn't find many summaries to test against. I can confirm this PR doesn't break STAC Index. ;-) |
This will allow a consistent access to properties in other parts of the codebase. This is implemented currently only for the "assets" -> "item-assets" change that happened in STAC 1.0.
This commit refactors the metadata sidebar that exists in both the catalog and item views into a single component. The summary tab was removed and the colleciton summary information is instead placed inside the metadata sidebar.
@m-mohr updated to refactor the metadata sidebar and move the summaries to the sidebar as per your suggestion. Mind checking with stac-index again? I think the thumbnail point is a good one, though I'm going to leave that to follow up work; I'll write an issue. Thank you for the review! |
I'll check it in the next two weeks (I'm on vacation). |
Merging this; if stac-index testing reveals any issues we can handle in follow up PRs. |
@lossyrob Seems to (mostly?) work, I just deployed it to stacindex.org. |
This PR introduces two new tabs to the collection page - one for collection summaries, the other for Assets if the collection utilizes the collection-assets extension.
This also refactors the Assets tab into it's own component that is shared between the Catalog.vue and Item.vue components. The Summary tab is likewise separated out into its own component. This is in line with the goal of refactoring this codebase towards being more component based, so that other project can integrate components into their own Vue project as well as improving the readability and structure of the codebase.
This PR also solves a few other smaller issues:
new URL(href, base)
and the href has a colon (e.g.series/eo:platform
), the code interprets the colon as being part of the scheme definition of an absolute URL, and so returns what it things is a fully resolved URL (e.g.series/eo:platform
, without utilizing the base). The workaround escapes colon characters in the resolution while making sure the actual scheme definition denoted with://
is not escaped.currentChildPage
andcurrentItemPage
properties in the Catalog component were linked with state as well as query parameters. If there was no query parameter specified, the currentChildState would fall back to the previously set state. The problem with that method is that if you are in one Catalog, go to a different page - say page 7 - and then navigate to a child Catalog that has only 1 page of subcatalogs, the page state would remain 7 and no children would show. This PR makes it so that if there's no query parameter for the child page or item page it reverts back to page 1.Fixes #38
Fixes #45