-
Notifications
You must be signed in to change notification settings - Fork 276
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] Add support for chrome's h…
…ydration for fields (#1773) * render field metadata for Text field component; introduce field metadata component - wip * rename FieldMetadata module, add unit test for Text component, add comments * add field metadata component to Date, Image and File field components; include unit tests * add field metadata component to link and richtext field components, include unit tests * update FieldMetadata interfaces to prevent build errors in sitecore-jss-nextjs; component update * export fieldmetadata component and interfaces from sitecore-jss-react * add metadata component for nextjs link field component; include unit test * add field metadata component to nextimage component; small fix in link field component * unit tests for FieldMetadata * update unit test * introduce getFieldMetadataMarkup function and used in the field components; add unit test * update changelog * react - use higher order component to wrap metadata around field components * update nextjs components to use metadata wrapper hoc; aadjust unit tests * adjust unit tests and fix File component * adjust image field tests; include check for media property in metadata wrapper * some types updates * some unit tests adjustments and metadata wrapper component update * some FieldMetadata related renamings * add unit test for RichText nextjs component * update changelog * update changelog pull request * some type updates * reenable file tests * update function description Co-authored-by: Illia Kovalenko <[email protected]> * minor variable renaming Co-authored-by: Illia Kovalenko <[email protected]> * remove unnecessary commented line * remove unnecessary undefined check * move FieldMetada interfaces to base package; extract metadata proptypes * move FieldMetadata under enchancments * added some descriptions * move and rename FieldMetadata to layout submodule of base package * rename FieldMetadata component * add tsdoc description for fieldmetadata component * conditionally forwardRef in fieldMetadata * two separate withFieldMetadata functions based on if used with forwardRef * single withFieldMetadata function with forwardref parameter * update with metadata unit test to test the whole structure of markup * withMetadata refactoring wip * Adjusted withFieldMetadata generic type * update unit test * wip - refactor field metadata hoc * Updates * Updated unit tests, simplified types * Update * Expose withFieldMetadata as a part of nextjs sdk * Updated PropTypes * Removed extra asserts * remove media property from propTypes --------- Co-authored-by: Illia Kovalenko <[email protected]> Co-authored-by: illiakovalenko <[email protected]>
- Loading branch information
1 parent
0d84c70
commit cdb899a
Showing
22 changed files
with
950 additions
and
320 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
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
144 changes: 69 additions & 75 deletions
144
packages/sitecore-jss-nextjs/src/components/NextImage.tsx
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.