Skip to content

[Feature request] Make App.create_window() accept any Into<String> type for the label #2290

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

Closed
woubuc opened this issue Jul 24, 2021 · 1 comment

Comments

@woubuc
Copy link
Contributor

woubuc commented Jul 24, 2021

Is your feature request related to a problem? Please describe.
The App.create_window() function takes a label as its first argument. This currently needs to be a String so I need to use .into() on every call to this function.

Describe the solution you'd like
I'd like to be able to pass a &str label to the function without having to add .into().

Additional context
I've implemented this change on my fork to see how complicated it would be. All internal functions seem to already use impl Into<String> for labels, it's only the main public-facing function that is fixed on a String.

Changing the type to impl Into<String> will cause .into() to stop working, so since this is the public-facing API this would constitute a breaking change and developers would need to update their uses of app.create_window() when updating their Tauri version. I reckon now is the time to make a usability change like this, since Tauri is still in beta.

@chippers
Copy link
Member

chippers commented Jul 24, 2021

Hi, thanks for your contribution! It looks good from a cursory glance, so I suggest you open up a PR with your fork and we can make a final decision there.

One thing to be changed is the changefile level, this should be a patch not major change, and perhaps mention that it's both App and AppHandle whose signature change, since that macro is used on both.

Edit: I've opened the PR for you at #2291

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

2 participants