Open
Conversation
Reviewer's Guide调整工具和设置页面的可见性逻辑,使初始选择和分类标题能够正确尊重隐藏功能配置和强制显示模式,并从导航中移除未使用的工具页面子类型分支。 工具页面加载和可见性刷新时序图sequenceDiagram
actor User
participant FormMain
participant PageToolsLeft
participant PageSetupUI
participant ConfigPreferenceHide
User->>FormMain: NavigateToTools()
FormMain->>PageToolsLeft: Show()
PageToolsLeft->>PageToolsLeft: PageLinkLeft_Loaded()
PageToolsLeft->>ConfigPreferenceHide: Read Hide config
PageToolsLeft->>PageToolsLeft: Determine IsHiddenPage
PageToolsLeft->>PageSetupUI: HiddenRefresh()
PageSetupUI->>ConfigPreferenceHide: Read Hide config
PageSetupUI->>PageToolsLeft: Set item visibility
PageSetupUI->>PageToolsLeft: Set TextGameLinkCategory visibility
PageSetupUI->>PageToolsLeft: Set TextToolsCategory visibility
PageToolsLeft->>PageToolsLeft: If not IsLoad or IsHiddenPage
PageToolsLeft->>PageToolsLeft: Select first nonhidden tools subtype
PageToolsLeft->>FormMain: Update PageID for tools
FormMain-->>User: Tools page shown with correct items and headers
更新后的设置与工具导航可见性逻辑类图classDiagram
class PageToolsLeft {
-IsLoad Boolean
-IsPageSwitched Boolean
+PageID FormMain_PageSubType
+AnimatedControl Object
+New()
+PageLinkLeft_Loaded(sender Object, e RoutedEventArgs) Void
+PageGet(ID FormMain_PageSubType) Object
+ItemGameLink Object
+ItemLauncherHelp Object
+ItemTest Object
+TextGameLinkCategory Object
+TextToolsCategory Object
}
class PageSetupLeft {
-IsLoad Boolean
-IsPageSwitched Boolean
+PageID FormMain_PageSubType
+New()
+PageLinkLeft_Loaded(sender Object, e RoutedEventArgs) Void
+ItemLaunch Object
+ItemJava Object
+ItemGameManage Object
+ItemGameLink Object
+ItemUI Object
+ItemLauncherMisc Object
+ItemAbout Object
+ItemUpdate Object
+ItemFeedback Object
+ItemLog Object
}
class PageSetupUI {
+HiddenForceShow Boolean
+HiddenRefresh() Void
}
class ConfigPreferenceHide {
+ToolsGameLink Boolean
+ToolsHelp Boolean
+ToolsTest Boolean
+SetupLaunch Boolean
+SetupJava Boolean
+SetupGameManage Boolean
+SetupGameLink Boolean
+SetupUi Boolean
+SetupLauncherMisc Boolean
+SetupAbout Boolean
+SetupUpdate Boolean
+SetupFeedback Boolean
+SetupLog Boolean
}
class ConfigPreference {
+Hide ConfigPreferenceHide
}
class Config {
+Preference ConfigPreference
}
class FormMain_PageSubType {
<<enumeration>>
+ToolsGameLink
+ToolsTest
+ToolsLauncherHelp
+SetupLaunch
+SetupJava
+SetupGameManage
+SetupGameLink
+SetupUI
+SetupLauncherMisc
+SetupAbout
+SetupUpdate
+SetupFeedback
+SetupLog
}
PageSetupUI --> ConfigPreferenceHide : reads
PageToolsLeft --> ConfigPreferenceHide : reads
PageSetupLeft --> ConfigPreferenceHide : reads
ConfigPreferenceHide <-- ConfigPreference
ConfigPreference <-- Config
PageToolsLeft --> FormMain_PageSubType : uses
PageSetupLeft --> FormMain_PageSubType : uses
PageSetupUI --> PageToolsLeft : updates visibility
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your Experience访问你的 dashboard 以:
Getting HelpOriginal review guide in EnglishReviewer's GuideAdjusts tools and setup page visibility logic so initial selection and category headers correctly respect hidden-feature configuration and force-show mode, and removes an unused tools page subtype branch from navigation. Sequence diagram for tools page load and visibility refreshsequenceDiagram
actor User
participant FormMain
participant PageToolsLeft
participant PageSetupUI
participant ConfigPreferenceHide
User->>FormMain: NavigateToTools()
FormMain->>PageToolsLeft: Show()
PageToolsLeft->>PageToolsLeft: PageLinkLeft_Loaded()
PageToolsLeft->>ConfigPreferenceHide: Read Hide config
PageToolsLeft->>PageToolsLeft: Determine IsHiddenPage
PageToolsLeft->>PageSetupUI: HiddenRefresh()
PageSetupUI->>ConfigPreferenceHide: Read Hide config
PageSetupUI->>PageToolsLeft: Set item visibility
PageSetupUI->>PageToolsLeft: Set TextGameLinkCategory visibility
PageSetupUI->>PageToolsLeft: Set TextToolsCategory visibility
PageToolsLeft->>PageToolsLeft: If not IsLoad or IsHiddenPage
PageToolsLeft->>PageToolsLeft: Select first nonhidden tools subtype
PageToolsLeft->>FormMain: Update PageID for tools
FormMain-->>User: Tools page shown with correct items and headers
Class diagram for updated setup and tools navigation visibility logicclassDiagram
class PageToolsLeft {
-IsLoad Boolean
-IsPageSwitched Boolean
+PageID FormMain_PageSubType
+AnimatedControl Object
+New()
+PageLinkLeft_Loaded(sender Object, e RoutedEventArgs) Void
+PageGet(ID FormMain_PageSubType) Object
+ItemGameLink Object
+ItemLauncherHelp Object
+ItemTest Object
+TextGameLinkCategory Object
+TextToolsCategory Object
}
class PageSetupLeft {
-IsLoad Boolean
-IsPageSwitched Boolean
+PageID FormMain_PageSubType
+New()
+PageLinkLeft_Loaded(sender Object, e RoutedEventArgs) Void
+ItemLaunch Object
+ItemJava Object
+ItemGameManage Object
+ItemGameLink Object
+ItemUI Object
+ItemLauncherMisc Object
+ItemAbout Object
+ItemUpdate Object
+ItemFeedback Object
+ItemLog Object
}
class PageSetupUI {
+HiddenForceShow Boolean
+HiddenRefresh() Void
}
class ConfigPreferenceHide {
+ToolsGameLink Boolean
+ToolsHelp Boolean
+ToolsTest Boolean
+SetupLaunch Boolean
+SetupJava Boolean
+SetupGameManage Boolean
+SetupGameLink Boolean
+SetupUi Boolean
+SetupLauncherMisc Boolean
+SetupAbout Boolean
+SetupUpdate Boolean
+SetupFeedback Boolean
+SetupLog Boolean
}
class ConfigPreference {
+Hide ConfigPreferenceHide
}
class Config {
+Preference ConfigPreference
}
class FormMain_PageSubType {
<<enumeration>>
+ToolsGameLink
+ToolsTest
+ToolsLauncherHelp
+SetupLaunch
+SetupJava
+SetupGameManage
+SetupGameLink
+SetupUI
+SetupLauncherMisc
+SetupAbout
+SetupUpdate
+SetupFeedback
+SetupLog
}
PageSetupUI --> ConfigPreferenceHide : reads
PageToolsLeft --> ConfigPreferenceHide : reads
PageSetupLeft --> ConfigPreferenceHide : reads
ConfigPreferenceHide <-- ConfigPreference
ConfigPreference <-- Config
PageToolsLeft --> FormMain_PageSubType : uses
PageSetupLeft --> FormMain_PageSubType : uses
PageSetupUI --> PageToolsLeft : updates visibility
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
MoYuan-CN
requested changes
Mar 21, 2026
There was a problem hiding this comment.
Hey - 我在这里给出一些总体反馈:
- 用于选择第一个未隐藏工具子页面的逻辑在
PageToolsLeft.New和PageToolsLeft_Loaded之间有重复;可以考虑把这段逻辑抽取到一个共享的辅助方法中,这样选择规则就集中在一个地方了。 - 在
PageSetupLeft_Loaded中,对不同的条目既有使用本地变量hide,也有直接访问Config.Preference.Hide的情况;统一采用一种方式会让可见性条件更容易理解,也更不容易出错。 PageSetupUI.HiddenRefresh中针对工具分类标题的新可见性逻辑,在每个条件里都显式包含了HiddenForceShow,但它其实已经在全局层面处理过了;你可能可以简化这些表达式,在不改变行为的前提下提升可读性。
给 AI 代理的提示
Please address the comments from this code review:
## Overall Comments
- The logic for choosing the first non-hidden tools subpage is duplicated between PageToolsLeft.New and PageToolsLeft_Loaded; consider extracting this into a shared helper to keep the selection rules in one place.
- In PageSetupLeft_Loaded you mix use of the local `hide` variable and direct `Config.Preference.Hide` access for different items; standardizing on one approach will make the visibility conditions easier to follow and less error-prone.
- The new visibility logic for tools category headers in PageSetupUI.HiddenRefresh includes `HiddenForceShow` in each condition even though it's already handled globally; you may be able to simplify these expressions to improve readability without changing behavior.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据这些反馈来改进后续的评审。
Original comment in English
Hey - I've left some high level feedback:
- The logic for choosing the first non-hidden tools subpage is duplicated between PageToolsLeft.New and PageToolsLeft_Loaded; consider extracting this into a shared helper to keep the selection rules in one place.
- In PageSetupLeft_Loaded you mix use of the local
hidevariable and directConfig.Preference.Hideaccess for different items; standardizing on one approach will make the visibility conditions easier to follow and less error-prone. - The new visibility logic for tools category headers in PageSetupUI.HiddenRefresh includes
HiddenForceShowin each condition even though it's already handled globally; you may be able to simplify these expressions to improve readability without changing behavior.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The logic for choosing the first non-hidden tools subpage is duplicated between PageToolsLeft.New and PageToolsLeft_Loaded; consider extracting this into a shared helper to keep the selection rules in one place.
- In PageSetupLeft_Loaded you mix use of the local `hide` variable and direct `Config.Preference.Hide` access for different items; standardizing on one approach will make the visibility conditions easier to follow and less error-prone.
- The new visibility logic for tools category headers in PageSetupUI.HiddenRefresh includes `HiddenForceShow` in each condition even though it's already handled globally; you may be able to simplify these expressions to improve readability without changing behavior.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
功能隐藏 Bug 多多😰
Summary by Sourcery
调整 tools 和 setup 页面,在选择默认子页面和显示分类标题时遵从隐藏功能(hidden-feature)配置。
Bug 修复:
增强:
Original summary in English
Summary by Sourcery
Adjust tools and setup pages to respect hidden-feature configuration while selecting default subpages and displaying category headers.
Bug Fixes:
Enhancements: