-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implement Vue based Dialogs especially the FilePicker #878
Conversation
+ chore: Update dependencies Signed-off-by: Ferdinand Thiessen <[email protected]>
d1bbed2
to
9277287
Compare
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
…rver webpack or babel somehow can not handle the imports otherwise as e.g. `import NcButton from '@nextcloud/vue/dist/...'` will not yield the component but an object `{ default: ... }`. Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
8e8d91b
to
87f8c27
Compare
Follow-up: checkboxes should be hidden when picking a destination? |
Insane work btw!! |
Awesome work @susnux - left open is then the server-PR to make use of it via a lib bump I guess? |
Nice to see the component is finally being used somewhere. Are the error something I can help with? |
Also in the new Files app 🚀 |
The mounted hook fails because |
Thank you, yes we need a new (4.2.0-beta.1 ?) release. The PR is already prepared (~6 lines of code to change) so that is used everywhere :) |
Yes, can you create a tag? @skjnldsv, me or any team lead can then create the release to trigger the npm publishing part. |
Wow. So nice to see this finally happend. Great work @susnux 💙 |
Is there some documentation how to use the new filepicker? I try with an app that used the old filepicker like this: const file = await getFilePickerBuilder('Pick a file').build().pick() but that still leads to the old picker. And using the new picker directly via
I obviously do something wrong here, so the documentation would be helpful 🙂 |
@susnux knows best and already integrated it in the files app. |
See nextcloud/server#39792 for an example @raimund-schluessler |
Currently not, vue files broke Typedoc. I will have to figure out how to document vue files with typedoc. Planned this for the next dialogs release.
Yes the FilePicker builder still relays on the OC.dialogs variable so only shows the new FilePicker for 27.1.0-beta currently.
You are missing the buttons property which currently (!) looks like this: type IFilePickerButtons = Array<IFilePickerButton>
interface IFilePickerButton {
// The button text
label: string
// Optional button icon (as a Vue component), recommend to use the AsyncComponent factory
icon?: Component | AsyncComponen
// Same as NcButton
type: string
// callback on click
callback: (nodes: Node[]) => void
} |
That is weird, I tried it with latest master of server, but still the old picker.
Thanks for the hint. I am not used to the composition api yet, but I will try to figure out how to provide the buttons property. |
Yes currently only in 27.1.0 beta, master PR is still pending :/
Just provide a the Filepicker the buttons, like <template>
<FilePicker :buttons="buttons" ... />
</template>
<script>
// ...
export default {
data() {
return {
buttons: [{ label: 'Pick', callback: (nodes) => console.log('picked nodes:', nodes) }]
}
}
// ...
}
</script> |
|
Done ✔️
Todo 🚧
(in a follow up)
@nextcloud/vue
Screenshots
vokoscreenNG-2023-08-10_04-21-53.mp4
And on smaller screens: