plugins-workspace icon indicating copy to clipboard operation
plugins-workspace copied to clipboard

feat(dialog): add `showFolderPicker` to iOS and android targets

Open Mo0nbase opened this issue 11 months ago • 5 comments

Add the folder picker to iOS and android. Ready for review!

Mo0nbase avatar Jan 14 '25 22:01 Mo0nbase

Package Changes Through 875ffbb651df643a8007a4d4d694cc04dcdfcec4

There are 4 changes which include dialog with patch, dialog-js with patch, log with minor, log-js with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.24 2.0.25
api-example-js 2.0.20 2.0.21
dialog 2.2.1 2.2.2
dialog-js 2.2.1 2.2.2
log 2.3.1 2.4.0
log-js 2.3.1 2.4.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

github-actions[bot] avatar Jan 15 '25 11:01 github-actions[bot]

Awesome, thanks so much! I don't have any complains other than the CI. Your changes seem to work in my testing (though i didn't connect it to file reading/writing yet), nice work :)

FabianLars avatar Jan 15 '25 12:01 FabianLars

@FabianLars Just tested file writing. The uri from the folder picker on ios works perfectly with the URI returned

e.g. if there is a folder already created called Test in Download

const filePath = `${selected}/test.txt`;
await writeTextFile(filePath, 'This is a test file created by the app!');

In android however the URI does not work directly. If for example we select the same folder and do as we did before we get an invalid URI error.

e.g. content://com.android.externalstorage.documents/tree/primary%3ADownload%2FTest

In order to write to that folder this would need to be transformed to the following.

await writeTextFile("/storage/emulated/0/Download/Test/test.txt", 'This is a test file created by the app!');

This is more of a stylistic choice IMO and Im not sure if this is already an existing quirk of the android filesystem so I'm looking for some insight as to whether I should correct this.

Here is a repository if you are looking to reproduce.

https://github.com/Mo0nbase/test-dialog

Mo0nbase avatar Jan 15 '25 20:01 Mo0nbase

@lucasfernog Are you available in the near future to take a look at this? Really unsure on how to best connect it to the fs plugin and i'm afraid that we end up having to change the return value of this plugin so i'm a bit hesitant to merge it rn.

FabianLars avatar Jan 22 '25 15:01 FabianLars

Thank you for your work ! I hope we can merge it soon enough :innocent:

IT-ess avatar Apr 30 '25 12:04 IT-ess