Skip to content
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

Error dialogs should be auto capitalized #4876

Open
2 tasks done
lostdusty opened this issue May 24, 2024 · 4 comments
Open
2 tasks done

Error dialogs should be auto capitalized #4876

lostdusty opened this issue May 24, 2024 · 4 comments

Comments

@lostdusty
Copy link

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

According to Go's wiki:

Error strings should not be capitalized (unless beginning with proper nouns or acronyms) or end with punctuation, since they are usually printed following other context.

However, our context (error dialogs) are usually showed to the end/final user, and I believe texts in error dialogs should start capitalized, and end with a period.

See discussion on Discord.

Is it possible to construct a solution with the existing API?

Yes

Describe the solution you'd like to see.

By default, every error dialog should start capitalized and end with a period. I believe most languages follows this "convention" (?).
To disable, maybe you could use a function like:

a := dialog.NewError(fmt.Errorf("something went very wrong in our side, error code: %v", errInt))
a.DisableAutoCaps()
a.Show()
@Jacalz
Copy link
Member

Jacalz commented May 25, 2024

I am a bit torn on this one (not saying no it; just not sure). If you need to show something more readable, would it not be better to use the information dialog? You cloud attach some extra information and be more helpful for the user.

@andydotxyz
Copy link
Member

Given that this is just a helper for what may be unexpected errors it seems like something reasonable to add, given that Go insists we have no capital letters at the beginning of the text.

@Jacalz
Copy link
Member

Jacalz commented May 28, 2024

Yeah, I have come to the same conclusion after thinking more about this :)

@lostdusty
Copy link
Author

Maybe later I can submit a PR :)

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

No branches or pull requests

3 participants