Skip to content

Conversation

@Lachklen
Copy link
Contributor

@Lachklen Lachklen commented Jan 26, 2026

Описание PR

Небольшой фикс разного рода UI в редакторе персонажа:

  • Скрытие пустых категорий в лоадаутах.
  • Добавление кнопок взаимодействия для невозможных лоадаутов.
  • Исправлена недоступность выбранных лоадаутов.

Медиа

Список

Лоадауты:
image

Трейты:
image


Изменения

🆑 Myaflic

  • fix: Исправлены некоторые части UI в редакторе персонажей
  • add: Переводы редактора персонажей и всего меню лобби

@Lachklen
Copy link
Contributor Author

Всё я пошёл

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Walkthrough

Реализована функция управления неиспользуемыми загрузками (loadouts) в редакторе профиля персонажей. Добавлены UI элементы для отображения и удаления неподходящих загрузок, расширена логика обновления состояния загрузок с проверкой требований, и реализовано распространение видимости загрузок через иерархию компонентов.

Changes

Cohort / File(s) Описание изменений
UI-слой LoadoutPicker и LoadoutEntry
Content.Client/_White/Loadouts/LoadoutPicker.xaml.cs, Content.Client/_White/Loadouts/LoadoutEntry.xaml.cs
Добавлено свойство ShowUnusable для управления видимостью неиспользуемых загрузок. LoadoutPicker распространяет состояние на все экземпляры LoadoutEntry. Переработана логика проверки носимости с условной активацией элементов UI и динамическим стилированием.
Основной редактор профиля
Content.Client/Lobby/UI/HumanoidProfileEditor.xaml, Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs, Content.Client/Lobby/UI/ProfileEditor/HumanoidProfileEditor.CharacterEditor.cs
Добавлены кнопки управления загрузками в XAML-разметку. Реализовано отслеживание загрузок (_loadouts), обработка событий переключения видимости и удаления неиспользуемых загрузок. Переработан метод UpdateLoadouts для пересчета состояния загрузок с проверкой требований через CharacterRequirementsSystem.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

Changes: C#, Changes: UI, Status: Needs Review

Suggested reviewers

  • Remuchi
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.77% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed Название PR соответствует основному назначению изменений — исправление различных проблем UI в редакторе персонажа, включая скрытие пустых категорий, добавление кнопок и исправление доступности лоадаутов.
Description check ✅ Passed Описание PR связано с изменениями в коде: скрытие пустых категорий лоадаутов, добавление кнопок для невозможных лоадаутов и исправление доступности выбранных лоадаутов соответствуют внесённым изменениям.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@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: 4

🤖 Fix all issues with AI agents
In `@Content.Client/Lobby/UI/HumanoidProfileEditor.xaml`:
- Around line 199-214: The LoadoutsRemoveUnusableButton currently has an English
placeholder ("You shouldn't see this"); change its initial Text to a neutral
value (e.g., empty string or a localized placeholder) in the XAML so the user
never sees the English message, and ensure the UpdateLoadoutsRemoveButton method
is responsible for populating the final label at runtime for
LoadoutsRemoveUnusableButton.

In `@Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs`:
- Around line 2406-2441: CheckAndHideTabs only hides tabs but never restores
them; change the logic so it sets visibility explicitly based on current content
(i.e., call container.SetTabVisible(tabId, !shouldHide) instead of only hiding),
ensure CheckNestedContainer still recurses into nested NeoTabContainer and
returns whether it has any visible child controls, and update HasVisibleTraits
to reflect current selector.Visible state; also wire a call to
CheckAndHideTabs(TraitsTabs) (or the same updater) whenever filters/state that
affect trait visibility (e.g., "show unusable") change so tabs are re-evaluated
and shown again when traits become visible.
- Around line 2482-2503: The UpdateLoadoutsRemoveButton method sets the wrong
style class on LoadoutsRemoveUnusableButton causing OpenRight to be applied
instead of OpenLeft; update both branches in UpdateLoadoutsRemoveButton to
RemoveStyleClass(StyleBase.ButtonOpenLeft) /
AddStyleClass(StyleBase.ButtonOpenLeft) as appropriate (replace references to
StyleBase.ButtonOpenRight with StyleBase.ButtonOpenLeft) so the button matches
the XAML and avoids duplicate/conflicting rounded-corner classes.
- Around line 2457-2479: После удаления лодаутов в TryRemoveUnusableLoadouts
Profile обновляется, но не вызываются методы, которые обновляют превью и флаг
"dirty"; исправьте это, либо вызвав существующую общую логику (вызвать
OnLoadoutsChange() после присвоения Profile), либо явно вызвать
ReloadProfilePreview() и ReloadClothes() и обновление состояния сохранения после
строки Profile = currentProfile; чтобы превью и кнопки сохранения
синхронизировались с новым Profile.

@Lachklen
Copy link
Contributor Author

Там если что в процессе всё

@Lachklen
Copy link
Contributor Author

Сделаю-ка я драфт

@Lachklen Lachklen marked this pull request as draft January 29, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant