Skip to content

Commit

Permalink
feat: description fields to rich text (#1366)
Browse files Browse the repository at this point in the history
  • Loading branch information
benstoltz authored Dec 18, 2023
1 parent 543a803 commit 1dec16f
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 24 deletions.
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 @@ -78,7 +78,7 @@ export const buildUiSchema = async (
scope: "/properties/description",
type: "Control",
options: {
control: "hub-field-input-input",
control: "hub-field-input-rich-text",
type: "textarea",
helperText: {
labelKey: `${i18nScope}.fields.description.hint`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const buildUiSchema = async (
scope: "/properties/description",
type: "Control",
options: {
control: "hub-field-input-input",
control: "hub-field-input-rich-text",
type: "textarea",
helperText: {
labelKey: `${i18nScope}.fields.description.helperText`,
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/groups/_internal/GroupSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const GroupSchema: IConfigurationSchema = {
// a max char limit of 250
maxLength: 250,
},
description: { type: "string" },
_thumbnail: ENTITY_IMAGE_SCHEMA,
membershipAccess: {
type: "string",
Expand Down
9 changes: 9 additions & 0 deletions packages/common/src/groups/_internal/GroupUiSchemaEdit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ export const buildUiSchema = async (
],
},
},
{
labelKey: `${i18nScope}.fields.description.label`,
scope: "/properties/description",
type: "Control",
options: {
control: "hub-field-input-rich-text",
type: "textarea",
},
},
{
labelKey: `${i18nScope}.fields._thumbnail.label`,
scope: "/properties/_thumbnail",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const buildUiSchema = async (
scope: "/properties/description",
labelKey: `${i18nScope}.fields.description.label`,
options: {
control: "hub-field-input-input",
control: "hub-field-input-rich-text",
type: "textarea",
helperText: {
labelKey: `${i18nScope}.fields.description.helperText`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ export const buildUiSchema = async (
helperText: {
labelKey: `${i18nScope}.fields.description.helperText`,
},
toolbar:
"heading,|,bold,italic,blockQuote,removeFormat,link,|,bulletedList,numberedList,alignment,outdent,indent,|,undo,redo",
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/pages/_internal/PageUiSchemaEdit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const buildUiSchema = async (
scope: "/properties/description",
type: "Control",
options: {
control: "hub-field-input-input",
control: "hub-field-input-rich-text",
type: "textarea",
helperText: {
labelKey: `${i18nScope}.fields.description.helperText`,
Expand Down
2 changes: 0 additions & 2 deletions packages/common/src/projects/_internal/ProjectUiSchemaEdit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ export const buildUiSchema = async (
helperText: {
labelKey: `${i18nScope}.fields.description.helperText`,
},
toolbar:
"heading,|,bold,italic,blockQuote,removeFormat,link,|,bulletedList,numberedList,alignment,outdent,indent,|,undo,redo",
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const buildUiSchema = async (
scope: "/properties/description",
type: "Control",
options: {
control: "hub-field-input-input",
control: "hub-field-input-rich-text",
type: "textarea",
helperText: {
labelKey: `${i18nScope}.fields.description.helperText`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe("buildUiSchema: content edit", () => {
scope: "/properties/description",
type: "Control",
options: {
control: "hub-field-input-input",
control: "hub-field-input-rich-text",
type: "textarea",
helperText: {
labelKey: "some.scope.fields.description.hint",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ describe("buildUiSchema: discussion edit", () => {
scope: "/properties/description",
type: "Control",
options: {
control: "hub-field-input-input",
control: "hub-field-input-rich-text",
type: "textarea",
helperText: {
labelKey: "some.scope.fields.description.helperText",
Expand Down Expand Up @@ -333,7 +333,7 @@ describe("buildUiSchema: discussion edit", () => {
scope: "/properties/description",
type: "Control",
options: {
control: "hub-field-input-input",
control: "hub-field-input-rich-text",
type: "textarea",
helperText: {
labelKey: "some.scope.fields.description.helperText",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ describe("buildUiSchema: group edit", () => {
],
},
},
{
labelKey: `some.scope.fields.description.label`,
scope: "/properties/description",
type: "Control",
options: {
control: "hub-field-input-rich-text",
type: "textarea",
},
},
{
labelKey: "some.scope.fields._thumbnail.label",
scope: "/properties/_thumbnail",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe("buildUiSchema: initiative template edit", () => {
scope: "/properties/description",
labelKey: `some.scope.fields.description.label`,
options: {
control: "hub-field-input-input",
control: "hub-field-input-rich-text",
type: "textarea",
helperText: {
labelKey: "some.scope.fields.description.helperText",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ describe("buildUiSchema: initiative edit", () => {
helperText: {
labelKey: "some.scope.fields.description.helperText",
},
toolbar:
"heading,|,bold,italic,blockQuote,removeFormat,link,|,bulletedList,numberedList,alignment,outdent,indent,|,undo,redo",
},
},
{
Expand Down Expand Up @@ -389,8 +387,6 @@ describe("buildUiSchema: initiative edit", () => {
helperText: {
labelKey: "some.scope.fields.description.helperText",
},
toolbar:
"heading,|,bold,italic,blockQuote,removeFormat,link,|,bulletedList,numberedList,alignment,outdent,indent,|,undo,redo",
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe("buildUiSchema: page edit", () => {
scope: "/properties/description",
type: "Control",
options: {
control: "hub-field-input-input",
control: "hub-field-input-rich-text",
type: "textarea",
helperText: {
labelKey: "some.scope.fields.description.helperText",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ describe("buildUiSchema: project edit", () => {
helperText: {
labelKey: "some.scope.fields.description.helperText",
},
toolbar:
"heading,|,bold,italic,blockQuote,removeFormat,link,|,bulletedList,numberedList,alignment,outdent,indent,|,undo,redo",
},
},
{
Expand Down Expand Up @@ -409,8 +407,6 @@ describe("buildUiSchema: project edit", () => {
helperText: {
labelKey: "some.scope.fields.description.helperText",
},
toolbar:
"heading,|,bold,italic,blockQuote,removeFormat,link,|,bulletedList,numberedList,alignment,outdent,indent,|,undo,redo",
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe("buildUiSchema: template edit", () => {
scope: "/properties/description",
type: "Control",
options: {
control: "hub-field-input-input",
control: "hub-field-input-rich-text",
type: "textarea",
helperText: {
labelKey: "some.scope.fields.description.helperText",
Expand Down

0 comments on commit 1dec16f

Please sign in to comment.