-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
dialog.NewProgressInfinite is deprecated, but dialog.NewCustom isn't equivalent #2782
Comments
Thanks for this. I agree with the general point, though not sure about |
Marking this as blocker so that it is in place for at least one release before deprecations may be removed. |
By the way, @andydotxyz , why not leave |
We deprecated |
Hm. There are a lot of tasks which take several seconds to be finished, but it's too complex or too long to stop them, or authors see no need to stop them.
In fact, you know, some developers may not agree with this and they will still create infinite progress dialogs, so may be you can provide them with a standard implementation, specially when you already have the API. |
First of all, I do want this to turn into a long argument back and forth. Let me just clarify my last comment based on your answers. My last comment should have provided some more clarification to begin with.
It's not about long tasks that can't be stopped, or such. If someone has a dialog that pops up with a progress dialog, there is often a better way to handle the problem. Go has excellent support for threading and doing things concurrently. If a developer decides that they really need to do this, they can simply make a custom dialog with the same functionality (or so we though).
That's not really how you create a good API. We need to provide an API with sensible defaults, by iterating and improving as we go. If that means removing something that we think no longer fits in, we need to do so. There will always be people that use APIs in a way that wasn't anticipated or intended, but that doesn't mean that we should make that easier. I hope that this clarifies why we decided to deprecate it. Is there any other use-case for dialogs without buttons, except for progress dialogs? |
Ok, ok, it's your framework, it's your decisions, no problem =) |
Apologies @e1fueg0 I think this may have been responded to a bit abruptly. Your comment is a good one and we need to think about it. @Jacalz The comment on the deprecation notice states that instead of infinite progress the custom dialog should be used, but as noted above it's not the same, as the buttons cannot be removed. |
Yes. We (or perhaps mostly I) were certainly wrong in that assumption. It's absolutely something we should fix. Sorry if that didn't come across in my earlier messages. I just tried to explain why we came to the decision that we did, and I might have worded those answers in a poor way. |
No problems at all, guys, you're doing a really great job. |
If there are more use cases for the "no button dialog", then I think it could be a viable solution. If not, I'm not quite sure if it is worth adding just for creating progress dialogs though. Then I'd say we update the documentation. |
I can see that it is easier to imagine to think it will be useful than to say it is always a bad thing ;) |
Linter complains about dialog.NewProgressInfinite() deprecation: dialog.NewProgressInfinite is deprecated: Create a new custom dialog with a widget.ProgressBarInfinite() inside. (SA1019) there is still an open ticket fyne-io/fyne#2782 on difference against the new implementation. Exclude these from linter and consider refactoring.
Linter complains about dialog.NewProgressInfinite() deprecation: dialog.NewProgressInfinite is deprecated: Create a new custom dialog with a widget.ProgressBarInfinite() inside. (SA1019) there is still an open ticket fyne-io/fyne#2782 on difference against the new implementation. Exclude these from linter and consider refactoring.
* workflows: Implement linux build. Implement a build workflow for Linux. Ref: #1 * Update build.yml * Create test.yml * build.yml: Add windows build Ref: #2 * Update test.yml * Update build.yml * build.yml: Add icons * Update build.yml * Added android build to build workflow * Create static-code-analysis.yml * Remove darwin build Requires Xcode license * Update build.yml * Add dependencies to static code analysis workflow * Update static-code-analysis.yml * Update readme with CI statuses * internal: Exclude dialog.NewProgressInfinite() from linter deprecation. Linter complains about dialog.NewProgressInfinite() deprecation: dialog.NewProgressInfinite is deprecated: Create a new custom dialog with a widget.ProgressBarInfinite() inside. (SA1019) there is still an open ticket fyne-io/fyne#2782 on difference against the new implementation. Exclude these from linter and consider refactoring. * git.mod/sum: Update dependencies. * loginView: display progress bar when connecting to the Bee client. * passwordsView: Increase domains and user table column width. The current table width for domains and users turned out to be too narrow in most cases. Increase the width of the two columns for better readability. * passwordCreate: Implement batch passwords import from Google Chrome/ Brave export. It is possible to export all Google Chrome/Brave passwords to a CSV file. The expected input format of the CSV file is: name,url,username,password discord.com,https://discord.com/login,[email protected],your_secure_password github.com,https://github.com/session,[email protected],your_secure_password The first line will be omitted. Ref: #8 * build.yml: Refactor build job to use GitHub matrix. Reference: https://docs.github.com/en/actions/using-jobs/using-a-build-matrix-for-your-jobs * release.yml: Add release job with GitHub matrix support. Reference: https://docs.github.com/en/actions/using-jobs/using-a-build-matrix-for-your-jobs
This is frustrating but we decided not a blocker. |
Indeed. This is technically not a blocker until it is being removed. We’ll get this sorted way before then. |
We discussed improving custom dialogs on our call this Friday and it seems like we have a path forward. I will try to get that sorted, and thus also solve this, when I have some time over. |
Any update about this discussion? I think it would be useful in a goroutine like the code below. go func() {
noBtn := dialogs.NewCustomWithoutButton(SOME CONTENTS)
defer noBtn.Close() // or defer noBtn.Hide()
// any progress
} |
The update is my comment above. Have not had any time to start working on this yet... |
I implemented a dialog without buttons by making some modifications to the |
I have opened #3703. Feel free to test and see if it suits your use cases. |
I will close this as completed now that the PR has been merged into the |
Is your feature request related to a problem? Please describe:
dialog.NewProgressInfinite()
uses a trick to get rid of dismiss button, butdialog.NewCustom()
doens't give such possibility.Is it possible to construct a solution with the existing API?
Still use
dialog.NewProgressInfinite()
.Describe the solution you'd like to see:
The simplest way is to not create dismiss button if
dismiss string
parameter ofdialog.NewCustom()
is empty.Or maybe version like
dialog.NewCustomWithButtons()
or event exposesetButtons()
method.The text was updated successfully, but these errors were encountered: