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

feat: implement Default for Menu, closes #2398 #4291

Merged
merged 13 commits into from Jun 15, 2022
Merged

feat: implement Default for Menu, closes #2398 #4291

merged 13 commits into from Jun 15, 2022

Conversation

amrbashir
Copy link
Member

@amrbashir amrbashir commented Jun 7, 2022

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

@amrbashir amrbashir requested a review from a team June 7, 2022 18:56
@amrbashir amrbashir requested a review from a team as a code owner June 7, 2022 18:56
@lorenzolewis
Copy link
Member

It looks like app_name is only used for macOS. Curious if this could be optional and we provide a default name from the config if not specified? One less thing to get it up and running.

What were your thoughts on having this in the default template when creating a new app?

And then lastly just a nit-pick on the function name, any reason to have it as new_default instead of just default?

@amrbashir
Copy link
Member Author

It looks like app_name is only used for macOS. Curious if this could be optional and we provide a default name from the config if not specified? One less thing to get it up and running.

The app name is needed for the About menu item. There is no way else to get it. It is a minor inconvenience if you ask me.

What were your thoughts on having this in the default template when creating a new app?

Sure, not the current CTA though, but once tauri-apps/create-tauri-app#61 lands.

And then lastly just a nit-pick on the function name, any reason to have it as new_default instead of just default?

Well, Menu already implements Default trait so default is taken and I didn't want to cause collisions. if I name it default instead of new_default, we will have to remove Default trait derive and that will be a small breaking change.

@lorenzolewis
Copy link
Member

Ah, didn't think of the conflict with Default. What about something like add_default or build_default? new_default reads a bit weird, but that could just be me.

And points taken for the other two

@amrbashir
Copy link
Member Author

amrbashir commented Jun 9, 2022

Since it takes the app name as an argument, it should be fine to just name it default

@amrbashir amrbashir requested a review from a team June 15, 2022 12:35
@lucasfernog lucasfernog merged commit 4c4acc3 into dev Jun 15, 2022
@lucasfernog lucasfernog deleted the default-menu branch June 15, 2022 13:51
@martpie
Copy link

martpie commented Jun 15, 2022

Thank you so much for working on that! That's such a nice improvement!

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

Successfully merging this pull request may close these issues.

None yet

4 participants