-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: add displayConfig in Hub Catalog, update GalleryDisplayConfigSchema #1747
base: master
Are you sure you want to change the base?
feat: add displayConfig in Hub Catalog, update GalleryDisplayConfigSchema #1747
Conversation
…hema affects: @esri/hub-common ISSUES CLOSED: 11582
affects: @esri/hub-common
…tps://github.com/Esri/hub.js into f/11582-catalog-results-appearance-configuration
affects: @esri/hub-common
affects: @esri/hub-common
…tps://github.com/Esri/hub.js into f/11582-catalog-results-appearance-configuration
affects: @esri/hub-common
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nice work here -- one comment re: showThumbnail, the rest are all minor.
corners: { type: "string", enum: ["square", "round"], default: "square" }, | ||
shadow: { | ||
type: "string", | ||
enum: ["none", "low", "medium", "heavy"], | ||
default: "none", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have some enums for these in common/core/schemas/shared/enums.ts, i.e. drop shadow, corners, etc
Let's reuse those here / create some new enums in that file for the other properties
layout?: "list" | "grid" | "map" | "table" | "calendar" | "compact"; | ||
cardTitleTag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6"; | ||
showThumbnail?: boolean; | ||
corners?: "square" | "round"; | ||
shadow?: "none" | "light" | "medium" | "heavy"; | ||
showLinkButton?: boolean; | ||
linkButtonStyle?: "solid" | "outline" | "outline-fill" | "transparent"; | ||
linkButtonText?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here about enums, let's reuse those here
// AGO has a util for determining display name and item type icons | ||
// that we can use for reference | ||
// https://devtopia.esri.com/WebGIS/arcgis-app-components/blob/master/src/components/arcgis-item-type/utils.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wow...should we be using this for the combobox/item type work then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say we stick with our getContentTypeIcon
for now for consistency. I added this comment here because I just got that info from the AGO team, it was new to me as well. I think this needs a holistic review by Design first before we decide what to do.
showThumbnail: { | ||
oneOf: [{ type: "string" }, { type: "boolean" }], | ||
enum: [true, false, "grid"], | ||
default: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure the config editor is built to handle oneOf
yet in the schema.
Could we:
- Make this just type string
- Update the enum here to "show"/"grid"/"hide"
- Update the default here to "show"
Then in the arcgis-hub-catalog component:
showThumbnail = (showThumbnail == "grid") ? layout == "grid" : showThumbnail;
That way we don't have to deal with booleans and strings at the same time, and in the catalog component we cast everything the way we want it to first
affects: @esri/hub-common
affects: @esri/hub-common
affects: @esri/hub-common
affects: @esri/hub-common
affects: @esri/hub-common
ISSUES CLOSED: 11582
Description:
Instructions for testing:
Closes Issues: # (if appropriate)
Updated meaningful TSDoc to methods including Parameters and Returns, see Documentation Guide
used semantic commit messages
PR title follows semantic commit format (CRITICAL if the title is not in a semantic format, the release automation will not run!)
updated
peerDependencies
as needed. CRITICAL our automated release system can not be counted on to updatepeerDependencies
so we must do it manually in our PRs when needed. See the updating peerDependencies section of the release instructions for more details.