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

v0.8.0: Added 21 new UI prefabs and improved some existing ones #15

Merged
merged 25 commits into from
Dec 10, 2024

Conversation

kurone-kito
Copy link
Owner

@kurone-kito kurone-kito commented Dec 10, 2024

Overview

We added 21 new UI prefabs and improved some existing ones. We also updated the sample world to include the QvPen and improved some catalogs.

new-prefabs

Features

  • 70702e6, b786941, 374459f, d490d95, 9a1dc94, 63169f0, 9057d2b: added 21 new UI prefabs
    • Atoms/Nav/ButtonTab
    • Molecules/ButtonTab/ButtonToggle
    • Molecules/ButtonTab/SelectButton
    • Molecules/ButtonTab/SlideSwitchTab
    • Molecules/Nav/MenuCategoryBase
    • Molecules/QuickMenu/QuickMenu
    • Organisms/Category/AvatarsMenu
    • Organisms/Category/GroupsMenu
    • Organisms/Category/HelpAndInfoMenu
    • Organisms/Category/MarketplaceMenu
    • Organisms/Category/NotificationsMenu
    • Organisms/Category/SettingsMenu
    • Organisms/Category/SocialMenu
    • Organisms/Category/VRChatPlusMenu
    • Organisms/Modal/AlertModal
    • Organisms/Modal/BottomAlertModal
    • Organisms/Modal/BottomConfirmModal
    • Organisms/Modal/ConfirmModal
    • Organisms/QuickMenu/QLaunchPadMenu
    • Organisms/Status/Fps
    • Organisms/Status/Progress
  • 0001303, 95b50a6, 34f2de3, 83ce74d: improved the existing UI prefabs
    • Atoms/Nav/ButtonTab
    • Atoms/Nav/CategoryItem
    • Molecules/Cards/GroupCard
    • Molecules/Cards/LocationCard
    • Molecules/Cards/WorldCard
    • Molecules/Cards/WorldCardWithTab
    • Molecules/Nav/GroupCategoryItem

Updates the sample world

  • 537d6f3, 53347d8: improved the catalog scene which includes the QvPen
  • improved some catalogs
    • d6a5bdb: for the composited list prefab
    • 0744bdc: for the composited scrollbars prefab
    • e685f0e: for the composited toggles prefab
    • a9c0807: for the atomic sliders prefabs
    • 6a9a0ae: for the atomic toggles prefab

Other updates

  • c6a0573: Bumped version to 0.8.0
  • 3f49cb6: added the resources, e.g., fonts, images
  • 669a1e5: improved the Unity project settings
  • de88e7f: updated the dependencies

Updates for project environment

  • dd16ded: increased the specified .NET version
  • ccd730d: improved the Git configuration

CI/CD

  • 22725ef: improved the coderabbit configuration

Summary by CodeRabbit

  • New Features

    • Introduced custom editors for ButtonToggle, Fps, and Progress components in the Unity Editor.
    • Added animation clips for various button states, enhancing UI responsiveness.
    • Implemented localization for new components, improving usability for English and Japanese users.
  • Bug Fixes

    • Refined path filters in configuration files to improve asset management.
  • Documentation

    • Updated metadata files for new assets and prefabs to ensure proper management within Unity.
  • Chores

    • Updated version of the .NET framework in project settings.

@kurone-kito kurone-kito added the enhancement New feature or request label Dec 10, 2024
@kurone-kito kurone-kito self-assigned this Dec 10, 2024
Copy link

coderabbitai bot commented Dec 10, 2024

Walkthrough

The pull request introduces several updates across multiple configuration and code files. The .coderabbit.yaml file has refined path filters for exclusions, while the .gitattributes file updates handling for specific file types and directories. New metadata files have been added for various assets, including prefabs and animation controllers, enhancing their management within Unity. Additionally, new animation clips and editor scripts for components like ButtonToggle and Fps have been introduced, providing tailored functionalities in the Unity Editor. Localization files have also been updated to include new message entries.

Changes

File Path Change Summary
.coderabbit.yaml Updated path filters for Assets and ProjectSettings exclusions.
.gitattributes Modified handling for file types and directories; updated export-ignore settings.
.gitconfig Standardized formatting for the smudge command in the [filter "vrc"] section.
.gitignore Added new entries for ignoring Unity and VRChat specific files.
.tool-versions Updated .NET framework version from 8.0.403 to 8.0.404.
.vscode/settings.json Changed schema mapping for .coderabbit.yaml to a new URL.
Packages/black.kit.vrcui/Editor/Concreted/ButtonToggleEditor.cs Introduced a custom editor for the ButtonToggle component.
Packages/black.kit.vrcui/Editor/Concreted/FpsEditor.cs Added a custom editor for the Fps component.
Packages/black.kit.vrcui/Editor/Concreted/ProgressEditor.cs Created a custom editor for the Progress component.
Packages/black.kit.vrcui/Editor/T.cs Added new localization constants for DETAIL_BUTTON_TOGGLE, DETAIL_FPS, and DETAIL_PROGRESS.
Packages/black.kit.vrcui/Editor/en.po Added new message entries for localization in English.
Packages/black.kit.vrcui/Editor/ja.po Added new message entries for localization in Japanese.
Packages/black.kit.vrcui/Runtime/Animations/ButtonTab.controller Introduced a new animator controller for ButtonTab with multiple states and clips.
Packages/black.kit.vrcui/Runtime/Animations/ButtonToggle.controller Created a new animator controller for ButtonToggle with defined states and transitions.
Packages/black.kit.vrcui/Examples/... Added multiple new metadata files for prefabs and other assets, ensuring proper configuration in Unity.

Possibly related PRs

  • v0.4.1: Attached the Supersampled UI shader #7: The changes in the .coderabbit.yaml file regarding path filters may relate to the updates in the .gitattributes file in this PR, as both involve configuration settings that affect how files are managed and excluded in the project.
  • v0.4.2: Update for usability tweaks #8: The modifications to the .gitconfig and .vscode/settings.json files in this PR may have indirect relevance to the changes in .coderabbit.yaml, as they all pertain to project configuration and settings management.
  • v0.5.0: Added some UI prefabs and cumulative updates #9: The updates in .vscode/settings.json regarding file nesting and associations could be related to the changes in .coderabbit.yaml, as both involve configurations that affect the development environment and file management within Unity projects.

🐇 In the meadow where changes bloom,
New paths and filters make room.
Editors crafted with care and delight,
Animations dance, oh what a sight!
With each update, our tools grow bright,
Hopping forward, we take flight! 🌼


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (7)
.gitignore (1)

205-205: Consider using a more specific pattern for debug logs.

The current pattern debug.log* might be too broad and could accidentally ignore important files.

Consider using a more specific pattern:

-debug.log*
+[Dd]ebug.log
+[Dd]ebug.log.*
Packages/black.kit.vrcui/Editor/Concreted/ButtonToggleEditor.cs (1)

27-28: Consider caching serialized property lookup

The FindProperty call could be moved to the constructor to avoid repeated lookups during every GUI update.

Apply this diff to cache the property:

+        private SerializedProperty togglesProperty;
+
+        public ButtonToggleEditor() : base(L10n.Tr(T.DETAIL_BUTTON_TOGGLE))
+        {
+            togglesProperty = serializedObject.FindProperty(ButtonToggle.NAME_TOGGLES);
+        }

         public override void OnInspectorGUI()
         {
             // ... existing code ...
-            var arrayProp = serializedObject.FindProperty(ButtonToggle.NAME_TOGGLES);
-            toggle.group.CompleteToggles(arrayProp);
+            toggle.group.CompleteToggles(togglesProperty);
Packages/black.kit.vrcui/Examples/Scripts/StatusCatalog.cs (1)

30-30: Simplify boolean expression

The double negation (!!) is an unusual syntax that could be simplified.

Apply this diff to improve readability:

-        protected override bool ValidateInspector() => !!progress;
+        protected override bool ValidateInspector() => progress != null;
Packages/black.kit.vrcui/Editor/en.po (1)

8-13: LGTM with minor formatting suggestions.

The translations are clear and descriptive. Consider these minor improvements for consistency:

  • "FPS" could be expanded to "Frames Per Second (FPS)" for better clarity
  • Consider adding HTML formatting tags for technical terms like "TextMeshPro" to match the style of other entries (e.g., <b>TextMeshPro</b>)

Also applies to: 20-22

Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabBody.controller (1)

187-187: Consider adjusting transition durations for smoother animations.

The current transition duration of 0.05 seconds might be too quick for smooth visual feedback. Consider testing with slightly longer durations (e.g., 0.1-0.2 seconds) if the animations appear too abrupt.

Also applies to: 20-20

Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonToggleBody.controller (2)

3-27: Consider optimizing state transitions

The current transition configuration might benefit from these improvements:

  1. Disable self-transitions to prevent animation stuttering when the same state is triggered multiple times
  2. Consider making transition duration configurable via parameters for more flexibility

Apply this change to each transition:

   m_TransitionDuration: 0.05
   m_TransitionOffset: 0
   m_ExitTime: 1
   m_HasExitTime: 0
   m_HasFixedDuration: 1
   m_InterruptionSource: 0
   m_OrderedInterruption: 1
-  m_CanTransitionToSelf: 1
+  m_CanTransitionToSelf: 0

Also applies to: 140-164, 231-255


165-204: Standardize parameter naming convention

The parameter "UnSelected" uses inconsistent capitalization compared to other parameters.
Consider renaming it to maintain consistency:

  • Current: "Neutral", "UnSelected", "Selected"
  • Suggested: "Neutral", "Unselected", "Selected"
   m_AnimatorParameters:
   - m_Name: Neutral
     m_Type: 9
     m_DefaultFloat: 0
     m_DefaultInt: 0
     m_DefaultBool: 0
     m_Controller: {fileID: 0}
-  - m_Name: UnSelected
+  - m_Name: Unselected
     m_Type: 9
     m_DefaultFloat: 0
     m_DefaultInt: 0
     m_DefaultBool: 0
     m_Controller: {fileID: 0}
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b0a3a4c and c6a0573.

⛔ Files ignored due to path filters (79)
  • Assets/TextMesh Pro/Fonts/Dosis-Regular - OFL.txt is excluded by !Assets/TextMesh Pro/**/*
  • Assets/TextMesh Pro/Fonts/Dosis-Regular - OFL.txt.meta is excluded by !Assets/TextMesh Pro/**/*
  • Assets/TextMesh Pro/Fonts/Dosis-Regular.ttf is excluded by !**/*.ttf, !Assets/TextMesh Pro/**/*
  • Assets/TextMesh Pro/Fonts/Dosis-Regular.ttf.meta is excluded by !Assets/TextMesh Pro/**/*
  • Assets/TextMesh Pro/Resources/Fonts & Materials/Dosis-Regular SDF - Drop Shadow.mat is excluded by !**/*.mat, !Assets/TextMesh Pro/**/*
  • Assets/TextMesh Pro/Resources/Fonts & Materials/Dosis-Regular SDF - Drop Shadow.mat.meta is excluded by !Assets/TextMesh Pro/**/*
  • Assets/TextMesh Pro/Resources/Fonts & Materials/Dosis-Regular SDF - Fallback.asset is excluded by !**/*.asset, !Assets/TextMesh Pro/**/*
  • Assets/TextMesh Pro/Resources/Fonts & Materials/Dosis-Regular SDF - Fallback.asset.meta is excluded by !Assets/TextMesh Pro/**/*
  • Assets/TextMesh Pro/Resources/Fonts & Materials/Dosis-Regular SDF - Outline.mat is excluded by !**/*.mat, !Assets/TextMesh Pro/**/*
  • Assets/TextMesh Pro/Resources/Fonts & Materials/Dosis-Regular SDF - Outline.mat.meta is excluded by !Assets/TextMesh Pro/**/*
  • Assets/TextMesh Pro/Resources/Fonts & Materials/Dosis-Regular SDF.asset is excluded by !**/*.asset, !Assets/TextMesh Pro/**/*
  • Assets/TextMesh Pro/Resources/Fonts & Materials/Dosis-Regular SDF.asset.meta is excluded by !Assets/TextMesh Pro/**/*
  • Packages/black.kit.vrcui/Examples/Images/Icon-example.png is excluded by !**/*.png
  • Packages/black.kit.vrcui/Examples/Prefabs/Atoms/ButtonTabCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Atoms/LargeTabItemsCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Atoms/ScrollbarsCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Atoms/SlidersCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Atoms/TogglesCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Common/Credit.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Common/MainMenuCategoryCatalogBase.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Common/QuickMenuCatalogBase.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/BasicCardsCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/ButtonTogglesCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/CompositedButtonsCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/CompositedCards1Catalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/CompositedCards2Catalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/CompositedCategoryItemsCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/CompositedTogglesCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/HeroCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/ListsCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/ModalBaseCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/ScrollRectsCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/StatusToggleCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/SummaryCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/TextSlideSwitchCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/ThickScrollbarsCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/WingBaseCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/AlertModalCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/BottomAlertModalCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/BottomConfirmModalCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/CategoryMenuCatalog1.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/CategoryMenuCatalog2.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/ConfirmModalCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/QLaunchPadMenuCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/StatusCatalog.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Examples/Scenes/Catalogs.unity is excluded by !**/*.unity
  • Packages/black.kit.vrcui/Examples/Scripts/StatusCatalog.asset is excluded by !**/*.asset
  • Packages/black.kit.vrcui/Runtime/Prefabs/Atoms/Nav/ButtonTab.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Atoms/Nav/CategoryItem.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Molecules/ButtonTab/ButtonToggle.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Molecules/ButtonTab/SelectButton.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Molecules/ButtonTab/SlideSwitchTab.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Molecules/Buttons/IconWithCaptionButton.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Molecules/Buttons/QuickButton.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Molecules/Cards/GroupCard.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Molecules/Cards/LocationCard.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Molecules/Cards/WorldCard.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Molecules/Cards/WorldCardWithTab.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Molecules/Nav/MenuCategoryBase.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Molecules/QuickMenu/QuickMenu.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Category/AvatarsMenu.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Category/GroupsMenu.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Category/HelpAndInfoMenu.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Category/MarketplaceMenu.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Category/NotificationsMenu.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Category/SettingsMenu.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Category/SocialMenu.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Category/VRChatPlusMenu.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Modal/AlertModal.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Modal/BottomAlertModal.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Modal/BottomConfirmModal.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Modal/ConfirmModal.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/QuickMenu/QLaunchPadMenu.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Status/Fps.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Prefabs/Organisms/Status/Progress.prefab is excluded by !**/*.prefab
  • Packages/black.kit.vrcui/Runtime/Scripts/ButtonToggle.asset is excluded by !**/*.asset
  • Packages/black.kit.vrcui/Runtime/Scripts/Fps.asset is excluded by !**/*.asset
  • Packages/black.kit.vrcui/Runtime/Scripts/Progress.asset is excluded by !**/*.asset
  • ProjectSettings/ProjectSettings.asset is excluded by !**/*.asset, !ProjectSettings/**/*
📒 Files selected for processing (47)
  • .coderabbit.yaml (1 hunks)
  • .gitattributes (1 hunks)
  • .gitconfig (1 hunks)
  • .gitignore (1 hunks)
  • .tool-versions (1 hunks)
  • .vscode/settings.json (1 hunks)
  • Packages/black.kit.vrcui/Editor/Concreted/ButtonToggleEditor.cs (1 hunks)
  • Packages/black.kit.vrcui/Editor/Concreted/ButtonToggleEditor.cs.meta (1 hunks)
  • Packages/black.kit.vrcui/Editor/Concreted/FpsEditor.cs (1 hunks)
  • Packages/black.kit.vrcui/Editor/Concreted/FpsEditor.cs.meta (1 hunks)
  • Packages/black.kit.vrcui/Editor/Concreted/ProgressEditor.cs (1 hunks)
  • Packages/black.kit.vrcui/Editor/Concreted/ProgressEditor.cs.meta (1 hunks)
  • Packages/black.kit.vrcui/Editor/T.cs (1 hunks)
  • Packages/black.kit.vrcui/Editor/en.po (1 hunks)
  • Packages/black.kit.vrcui/Editor/ja.po (1 hunks)
  • Packages/black.kit.vrcui/Examples/Images/Icon-example.png.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Atoms/ButtonTabCatalog.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Common/MainMenuCategoryCatalogBase.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Common/QuickMenuCatalogBase.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/ButtonTogglesCatalog.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/AlertModalCatalog.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/BottomAlertModalCatalog.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/BottomConfirmModalCatalog.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/CategoryMenuCatalog1.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/CategoryMenuCatalog2.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/ConfirmModalCatalog.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/QLaunchPadMenuCatalog.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/StatusCatalog.prefab.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Scripts/StatusCatalog.asset.meta (1 hunks)
  • Packages/black.kit.vrcui/Examples/Scripts/StatusCatalog.cs (1 hunks)
  • Packages/black.kit.vrcui/Examples/Scripts/StatusCatalog.cs.meta (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab.meta (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTab.controller (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTab.controller.meta (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabBody.controller (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabBody.controller.meta (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabIdle.anim (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabIdle.anim.meta (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabNeutral.anim (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabNeutral.anim.meta (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabUnselected.anim (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabUnselected.anim.meta (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonToggle.controller (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonToggle.controller.meta (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonToggleBody.controller (1 hunks)
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonToggleBody.controller.meta (1 hunks)
✅ Files skipped from review due to trivial changes (33)
  • .gitconfig
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabBody.controller.meta
  • Packages/black.kit.vrcui/Examples/Scripts/StatusCatalog.asset.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Atoms/ButtonTabCatalog.prefab.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/BottomConfirmModalCatalog.prefab.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/QLaunchPadMenuCatalog.prefab.meta
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonToggle.controller.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms.meta
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabUnselected.anim.meta
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabNeutral.anim.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/CategoryMenuCatalog2.prefab.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/BottomAlertModalCatalog.prefab.meta
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabIdle.anim.meta
  • Packages/black.kit.vrcui/Examples/Scripts/StatusCatalog.cs.meta
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonToggleBody.controller.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Molecules/ButtonTogglesCatalog.prefab.meta
  • Packages/black.kit.vrcui/Editor/Concreted/ProgressEditor.cs.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/StatusCatalog.prefab.meta
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTab.controller.meta
  • Packages/black.kit.vrcui/Editor/Concreted/FpsEditor.cs.meta
  • .gitattributes
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabNeutral.anim
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab.meta
  • Packages/black.kit.vrcui/Examples/Images/Icon-example.png.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/CategoryMenuCatalog1.prefab.meta
  • .tool-versions
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabIdle.anim
  • Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabUnselected.anim
  • Packages/black.kit.vrcui/Examples/Prefabs/Common/QuickMenuCatalogBase.prefab.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/ConfirmModalCatalog.prefab.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Organisms/AlertModalCatalog.prefab.meta
  • Packages/black.kit.vrcui/Examples/Prefabs/Common/MainMenuCategoryCatalogBase.prefab.meta
  • Packages/black.kit.vrcui/Editor/Concreted/ButtonToggleEditor.cs.meta
🔇 Additional comments (36)
.coderabbit.yaml (1)

9-11: LGTM! Verify the completeness of exclusion patterns.

The refined path filters provide better granularity by excluding specific third-party directories instead of broad exclusions. This allows for better code review coverage while still excluding vendor files.

Let's verify if these patterns cover all necessary third-party directories:

Also applies to: 13-13

✅ Verification successful

The exclusion patterns are complete and accurate

The verification confirms that the current exclusion patterns (TextMesh Pro, UdonSharp, and XR) correctly identify all the major third-party directories in the Assets folder. These directories contain typical vendor files (.asset files) and follow standard Unity asset structures. No additional third-party directories were found that would require exclusion.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any additional third-party directories that might need exclusion
# Look for potential vendor directories in Assets that aren't currently excluded

fd --type d --max-depth 2 '^(TextMesh Pro|UdonSharp|XR)' Assets/

Length of output: 116


Script:

#!/bin/bash
# Let's check for other potential third-party or vendor-like directories in Assets
fd --type d --max-depth 2 . Assets/ | grep -iE '(sdk|pro|plugin|vendor|package|third|external)'

# Also check if there are any large files or binary files in these directories that confirm they are vendor files
find Assets/TextMesh\ Pro Assets/UdonSharp Assets/XR -type f -name "*.*" | grep -iE '\.(dll|bundle|so|dylib|jar|aar|framework|asset|unitypackage)$'

Length of output: 1516

.gitignore (3)

198-200: LGTM! TextMesh Pro exclusions added.

Appropriate exclusion of TextMesh Pro generated files.


202-203: LGTM! UdonSharp build artifacts excluded.

Correctly excludes UdonSharp's generated files and build artifacts.


208-209: LGTM! VRChat SDK exclusions added.

Appropriate exclusion of VRChat SDK's client simulation storage.

.vscode/settings.json (1)

164-167: Verify the accessibility of the new schema URL.

The schema URL has been updated to use Google Cloud Storage, which should provide better availability.

Let's verify the schema accessibility:

✅ Verification successful

Schema URL is accessible and properly configured

The new schema URL is working correctly with proper JSON content type and caching headers. The schema file is hosted on Google Cloud Storage with standard availability and is publicly accessible.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new schema URL is accessible
curl -I https://storage.googleapis.com/coderabbit_public_assets/schema.v2.json

Length of output: 1065

Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTab.controller (11)

4-28: Animator State 'Normal' Configuration

The 'Normal' animator state is correctly defined with the appropriate settings and linked to the 'Normal' animation clip. All state parameters such as speed, cycle offset, and motion are properly set.


30-54: Transition to 'Selected' State is Properly Configured

The transition from the 'Normal' state to the 'Selected' state is correctly set up with the condition based on the 'Selected' parameter. Transition duration and other settings are appropriately configured.


55-407: Animation Clip 'Highlighted' Parameters are Correct

The 'Highlighted' animation clip is well-defined with accurate curve data for UI elements such as icon opacity, label opacity, position, and background color. The animation curves ensure smooth transitions for the highlighted state.


412-437: Animator State 'Selected' Configuration

The 'Selected' animator state is properly defined and linked to the 'Selected' animation clip. All necessary parameters are correctly set.


438-793: Animation Clips 'Disabled' and 'Selected' Correctly Defined

The 'Disabled' and 'Selected' animation clips have appropriate curve definitions for color and position, ensuring correct visual representation of the button in different states.


1152-1177: Animator State 'Disabled' Configuration

The 'Disabled' state is correctly configured with proper parameters and linked to the 'Disabled' animation clip. This ensures the UI reflects the disabled state accurately.


1178-1203: Animator State 'Pressed' Configuration

The 'Pressed' state is properly set up and associated with the 'Pressed' animation clip. Parameters like speed and cycle offset are correctly assigned.


1204-1560: Animation Clip 'Pressed' Parameters are Accurate

The animation clip for the 'Pressed' state contains the correct curves for animating UI elements during the pressed interaction, ensuring responsive feedback.


1561-1599: Animator Parameters Defined Appropriately

All animator parameters ('Normal', 'Highlighted', 'Pressed', 'Selected', 'Disabled') are correctly declared, enabling state transitions based on user interactions.


1613-1687: Animator State Transitions Configured Correctly

Transitions between states are properly set up with the correct conditions and transition durations, ensuring smooth state changes in response to parameter updates.


1714-1752: Animator State Machine Structure is Proper

The base layer state machine includes all necessary states and transitions. The default state is set to 'Normal', which is appropriate for initialization.

Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonToggle.controller (9)

4-28: Animator State 'Normal' Configuration

The 'Normal' animator state for 'ButtonToggle' is correctly defined and linked to its corresponding animation clip. State parameters are accurately set.


30-54: Transition to 'Selected' State is Properly Configured

The transition condition to the 'Selected' state is correctly based on the 'Selected' parameter, with appropriate transition duration and offset.


55-560: Animation Clip 'Highlighted' Correctly Defined

The 'Highlighted' animation clip includes precise curve definitions for UI element properties, ensuring visual consistency when the button is highlighted.


565-590: Animator State 'Selected' Configuration

The 'Selected' state is properly configured with the correct motion reference, facilitating accurate representation of the selected state.


591-1100: Animation Clip 'Disabled' Parameters are Correct

The 'Disabled' animation clip is defined with appropriate curves, ensuring UI elements reflect the disabled state visually.


1637-1662: Animator State 'Pressed' Configuration

The 'Pressed' state is correctly set up and linked to the 'Pressed' animation clip, with all necessary state settings defined.


1663-2172: Animation Clip 'Pressed' Accurately Configured

The 'Pressed' animation clip contains accurate curve data for UI element animations during the pressed interaction, providing immediate feedback to the user.


2173-2211: Animator Parameters Properly Declared

All required animator parameters are defined, allowing for state transitions based on user interactions with the 'ButtonToggle'.


2225-2898: Animator State Machine and Transitions Configured Correctly

The state machine structure and transitions are correctly implemented, ensuring seamless state changes in the 'ButtonToggle' component.

Packages/black.kit.vrcui/Editor/Concreted/FpsEditor.cs (2)

7-12: Constructor Implements Localization Correctly

The constructor of FpsEditor correctly initializes the base class with a localized string using L10n.Tr(T.DETAIL_FPS), ensuring the editor displays the appropriate localized detail text.


15-20: Override of OnInspectorGUI is Properly Implemented

The OnInspectorGUI method is correctly overridden to include custom drawing methods DrawBanner() and DrawDetails() before calling the base implementation, enhancing the inspector GUI for the Fps component.

Packages/black.kit.vrcui/Editor/Concreted/ProgressEditor.cs (2)

7-12: Constructor Utilizes Localization Appropriately

The ProgressEditor constructor correctly passes a localized string L10n.Tr(T.DETAIL_PROGRESS) to the base class, ensuring proper localization support in the editor.


15-20: OnInspectorGUI Method is Correctly Overridden

The override of OnInspectorGUI effectively customizes the inspector by invoking DrawBanner() and DrawDetails() before the base method, providing an enhanced user experience for the Progress component.

Packages/black.kit.vrcui/Editor/ja.po (1)

8-22: LGTM! Clear and well-structured translations

The new message entries provide clear and accurate Japanese translations that align well with the component functionalities. The translations maintain consistency with the existing style and format.

Packages/black.kit.vrcui/Editor/T.cs (1)

6-7: LGTM! Constants follow consistent naming and implementation patterns.

The new localization constants are well-structured and use the nameof operator consistently, which provides compile-time safety for localization keys.

Also applies to: 10-10

Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonTabBody.controller (2)

28-57: LGTM! Well-structured state machine with clear transitions.

The animator controller has a clean layout with proper state positioning and logical transitions. The base layer is well-organized with appropriate entry/exit points.


78-78: Verify the referenced animation clips.

Please ensure the following animation clips exist and contain appropriate animations:

  • guid: 818197309d73e9b4092cb4d404477821 (ButtonTabUnselected)
  • guid: 2b09d89a41e18204181b508ef0acff8b (ButtonTabNeutral)
  • guid: 6a5e557315fc22a4e885e81ed155e323 (ButtonTabIdle)

Also applies to: 104-104, 164-164

✅ Verification successful

Animation clips are present and properly referenced

The search results confirm that all the required animation clips exist in the project:

  • ButtonTabUnselected (818197309d73e9b4092cb4d404477821)
  • ButtonTabNeutral (2b09d89a41e18204181b508ef0acff8b)
  • ButtonTabIdle (6a5e557315fc22a4e885e81ed155e323)

All files are located in Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ directory.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the referenced animation clips exist in the project

# Search for the animation clip GUIDs
echo "Searching for animation clips..."
fd -t f --full-path . | xargs grep -l "818197309d73e9b4092cb4d404477821\|2b09d89a41e18204181b508ef0acff8b\|6a5e557315fc22a4e885e81ed155e323"

Length of output: 14695

Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ButtonToggleBody.controller (3)

28-61: Well-organized state machine structure

The state machine is cleanly organized with:

  • Logical state positioning for visual clarity
  • Clear entry/exit points
  • Appropriate default state selection

1-255: Verify edge case handling

Please ensure the following scenarios are tested:

  1. Rapid state changes (spam clicking)
  2. Interrupted transitions
  3. Initial state behavior on prefab instantiation

Would you like me to provide a test script that covers these scenarios?


62-139: Verify animation clip references

Please ensure all referenced animation clips exist and are properly configured:

  • ButtonToggleIdle: f1882743851625243abf9ff71448492f
  • ButtonToggleNeutral: f5351a9430a7afd4ca6e6ce30d86bc0e
  • ButtonToggleSelected: 19ff43c615dc72144995fed8605ebda4
  • ButtonToggleUnselected: 488c0b40ed25c1b449ec71e7d3bdfa5a

Also applies to: 205-230

✅ Verification successful

Based on the output, I can see that all four animation clips exist in the project at the correct locations:

  1. ButtonToggleIdle.anim.meta
  2. ButtonToggleNeutral.anim.meta
  3. ButtonToggleSelected.anim.meta
  4. ButtonToggleUnselected.anim.meta

All files are located in the Packages/black.kit.vrcui/Runtime/Animations/ButtonTab/ directory and their GUIDs match exactly with those referenced in the animator controller.

All animation clips are properly configured and present

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all referenced animation clips exist in the project
# Note: Animation clips in Unity are stored as .anim files

echo "Searching for animation clips..."
for guid in f1882743851625243abf9ff71448492f f5351a9430a7afd4ca6e6ce30d86bc0e 19ff43c615dc72144995fed8605ebda4 488c0b40ed25c1b449ec71e7d3bdfa5a; do
    fd -e meta | xargs grep -l "$guid"
done

Length of output: 32079

Comment on lines +24 to +29
var toggle = TypedTarget.GetComponent<Toggle>();
if (toggle.group)
{
var arrayProp = serializedObject.FindProperty(ButtonToggle.NAME_TOGGLES);
toggle.group.CompleteToggles(arrayProp);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add null check for toggle component

The code assumes the Toggle component exists and directly accesses its group property without validation. This could cause NullReferenceException if the Toggle component is missing.

Apply this diff to add proper null checks:

-            var toggle = TypedTarget.GetComponent<Toggle>();
-            if (toggle.group)
+            var toggle = TypedTarget.GetComponent<Toggle>();
+            if (toggle != null && toggle.group != null)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
var toggle = TypedTarget.GetComponent<Toggle>();
if (toggle.group)
{
var arrayProp = serializedObject.FindProperty(ButtonToggle.NAME_TOGGLES);
toggle.group.CompleteToggles(arrayProp);
}
var toggle = TypedTarget.GetComponent<Toggle>();
if (toggle != null && toggle.group != null)
{
var arrayProp = serializedObject.FindProperty(ButtonToggle.NAME_TOGGLES);
toggle.group.CompleteToggles(arrayProp);
}

Comment on lines +24 to +25
var gap = Random.Range(0f, 0.5f);
progress.Value = (progress.Value + delta + gap) % progress.Limit;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add bounds checking and null validation for progress updates

The code directly accesses the progress component without null validation and doesn't ensure the calculated value stays within valid bounds.

Apply this diff to add proper validation:

-            var gap = Random.Range(0f, 0.5f);
-            progress.Value = (progress.Value + delta + gap) % progress.Limit;
+            if (progress != null)
+            {
+                var gap = Random.Range(0f, 0.5f);
+                var newValue = (progress.Value + delta + gap) % progress.Limit;
+                progress.Value = Mathf.Clamp(newValue, 0f, progress.Limit);
+            }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
var gap = Random.Range(0f, 0.5f);
progress.Value = (progress.Value + delta + gap) % progress.Limit;
if (progress != null)
{
var gap = Random.Range(0f, 0.5f);
var newValue = (progress.Value + delta + gap) % progress.Limit;
progress.Value = Mathf.Clamp(newValue, 0f, progress.Limit);
}

@kurone-kito kurone-kito merged commit 718d595 into main Dec 10, 2024
1 check passed
@kurone-kito kurone-kito deleted the add-the-organisms branch December 10, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant