Show WButton group conflict warnings when foldouts are collapsed - #251
Merged
Eli Pinkerton (wallstop) merged 12 commits intoMay 8, 2026
Conversation
8 tasks
Agent-Logs-Url: https://github.com/wallstop/unity-helpers/sessions/3c78021c-03d2-420e-975a-3ef953b6d893 Co-authored-by: wallstop <1045249+wallstop@users.noreply.github.com>
Agent-Logs-Url: https://github.com/wallstop/unity-helpers/sessions/3c78021c-03d2-420e-975a-3ef953b6d893 Co-authored-by: wallstop <1045249+wallstop@users.noreply.github.com>
Agent-Logs-Url: https://github.com/wallstop/unity-helpers/sessions/3c78021c-03d2-420e-975a-3ef953b6d893 Co-authored-by: wallstop <1045249+wallstop@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix conflicting placements in WButton Groups to display user warnings
Show WButton group conflict warnings when foldouts are collapsed
Apr 29, 2026
Eli Pinkerton (wallstop)
marked this pull request as ready for review
April 29, 2026 22:28
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an Editor UX gap in the WButton UI by ensuring conflict warnings (draw order / group priority / group placement) remain visible even when WButton groups start collapsed, and adds regression tests to prevent the issue from reappearing.
Changes:
- Render WButton conflict warnings outside the foldout body so they show even when a group is collapsed.
- Add internal test accessors for warning text caches to enable assertions in collapsed-foldout scenarios.
- Add regression tests covering collapsed-foldout warning visibility for placement, priority, and draw order conflicts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Tests/Editor/WButton/WButtonConflictWarningDisplayTests.cs | Adds regression tests asserting conflict warnings are generated/rendered when foldouts start collapsed. |
| Editor/Utils/WButton/WButtonGUI.cs | Moves conflict warning rendering out of foldout content gating and adds internal cache accessors for tests. |
Comment on lines
63
to
84
| check_npm_tool() { | ||
| local name="$1" | ||
| local cmd="$2" | ||
| local version_flag="${3:---version}" | ||
| local output="" | ||
| local status=0 | ||
|
|
||
| printf "%-20s" "$name:" | ||
| if npx --no-install "$cmd" $version_flag >/dev/null 2>&1; then | ||
| version=$(npx --no-install "$cmd" $version_flag 2>&1 | head -1) | ||
| if output="$(timeout 30s npx --no-install "$cmd" $version_flag 2>&1)"; then | ||
| version=$(printf '%s\n' "$output" | head -1) | ||
| printf "${GREEN}✓${NC} %s (via npx)\n" "$version" | ||
| return 0 | ||
| else | ||
| printf "${RED}✗ NOT FOUND - run 'npm install'${NC}\n" | ||
| status=$? | ||
| if [ "$status" -eq 124 ]; then | ||
| printf "${RED}✗ TIMED OUT - npx %s %s${NC}\n" "$cmd" "$version_flag" | ||
| else | ||
| printf "${RED}✗ NOT FOUND - run 'npm install'${NC}\n" | ||
| fi | ||
| FAILED=$((FAILED + 1)) | ||
| return 1 | ||
| fi |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 89 out of 103 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
scripts/verify-devcontainer-tools.sh:85
- This script still validates repo-pinned npm tools via
npx --no-install, but the rest of the repo has switched to invoking pinned Node CLIs through the repo-local launchers (scripts/run-prettier.js and scripts/run-node-bin.js). Using npx here can give inconsistent results (e.g., PATH/npx quirks or .bin shim behavior) and makes the verification less representative of how hooks/CI actually run these tools. Consider switching these checks to the same repo-local launchers used elsewhere.
Comment on lines
70
to
79
| [SetUp] | ||
| public virtual void BaseSetUp() | ||
| { | ||
| #if REFLEX_PRESENT | ||
| EnsureReflexSettings(); | ||
| #endif | ||
| #if UNITY_EDITOR | ||
| CleanupPackageRootGeneratedArtifacts(); | ||
| _previousEditorUiSuppress = EditorUi.Suppress; | ||
| EditorUi.Suppress = true; |
Comment on lines
+84
to
+96
| # Validate the results path before creating the test project. Writing a Unity | ||
| # project or test output under WORKSPACE_DIR makes those generated files part of | ||
| # the imported package and can trigger Unity import-loop failures. | ||
| RESULTS_DIR="${UNITY_TEST_PROJECT_DIR}/test-results" | ||
| workspace_realpath="$(cd "${WORKSPACE_DIR}" && pwd -P)" | ||
| results_realpath="$(realpath -m "${RESULTS_DIR}")" | ||
| case "${results_realpath}" in | ||
| "${workspace_realpath}"|"${workspace_realpath}"/*) | ||
| echo "ERROR: Refusing to write Unity test results inside the package root: ${results_realpath}" | ||
| echo "ERROR: Set UNITY_TEST_PROJECT_DIR outside ${workspace_realpath} to avoid Unity package import loops." | ||
| exit 1 | ||
| ;; | ||
| esac |
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.
Description
Conflicting
groupPlacementvalues were detected internally but could be effectively invisible when WButton groups started collapsed, which made misconfiguration easy to miss.This updates warning rendering so conflicts remain visible regardless of foldout state and adds regression coverage for collapsed groups.
Warning visibility fix
Scope of conflicts covered
Regression test coverage
WButtonConflictWarningDisplayTestsfor all three warning types.StartCollapsedmode.Related Issue
Addresses the linked bug report for missing user-visible feedback on conflicting WButton group placements.
Type of Change
Checklist