docs: overhaul storybook demo learning path#74
Open
shijistar wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR overhauls the Storybook docs/demo structure into a clearer Core vs Plugins learning path and adds several missing standalone plugin demos across frameworks (i18next, react-i18next, next-international, vue-i18n, i18next-vue), along with new Core pages and corresponding localized meta descriptions.
Changes:
- Add multiple new Storybook stories for plugin demos (i18next, react-i18next, next-international, vue-i18n, i18next-vue, sample plugin) and new Core learning-path pages.
- Reorganize existing story titles to match the new Core/Plugins numbering scheme.
- Add new Storybook locale keys for story
metaDescriptioncontent, and addvue-i18nas a dev dependency for Storybook builds.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds vue-i18n dev dependency for Storybook demos |
| package-lock.json | Locks vue-i18n and related @intlify/* dependencies |
| .storybook/stories/PluginVueI18n.stories.tsx | New vue-i18n plugin demo story |
| .storybook/stories/PluginSample.stories.tsx | New sample plugin authoring/demo story |
| .storybook/stories/PluginReactI18next.stories.tsx | New react-i18next plugin demo story |
| .storybook/stories/PluginReactI18n.stories.tsx | Renames story title for new learning-path structure |
| .storybook/stories/PluginNextInternational.stories.tsx | New next-international plugin demo story |
| .storybook/stories/PluginI18nextVue.stories.tsx | New i18next-vue plugin demo story |
| .storybook/stories/PluginI18next.stories.tsx | New i18next plugin demo story |
| .storybook/stories/PluginAntd.stories.tsx | Renames story title for new learning-path structure |
| .storybook/stories/CoreWhyEnumPlus.stories.tsx | New Core page explaining motivation/value proposition |
| .storybook/stories/CoreUiOutputs.stories.tsx | New Core page demonstrating derived UI outputs |
| .storybook/stories/CorePatterns.stories.tsx | Renames story title for new learning-path structure |
| .storybook/stories/CoreInitialization.stories.tsx | Renames story title for new learning-path structure |
| .storybook/stories/CoreApi.stories.tsx | Renames story title for new learning-path structure |
| .storybook/locales/langs/zh-CN.ts | Adds new story metaDescription locale keys |
| .storybook/locales/langs/en-US.ts | Adds new story metaDescription locale keys |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+109
to
+129
| return ( | ||
| <AppRouterContext | ||
| value={{ | ||
| push: async () => undefined, | ||
| replace: async () => undefined, | ||
| prefetch: async () => undefined, | ||
| back: () => undefined, | ||
| forward: () => undefined, | ||
| refresh: () => undefined, | ||
| }} | ||
| > | ||
| <PathParamsContext value={{ locale }}> | ||
| <PathnameContext value="/"> | ||
| {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */} | ||
| <PatchedI18nProviderClient locale={locale} I18n={I18n as any}> | ||
| {children} | ||
| </PatchedI18nProviderClient> | ||
| </PathnameContext> | ||
| </PathParamsContext> | ||
| </AppRouterContext> | ||
| ); |
Comment on lines
+44
to
+54
| function ensureNextIntlPlugin() { | ||
| if (nextIntlPluginInstalled) { | ||
| return; | ||
| } | ||
|
|
||
| Enum.install(clientI18nPlugin as unknown as Parameters<typeof Enum.install>[0], { | ||
| localize: { mode: 'component' }, | ||
| isMatch: { defaultSearchField: 'label' }, | ||
| }); | ||
| nextIntlPluginInstalled = true; | ||
| } |
Comment on lines
+221
to
+222
| "vite": "^7.3.1", | ||
| "vue-i18n": "^9.14.5" |
Comment on lines
+113
to
+119
| useEffect(() => { | ||
| const previousLocalize = Enum.localize; | ||
| vueI18nPlugin({ localize: { instance } }, Enum as never); | ||
| return () => { | ||
| Enum.localize = previousLocalize; | ||
| }; | ||
| }, [instance]); |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation