feat: Inline "Copied" confirmation and clickable copy/dismiss hints on AlertLine#26
Merged
Conversation
…rt copy and dismiss button clickable.
marcelomendoncasoares
approved these changes
Jul 3, 2026
marcelomendoncasoares
left a comment
Collaborator
There was a problem hiding this comment.
Formatting needs fixing, but LGTM! ✅
There was a problem hiding this comment.
Pull request overview
This PR updates the alert UX for copy/dismiss actions by moving the “copied” feedback inline into AlertLine and enabling click/tap interaction on the hint labels, backed by new state (alertCopied) and timer-based clearing behavior in the base app state.
Changes:
- Add
alertCopiedstate and a 2s timer window to show/clear an inline✓ Copiedconfirmation after copying an alert segment. - Make
AlertLine’sCopy/Dismisshints clickable via requiredonCopy/onDismisscallbacks (breaking API change). - Bump package version to
0.8.0and document changes inCHANGELOG.md.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/alert_test.dart | Updates tests to assert inline copied state (alertCopied) and removal of bottom hint line for alert copy. |
| test/alert_line_test.dart | Updates rendering helper for new AlertLine required params and adds coverage for copied-confirmation rendering. |
| pubspec.yaml | Version bump to 0.8.0 to reflect breaking API change. |
| lib/src/state.dart | Adds alertCopied state to support inline copied confirmation. |
| lib/src/app.dart | Adds copyAlert() logic + timer to set/clear alertCopied; clears state/timer on dismiss. |
| lib/src/app_state_holder.dart | Resets alertCopied when showing a new alert. |
| lib/src/alert_line.dart | Introduces clickable hint groups, new callbacks, and copied rendering mode. |
| CHANGELOG.md | Documents new features and breaking AlertLine API change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+138
to
+148
| /// Renders one hint group as a clickable [GestureDetector]. [MainAxisSize.min] | ||
| /// keeps the hit area to the text so only that hint responds to a tap. | ||
| Component _hint(List<(String, TextStyle)> spans, VoidCallback onTap) { | ||
| return GestureDetector( | ||
| onTap: onTap, | ||
| child: Row( | ||
| mainAxisSize: MainAxisSize.min, | ||
| children: [for (final (text, style) in spans) Text(text, style: style)], | ||
| ), | ||
| ); | ||
| } |
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.
Reworks the pinned
AlertLinecopy/dismiss:C(or clicking the hint) now swaps theC Copyhint for a green✓ Copiedfor ~2s using the same✓/successcolor as completed operations in the log.C CopyandEsc Dismissare now clickable, not just keyboard shortcuts.click-top-copy.mp4