Skip to content

Unify MihomoScaffold for all screens#159

Merged
Goooler merged 1 commit into
trunkfrom
unify-scaffold
Apr 29, 2026
Merged

Unify MihomoScaffold for all screens#159
Goooler merged 1 commit into
trunkfrom
unify-scaffold

Conversation

@Goooler
Copy link
Copy Markdown
Owner

@Goooler Goooler commented Apr 29, 2026

No description provided.

@Goooler Goooler force-pushed the unify-scaffold branch 2 times, most recently from 1e373b5 to d1e39ab Compare April 29, 2026 04:03
@Goooler Goooler requested a review from Copilot April 29, 2026 04:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR standardizes screen layout by routing snackbar presentation and top app bar customization through MihomoScaffold, removing per-screen Box + SnackbarHost overlays and aligning screens on a single scaffold pattern.

Changes:

  • Extend MihomoScaffold with topBar and snackbarHostState support (with a default SnackbarHost when a state is provided).
  • Update multiple screens to pass SnackbarHostState into MihomoScaffold / SettingsCommonScreen instead of rendering SnackbarHost manually.
  • Minor cleanup/reordering (e.g., annotation order in editable text screens, removal of now-unneeded imports/wrappers).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/src/main/kotlin/com/github/kr328/clash/ui/component/SettingsCommonScreen.kt Switch from snackbarHost slot to snackbarHostState passthrough into MihomoScaffold.
app/src/main/kotlin/com/github/kr328/clash/ui/component/MihomoScaffold.kt Add topBar slot + snackbarHostState and provide a default SnackbarHost implementation.
app/src/main/kotlin/com/github/kr328/clash/settings/ui/NetworkSettingsScreen.kt Use snackbarHostState on SettingsCommonScreen instead of an inline SnackbarHost.
app/src/main/kotlin/com/github/kr328/clash/settings/ui/EditableTextMapScreen.kt Minor annotation ordering cleanup around @OptIn / @Composable.
app/src/main/kotlin/com/github/kr328/clash/settings/ui/EditableTextListScreen.kt Minor annotation ordering cleanup around @OptIn / @Composable.
app/src/main/kotlin/com/github/kr328/clash/profile/ui/ProvidersScreen.kt Remove Box + SnackbarHost; pass snackbarHostState into MihomoScaffold.
app/src/main/kotlin/com/github/kr328/clash/profile/ui/ProfilesScreen.kt Remove Box + SnackbarHost; pass snackbarHostState into MihomoScaffold.
app/src/main/kotlin/com/github/kr328/clash/profile/ui/NewProfileScreen.kt Remove Box + SnackbarHost; pass snackbarHostState into MihomoScaffold.
app/src/main/kotlin/com/github/kr328/clash/main/ui/MainScreen.kt Wrap main content in MihomoScaffold (no top bar) and use scaffold padding for insets/snackbars.
app/src/main/kotlin/com/github/kr328/clash/log/ui/LogcatScreen.kt Replace custom snackbar host slot with snackbarHostState passed into MihomoScaffold.
app/src/main/kotlin/com/github/kr328/clash/crash/ui/AppCrashedScreen.kt Remove now-unnecessary opt-in on the top-level screen function (kept where needed).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/main/kotlin/com/github/kr328/clash/settings/ui/AppSettingsScreen.kt Outdated
Comment thread app/src/main/kotlin/com/github/kr328/clash/main/ui/HelpScreen.kt Outdated
Comment thread app/src/main/kotlin/com/github/kr328/clash/crash/ui/ApkBrokenScreen.kt Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Goooler Goooler merged commit 5f3cb1d into trunk Apr 29, 2026
7 checks passed
@Goooler Goooler deleted the unify-scaffold branch April 29, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants