Skip to content

🎨 Palette: 增加配对按钮加载状态的平滑过渡动画 - #240

Open
01luyicheng wants to merge 1 commit into
devfrom
feat-ux-pairing-button-animation-3184410954167170060
Open

01luyicheng wants to merge 1 commit into
devfrom
feat-ux-pairing-button-animation-3184410954167170060

Conversation

@01luyicheng

Copy link
Copy Markdown
Owner

💡 What: 为配对按钮添加了 AnimatedContent,使其在“配对”文本和加载指示器之间实现平滑过渡。
🎯 Why: 异步操作期间按钮内的状态突变(例如直接切换为加载动画)会给用户带来突兀感。平滑的过渡动画能提供更好的视觉连贯性和更精致的微交互体验。
📸 Before/After: 无(主要是视觉过渡优化)
♿ Accessibility: 确保 CircularProgressIndicator 继承正确的颜色 (LocalContentColor.current),保证了在按钮禁用状态下的最佳对比度,符合无障碍标准。


PR created automatically by Jules for task 3184410954167170060 started by @01luyicheng

Co-authored-by: 01luyicheng <172185967+01luyicheng@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI balanced review requested due to automatic review settings November 2, 2026 12:50
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-02T12:50:35.144981Z
We couldn’t complete this review. Comment @codex review to try again.
4d775dc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 572365a3-5a6f-438b-aff2-f6f0b45e5599
Commits

Reviewing files that changed from the base of the PR and between b217d54 and 4d775dc.

Files selected for processing: 2
  • .Jules/palette.md
  • android/app/src/main/java/com/netproxy/gateway/ui/screens/MainScreen.kt

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Recent review details
Context from checks skipped due to timeout: 6
  • GitHub Check: CodeRabbit
  • GitHub Check: Android Build & Test
  • GitHub Check: Secret Scan
  • GitHub Check: CI config guard
  • GitHub Check: commitlint
  • GitHub Check: dependency-review
Additional context used
Learnings: 1
Learning: 2026-07-26T18:48:43.009Z
Learnt from: 01luyicheng
Repo: 01luyicheng/NetProxyGateway PR: 0
File: :0-0
Timestamp: 2026-07-26T18:48:43.009Z
Learning: In `android/app/src/main/java/com/netproxy/gateway/ui/screens/MainScreen.kt`, values rendered within an `AnimatedContent` lambda must be derived from its `targetData` rather than live `UiState` when each entering/exiting content instance must retain its own state through the animation. `VpnStatusCard` therefore uses `StatusCardData.isVpnRunning` for the indicator instead of `uiState.isVpnEnabled`.

Applied to files:

  • android/app/src/main/java/com/netproxy/gateway/ui/screens/MainScreen.kt
Additional comments: 2
android/app/src/main/java/com/netproxy/gateway/ui/screens/MainScreen.kt: 1

608-627: LGTM!

.Jules/palette.md: 1

9-12: LGTM!

Summary

Summary by CodeRabbit

  • 改进
    • 配对按钮现在会在“配对”和“配对中”状态之间平滑切换,并在配对过程中显示进度指示器。

PairingSection 根据 uiState.isPairingInProgress 使用 AnimatedContent 切换配对按钮内容。配对中显示进度指示器和“配对中”,否则显示“配对”。.Jules/palette.md 新增相关记录。

Changes: 配对按钮状态过渡

Layer / File(s) Summary
配对按钮内容状态切换
android/app/src/main/java/com/netproxy/gateway/ui/screens/MainScreen.kt, .Jules/palette.md
PairingSection 使用 AnimatedContent 按配对状态切换按钮内容。新增记录建议使用 Row 布局,并在默认文本与加载指示器之间平滑过渡。

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Merge Risk: Minimal · up to 4d775

The pairing button transition preserves correct loading behavior and disabled-state presentation.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed 标题明确说明了为配对按钮加载状态增加平滑过渡动画,准确概括了变更的主要内容。
Description check Passed 描述说明了使用 AnimatedContent 在“配对”文本和加载指示器之间实现平滑过渡,并解释了变更原因。内容与变更集相关。
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

兔子看见按钮轻轻变,
配对进行时,圆环转一圈。
“配对中”随动画出现,
状态结束,文字又切换。
新变化记在小札页间。

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