-
Notifications
You must be signed in to change notification settings - Fork 340
refactor(core): extract MessageBox to separate UI package #590
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
JasonXuDeveloper
merged 9 commits into
master
from
refactor/extract-messagebox-to-ui-package
Jan 28, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d9508df
refactor(core): extract MessageBox to separate UI package
JasonXuDeveloper 834cb50
fix(core): address PR review feedback for Prompt abstraction
JasonXuDeveloper c42c3fe
fix(core): remove redundant initialization and namespace
JasonXuDeveloper 0bcfa9c
fix(core): remove JEngine.Util reference from HotUpdate.Code
JasonXuDeveloper 8627fb9
chore(ui): update packages-lock.json for TextMeshPro dependency
JasonXuDeveloper 97ee140
chore(ui): set initial version to 0.0.0
JasonXuDeveloper 9682ac9
docs: add guidelines for creating new JEngine packages
JasonXuDeveloper 0dfaba8
docs: restructure CLAUDE.md into modular rules
JasonXuDeveloper d2fab2c
docs: add rule references and update copilot instructions
JasonXuDeveloper 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,50 @@ | ||
| # JEngine Coding Patterns | ||
|
|
||
| ## Async Patterns | ||
|
|
||
| Use `UniTask` for async operations, not `System.Threading.Tasks.Task`: | ||
| ```csharp | ||
| public async UniTask<bool> LoadAssetAsync() { } | ||
| ``` | ||
|
|
||
| ## Thread Safety | ||
|
|
||
| For properties accessed across callbacks: | ||
| ```csharp | ||
| private static volatile bool _flag; | ||
| public static bool Flag => _flag; | ||
| ``` | ||
|
|
||
| ## Encryption Architecture | ||
|
|
||
| JEngine supports three encryption algorithms: | ||
| - **XOR** (`EncryptionOption.Xor`) - Fast, simple | ||
| - **AES** (`EncryptionOption.Aes`) - Moderate security | ||
| - **ChaCha20** (`EncryptionOption.ChaCha20`) - High security | ||
|
|
||
| Each has implementations for bundles and manifests in `Runtime/Encrypt/`. | ||
|
|
||
| ### Adding New Encryption | ||
|
|
||
| 1. Create config class in `Runtime/Encrypt/Config/` | ||
| 2. Implement bundle encryption in `Runtime/Encrypt/Bundle/` | ||
| 3. Implement manifest encryption in `Runtime/Encrypt/Manifest/` | ||
| 4. Add to `EncryptionOption` enum | ||
| 5. Update `EncryptionMapping` class | ||
|
|
||
| ## ScriptableObject Configuration | ||
|
|
||
| Use `ScriptableObject` for runtime configuration: | ||
| ```csharp | ||
| public abstract class ConfigBase<T> : ScriptableObject where T : ConfigBase<T> | ||
| { | ||
| public static T Instance { get; } | ||
| } | ||
| ``` | ||
|
|
||
| ## Editor Scripts | ||
|
|
||
| - Use `[InitializeOnLoad]` for editor initialization | ||
| - Handle Unity domain reloads properly (state resets on recompile) | ||
| - Use `SessionState` or `EditorPrefs` for persistent editor state | ||
| - Clean up resources in `EditorApplication.quitting` |
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,73 @@ | ||
| # Commit Message Format | ||
|
|
||
| All commits should follow the Conventional Commits specification to enable automatic changelog generation. | ||
|
|
||
| ## Format | ||
|
|
||
| ``` | ||
| <type>(<scope>): <subject> | ||
|
|
||
| <body> | ||
|
|
||
| <footer> | ||
| ``` | ||
|
|
||
| ## Types | ||
|
|
||
| - `feat:` - New feature (appears in changelog as "Feature") | ||
| - `fix:` - Bug fix (appears in changelog as "Fixed") | ||
| - `docs:` - Documentation only changes (not in changelog) | ||
| - `style:` - Code style/formatting changes (not in changelog) | ||
| - `refactor:` - Code refactoring (not in changelog) | ||
| - `test:` - Test changes (not in changelog) | ||
| - `chore:` - Build/config changes (not in changelog) | ||
| - `BREAKING CHANGE:` - Breaking changes (in footer, triggers major version bump) | ||
|
|
||
| ## Scopes | ||
|
|
||
| - `core` - Changes to JEngine.Core package | ||
| - `util` - Changes to JEngine.Util package | ||
| - `ui` - Changes to JEngine.UI package | ||
| - `ci` - Changes to CI/CD workflows | ||
| - `docs` - Changes to documentation | ||
|
|
||
| ## Examples | ||
|
|
||
| ```bash | ||
| feat(core): add ChaCha20 encryption support | ||
| fix(util): resolve JAction memory leak on cancellation | ||
| docs: update installation guide for Unity 2022.3 | ||
| refactor(core): simplify bootstrap initialization | ||
| test(util): add coverage for JAction edge cases | ||
| chore(ci): update GameCI Unity version to 2022.3.55f1 | ||
| ``` | ||
|
|
||
| ## Breaking Changes | ||
|
|
||
| For breaking changes, include `BREAKING CHANGE:` in the footer: | ||
|
|
||
| ```bash | ||
| feat(core)!: redesign encryption API | ||
|
|
||
| BREAKING CHANGE: EncryptionManager.Encrypt() now requires EncryptionConfig parameter | ||
| ``` | ||
|
|
||
| ## Guidelines | ||
|
|
||
| - Keep subject line under 72 characters | ||
| - Use imperative mood ("add" not "added" or "adds") | ||
| - Don't capitalize first letter of subject | ||
| - Don't end subject with a period | ||
| - Separate subject from body with blank line | ||
| - Wrap body at 72 characters | ||
| - Use body to explain what and why (not how) | ||
|
|
||
| ## Developer Certificate of Origin (DCO) | ||
|
|
||
| All commits must be signed off using `--signoff` (or `-s`) flag: | ||
|
|
||
| ```bash | ||
| git commit -s -m "feat(core): add new feature" | ||
| ``` | ||
|
|
||
| This adds a `Signed-off-by` line certifying you have the right to submit the code under the project's license. |
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,38 @@ | ||
| # Creating New JEngine Packages | ||
|
|
||
| When creating a new JEngine package: | ||
|
|
||
| 1. **Version**: Start at `0.0.0` (not `1.0.0`) | ||
| 2. **Naming**: Use `com.jasonxudeveloper.jengine.<name>` format | ||
| 3. **Location**: `Packages/com.jasonxudeveloper.jengine.<name>/` | ||
|
|
||
| ## Required Files | ||
|
|
||
| - `package.json` - Package manifest with version `0.0.0` | ||
| - `Runtime/<Name>.asmdef` - Assembly definition | ||
| - `README.md` - Package documentation (optional) | ||
|
|
||
| ## Example package.json | ||
|
|
||
| ```json | ||
| { | ||
| "name": "com.jasonxudeveloper.jengine.<name>", | ||
| "version": "0.0.0", | ||
| "displayName": "JEngine.<Name>", | ||
| "description": "Description here.", | ||
| "license": "MIT", | ||
| "unity": "2022.3", | ||
| "author": { | ||
| "name": "Jason Xu", | ||
| "email": "[email protected]", | ||
| "url": "https://github.com/JasonXuDeveloper" | ||
| }, | ||
| "dependencies": {} | ||
| } | ||
| ``` | ||
|
|
||
| ## CI Updates Required | ||
|
|
||
| 1. Add package path to `.github/workflows/pr-tests.yml` | ||
| 2. Add release support to `.github/workflows/release.yml` | ||
| 3. Add new scope to commit message conventions |
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.