-
Notifications
You must be signed in to change notification settings - Fork 60
fix(stack-snippet): expose stack-snippet options and metadata types #457
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
Conversation
🦋 Changeset detectedLatest commit: 7b2dba6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for stacks-editor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@troygould-stack Thanks for the PR.
These changes need a patch release in order to be used in Core. To do that you can use npx @changeset/cli
in this PR branch to generate a changeset. Once the PR is merged you can publish the package in autonomy by following the instructions in this part of the README.
Sidenote: Instead of hardcoding things in Core an alternative workaround would have been to write a reference to the internals of the editor I believe (I am not 100% sure though and have not tested it):
import type { SnippetMetadata } from "../../../../node_modules/@stackoverflow/stacks-editor/dist/plugins/official/stack-snippets/src/common";
This PR is the right call, you don't want to dig into internals of packages like that in general since internals should stay private. That said it might save you some copy/paste next time you need a temporary workaround.
Co-authored-by: Giamir Buoncristiani <[email protected]>
…/StackExchange/Stacks-Editor into tgould/export-options-interfaces
Describe your changes
A couple of options interfaces passed to the StacksEditor are not exported. Therefore, I had to recreate these interfaces when I wanted to use them. See:
https://github.com/StackEng/StackOverflow/blob/571e63834ee5920c9f5db16b97b84f94c85a872d/StackOverflow/_Scripts/islands/ask-question/src/shared/stackSnippets.ts#L18