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(core): add path plugin, implement mobile APIs #6339

Merged
merged 23 commits into from
Apr 7, 2023
Merged

Conversation

lucasfernog
Copy link
Member

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

@lorenzolewis
Copy link
Member

@lucasfernog is this one going to be similar to the camera plugin where you initialise it like this:

tauri::Builder::default()
  .plugin(tauri_plugin_camera::init())

Or for these "core" things are they going to just work as imports?

A similar question for things like clipboard, dialog, notification, updater and others if they get moved to this sort of a de-coupled system.

These only have to be initialised on the Rust side, right? And then they can be used with a normal import on the JS side for instance?

So if notifications move to this in the future, I'd do these steps to send a notification from the JS side:

  1. Add the Node dep for @tauri-apps/notification (or whatever it will be) and the same on the Rust side
  2. Initialise the plugin with something similar to the code block above
  3. Then I import the package on the JS side and call the respective function to trigger the notification.

For things Tauri directly uses (such as path) those are going to stay in this repo, right? And for those that it doesn't they'll be in the monorepo? Need to figure out how I set up the docs to work.

@lucasfernog
Copy link
Member Author

Yeah you're right @lorenzolewis, but the core plugins will be initialized automatically and users will just need to import and use it like a regular module.

@lucasfernog
Copy link
Member Author

At least for now anyway, I know @chippers proposed separating the plugin types so we could actually move this plugin to the workspace repo, but I'm not sure if that's possible.

@lorenzolewis
Copy link
Member

I'm excited to dig in to what the DX looks like once these are in. Especially around package versions and asking devs to upgrade. Could be some enhancements we add to the CLI (maybe an add command as well) that helps with the DX and troubleshooting as we introduce more packages and combinations in.

@lucasfernog lucasfernog marked this pull request as ready for review April 6, 2023 14:01
@lucasfernog lucasfernog requested a review from a team as a code owner April 6, 2023 14:01
@lucasfernog lucasfernog merged commit be941b9 into next Apr 7, 2023
@lucasfernog lucasfernog deleted the feat/path-plugin branch April 7, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants