Skip to content

Commit

Permalink
feat(hub-common): add layout field for list and map views to event ga…
Browse files Browse the repository at this point in the history
…llery card schema and uiSchema

affects: @esri/hub-common

ISSUES CLOSED: 11024
  • Loading branch information
rweber-esri committed Sep 24, 2024
1 parent 78c4669 commit bdc45b0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,10 @@ export const EventGalleryCardSchema: IConfigurationSchema = {
enum: ["same", "new"],
default: "same",
},
layout: {
type: "string",
enum: ["list", "map"],
default: "list",
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,15 @@ export async function buildUiSchema(
// layout: "inline-space-between",
// },
// },
{
label: `{{${i18nScope}.appearance.layout.label:translate}}`,
options: {
control: "hub-field-input-select",
enum: { i18nScope: `${i18nScope}.appearance.layout` },
},
scope: "/properties/layout",
type: "Control",
},
],
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,15 @@ describe("EventGalleryCardUiSchema", () => {
// layout: "inline-space-between",
// },
// },
{
label: `{{some.scope.appearance.layout.label:translate}}`,
options: {
control: "hub-field-input-select",
enum: { i18nScope: `some.scope.appearance.layout` },
},
scope: "/properties/layout",
type: "Control",
},
],
},
{
Expand Down

0 comments on commit bdc45b0

Please sign in to comment.