Restore classic settings UI with current theme colors - #26
Conversation
Reviewer's GuideThis PR restores the pre-refactor settings visual hierarchy by rebuilding grouped sections, shared row styling, standalone entry cards, and segmented execution controls, while continuing to use the current LineTheme/ThemePalette colors and preserving prior functional UI fixes. Layout tests and release notes are updated to reflect and verify the restored presentation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="app/src/main/java/cn/lineai/ui/component/SettingsScreenView.java" line_range="15" />
<code_context>
import android.widget.TextView;
import cn.lineai.R;
-public final class SettingsScreenView extends ScreenSurfaceView {
+public final class SettingsScreenView extends LinearLayout {
public interface Listener {
</code_context>
<issue_to_address>
**issue (broader_impact):** These screens no longer inherit `ScreenSurfaceView`, so they no longer execute its `onMeasure` logic that applies the 792dp reading-width gutter. In split-screen, tablet, and landscape layouts, their content expands to the full window width instead of retaining the established centered reading width.
**Triggers:** When any of these screens is displayed in a window wider than 792dp.
**Suggested fix:** Keep these classes extending `ScreenSurfaceView`, or move the reading-width measurement behavior into a shared base used by them.
</issue_to_address>
### Comment 2
<location path="app/src/main/java/cn/lineai/ui/component/ActionRowView.java" line_range="57" />
<code_context>
if (onClick != null) {
setClickable(true);
- setBackground(LineTheme.pressable(context));
setOnClickListener(v -> onClick.run());
}
</code_context>
<issue_to_address>
**nitpick (bug_risk):** Clickable action and option rows no longer have a pressable background, so taps invoke their listeners without any pressed/ripple visual feedback. This removes the interaction affordance from every caller that relies on these shared row components.
**Triggers:** When the user taps an `ActionRowView` or an inactive `OptionRowView`.
**Suggested fix:** Retain the pressable background for clickable rows and layer the active option color on top of it where needed.
</issue_to_address>
### Comment 3
<location path="app/src/main/java/cn/lineai/ui/component/SectionHeaderView.java" line_range="14" />
<code_context>
setIncludeFontPadding(false);
setTypeface(android.graphics.Typeface.create("sans-serif-medium", android.graphics.Typeface.NORMAL));
- LineTheme.padding(this, 28, 0, 28, 0);
- if (android.os.Build.VERSION.SDK_INT >= 28) setAccessibilityHeading(true);
+ setLetterSpacing(0.05f);
+ LineTheme.padding(this, LineTheme.LG, 0, LineTheme.LG, 0);
</code_context>
<issue_to_address>
**issue (bug_risk):** `SectionHeaderView` no longer marks section titles as accessibility headings, so screen readers expose these titles as ordinary text and users lose the ability to navigate the settings hierarchy by headings.
**Triggers:** When a screen reader is enabled.
**Suggested fix:** Keep `setAccessibilityHeading(true)` for API 28 and above while applying the restored visual styling.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: app/src/main/java/cn/lineai/ui/component/SettingsScreenView.java:15, app/src/main/java/cn/lineai/ui/component/SectionHeaderView.java:14
| import android.widget.TextView; | ||
| import cn.lineai.R; | ||
|
|
||
| public final class SettingsScreenView extends ScreenSurfaceView { |
There was a problem hiding this comment.
issue (broader_impact): These screens no longer inherit ScreenSurfaceView, so they no longer execute its onMeasure logic that applies the 792dp reading-width gutter. In split-screen, tablet, and landscape layouts, their content expands to the full window width instead of retaining the established centered reading width.
Triggers: When any of these screens is displayed in a window wider than 792dp.
Suggested fix: Keep these classes extending ScreenSurfaceView, or move the reading-width measurement behavior into a shared base used by them.
|
|
||
| if (onClick != null) { | ||
| setClickable(true); | ||
| setBackground(LineTheme.pressable(context)); |
There was a problem hiding this comment.
nitpick (bug_risk): Clickable action and option rows no longer have a pressable background, so taps invoke their listeners without any pressed/ripple visual feedback. This removes the interaction affordance from every caller that relies on these shared row components.
Triggers: When the user taps an ActionRowView or an inactive OptionRowView.
Suggested fix: Retain the pressable background for clickable rows and layer the active option color on top of it where needed.
| setIncludeFontPadding(false); | ||
| setTypeface(android.graphics.Typeface.create("sans-serif-medium", android.graphics.Typeface.NORMAL)); | ||
| LineTheme.padding(this, 28, 0, 28, 0); | ||
| if (android.os.Build.VERSION.SDK_INT >= 28) setAccessibilityHeading(true); |
There was a problem hiding this comment.
issue (bug_risk): SectionHeaderView no longer marks section titles as accessibility headings, so screen readers expose these titles as ordinary text and users lose the ability to navigate the settings hierarchy by headings.
Triggers: When a screen reader is enabled.
Suggested fix: Keep setAccessibilityHeading(true) for API 28 and above while applying the restored visual styling.
问题
设置 UI 重构把原来的分区卡片拆成了大量连续独立卡片,并移除了多数行内说明与彩色图标底板。设置主页、思考深度、工具与执行、模型提供商等页面因此显得密集,层级也弱于重构前。
调整结果
SettingsSectionView、ActionRowView、OptionRowView、SwitchRowView和SectionHeaderView的旧版尺寸、间距与层级,因此设置子页重新使用连续分组,而不是每行一个独立卡片。LineTheme/ThemePalette配色及内置主题色阶;没有回退主题颜色。update.md,明确 1.2.8-max 使用旧版设置结构与新版配色。回归验证
./gradlew :app:testDebugUnitTest./gradlew :app:lintDebug./gradlew :app:assembleDebug以上检查全部通过。
Summary by Sourcery
Restore the classic grouped settings UI while retaining current theme colors and existing functional fixes.
Enhancements:
Documentation:
Tests: