Skip to content
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: abstract messaging #13

Merged
merged 66 commits into from
Aug 8, 2024
Merged

feat: abstract messaging #13

merged 66 commits into from
Aug 8, 2024

Conversation

brian-baugher
Copy link
Contributor

This change reduces what we export to solely what is needed. Stops exporting TARGET_ORIGINS and TemplateMetadata. Stops exporting useMessage hooks. Adds a new hook that uses a useMessage hook but makes it really easy to just grab the document.
Also updates docs to reflect this and Editor props. New usage:

const Edit: () => JSX.Element = () => {
  const entityDocument = useDocumentProvider();

  return (
    <DocumentProvider value={entityDocument}>
      <Editor document={entityDocument} puckConfigs={puckConfigs} />
    </DocumentProvider>
  );
};

brian-baugher and others added 30 commits July 23, 2024 11:53
Get everything ready for development (scripts, packages, directories, etc)
Major refactor to pull everything needed for the editor out of VE starter and into this VE lib.
Adds export of Editor and the useMessage hooks. Allows usage of Editor with solely puckConfig, templateMetaData, and document as props.
Corresponding VE Starter refactor PR coming shortly.

Untested.
Co-authored-by: Matt Kilpatrick <mkilpatrick@yext.com>
Base automatically changed from docs to main August 8, 2024 14:10
@mkilpatrick mkilpatrick merged commit f194cbe into main Aug 8, 2024
9 checks passed
@mkilpatrick mkilpatrick deleted the abstractHooks branch August 8, 2024 14:18
mkilpatrick pushed a commit to YextSolutions/pages-visual-editor-starter that referenced this pull request Aug 8, 2024
This update corresponds with the removal of useMessage hook exports in
VE-Lib. See this [PR](yext/visual-editor#13) for
more details.

---------

Co-authored-by: tsaikatie <ktsai@yext.com>
Co-authored-by: ehallerYext <ehaller@yext.com>
Co-authored-by: Alexis Sanehisa <106991746+asanehisa@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants