-
Notifications
You must be signed in to change notification settings - Fork 0
feat: CustomExitScreen - Debug Inputs UI改善と全Exit Reason対応 #61
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
74f4d96
Add access denied screen plugin template
akriaueno 9989450
Ignore module federation temp files
akriaueno a2990d7
Add debug controls to access denied preview
akriaueno 0318f59
Ignore .uuid.env and align MF dev deps
akriaueno f7dcb2f
Rename access denied template to CustomExitScreen and fix types
akriaueno 5bfa312
chore: switch formatting to biome
akriaueno 1ae2d4a
feat: improve Debug Inputs UI and support all exit reasons
akriaueno 2343a28
docs: update Node.js requirement to 24+
akriaueno 801ae13
fix: update package name, description, version and add engines
akriaueno 731839f
chore: clean up .gitignore
akriaueno e802d76
refactor: rename exit screen copy to content
akriaueno cc286cd
feat: add build scripts for metadata.json and plugin.zip
akriaueno b413e01
fix: configure publicPath auto and relative base for build
akriaueno 80d82c0
Fix key handling and drop isSignedIn prop
akriaueno 03791a0
Translate CustomExitScreen copy to English
akriaueno File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Build output | ||
| dist/ | ||
| build/ | ||
|
|
||
| # Dependencies | ||
| node_modules/ | ||
|
|
||
| # Environment | ||
| .uuid.env | ||
|
|
||
| # Module Federation temp | ||
| .__mf__temp/ | ||
| __mf__temp/ | ||
|
|
||
| # Editor | ||
| .vscode/ | ||
| .idea/ | ||
| *.iml | ||
| *.sublime-project | ||
| *.sublime-workspace | ||
| *.swp | ||
| *.swo | ||
| *~ | ||
|
|
||
| # OS | ||
| .DS_Store | ||
|
|
||
| # Logs | ||
| *.log* | ||
|
|
||
| # Coverage | ||
| coverage/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # CustomExitScreen | ||
|
|
||
| A plugin template for customizing the metatell exit screen. | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Node 24+ | ||
|
|
||
| ## Development | ||
|
|
||
| ```bash | ||
| npm install | ||
| npm run dev | ||
| ``` | ||
|
|
||
| The dev server runs at `http://localhost:5173`. | ||
|
|
||
| ## Build | ||
|
|
||
| ```bash | ||
| npm run build | ||
| ``` | ||
|
|
||
| The Module Federation manifest is output to `dist/mf-manifest.json`. | ||
|
|
||
| ## Plugin type | ||
|
|
||
| ``` | ||
| CustomExitScreen | ||
| ``` | ||
|
|
||
| ## Supported reasons | ||
|
|
||
| | reason | description | trigger | | ||
| |--------|-------------|---------| | ||
| | `exited` | Exit (fallback) | Default value of `exitScene()` | | ||
| | `left` | Exit | When `leave_room_requested` fires from the in-world UI | | ||
| | `closed` | Room closed | When the host closes the room | | ||
| | `denied` | Access denied | When the user has no entry permission | | ||
| | `kicked` | Kicked | When the host kicks the user | | ||
| | `connectError` | Connection error | When the server connection fails | | ||
| | `sceneError` | Scene error | When the 3D scene fails to load | | ||
|
|
||
| ## Props | ||
|
|
||
| ```ts | ||
| export type CustomExitScreenProps = { | ||
| reason: | ||
| | "exited" | ||
| | "closed" | ||
| | "denied" | ||
| | "kicked" | ||
| | "left" | ||
| | "connectError" | ||
| | "sceneError"; | ||
| contentByReason: Record< | ||
| CustomExitScreenProps["reason"], | ||
| { | ||
| title: string; | ||
| message: string; | ||
| buttonLabel: string; | ||
| buttonUrl?: string; | ||
| } | ||
| >; | ||
| onPrimaryAction: () => void; | ||
| logoUrl?: string; | ||
| }; | ||
| ``` | ||
|
|
||
| ## Module Federation metadata | ||
|
|
||
| ```ts | ||
| export const mfMeta = { | ||
| type: "CustomExitScreen", | ||
| contractVersion: 1, | ||
| supportedReasons: [ | ||
| "exited", | ||
| "closed", | ||
| "denied", | ||
| "kicked", | ||
| "left", | ||
| "connectError", | ||
| "sceneError" | ||
| ] as const | ||
| }; | ||
| ``` | ||
|
|
||
| ## Notes | ||
|
|
||
| - `.uuid.env` contains `VERSION_ID` and `VITE_VERSION_ID` generated by `npm run set-uuid`. | ||
| - The host loads `CustomExitScreen` via the Module Federation runtime. | ||
| - `exited` and `left` show the same message. `exited` is a fallback, and `left` is used in normal cases. | ||
| - The 2D "Leave" button usually navigates to the root from `LeaveRoomModal`, so it does not go through `ExitedRoomScreen`. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>CustomExitScreen</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| </body> | ||
| </html> |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
コードブロックに言語指定を追加してください。
静的解析ツール(markdownlint)がこのコードブロックに言語指定がないことを検出しました。
textまたはplaintextを指定することで修正できます。修正案
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
28-28: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents