-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sitecore-jss-react] [sitecore-jss-nextjs] Default Placeholder Conten…
…t for empty fields in editMode metadata (#1831) * default empty field editing placeholder for text field component * add withEmptyPlaceholderValue HOC; unit tests; default empty field editing components for text and image; modify Link and Text field components * modify Date, Image, RichText react components to use withEmptyValueEditingPlaceholder * update Link, NextImage, RichText nextjs fields components to work with withEmptyValueEditingPlaceholder * add proptype for custom empty value placeholder component prop * added comments, fixed lint errors * fix lint errors * reexport default empty field editing components and withEmptyValueEditingPlaceholder from sitecore-jss-nextjs package * renamings HOC, properties - withEmptyFieldEditingComponent * update hasValue logic * react field components - extract common properties into EditableFieldProps interface * introduce a function fieldValueIsEmpty in base packages and use it in withEmptyFieldEditingComponent * fix lint error * fix lint errors * introduced FieldMetadata interface in core package; use it accross field components; some renamings and additional code comments * update withEmptyEditingComponent hoc to accept single options parameter * add unit tests for isValueEmpty; isValueEmpty update * isFieldValueEmpty - account for boolean value; add additional code comments, update some existing comments * isEmptyField refactoring and unit tests update * unit tests update * update emptyFieldComponent prop proptype; use isFieldValueEmpty in field components; update Image and Link unit tests * update nextjs Link and NextImage unit tests, small updates * some test title updates * add additional check for metadata for isEditing var in next richtext * add clarifying comment
- Loading branch information
Showing
27 changed files
with
1,888 additions
and
490 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.