-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have CopyDebugInfoButton change text to Copied...
on click
#9119
Have CopyDebugInfoButton change text to Copied...
on click
#9119
Conversation
f48a33c
to
2908de4
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9119 +/- ##
==========================================
- Coverage 90.75% 90.75% -0.01%
==========================================
Files 350 350
Lines 21778 21799 +21
==========================================
+ Hits 19764 19783 +19
- Misses 2014 2016 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/ert/gui/simulation/run_dialog.py
Outdated
self.setFixedWidth(140) | ||
|
||
def alternate_button_text_on_click_and_call_callback() -> None: | ||
self.setText("Copied...") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider alternatives like;
Copied!
Copied to clipboard!
Copied to clipboard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried the alternatives, but I think Copied..
looks better
tests/ert/unit_tests/gui/ertwidgets/test_copy_debug_info_button.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely brilliant! Had some small suggestions, but you can decided what to act on, if anything. ❤️
2908de4
to
26959fd
Compare
This commit refactors the copydebuginfobutton in run_dialog.py into its own class, and makes it change text `Copy Debug Info" -> `Copied...` when clicked while running the callback passed to it. After one second, it changes it text back to `Copy Debug Info`.
26959fd
to
2f2e5d3
Compare
This commit refactors the copydebuginfobutton in run_dialog.py into its own class, and makes it change text
Copy Debug Info
->Copied...
when clicked while running the callback passed to it. After one second, it changes it text back toCopy Debug Info
.Approach
🚠
(Screenshot of new behavior in GUI if applicable)
Screen.Recording.2024-10-31.at.15.06.59.mov
git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"'
)When applicable