tables
tables copied to clipboard
Move to vite for bundling
- [x] Based on https://github.com/nextcloud/tables/pull/1328
- [x] Introduce vite for building
- [x] Drop 26 suppport as there is no support for javascript modules that are required by vite https://github.com/nextcloud/tables/pull/1179
@juliushaertl You say "based on https://github.com/nextcloud/tables/pull/647", but I don't see how?
I based my branch locally on top of yours and then created a pull request towards that one. You can also sett that in the github ui:
Once your PR/branch gets merged github automatically changes this, but that way I can make use of your changes already during development.
Doesn't work for me after running npm ci
and then npm run dev
. Am I missing something?
Sorry, it isn't ready yet, didn't wanted to ask for review but the ones got autoassigned by github 🙈 I'll ping you once I'm ready :)
I also noticed that tables have dark favicons for me now:
Just tried with current main with the same result. So not related to this PR.
Likely caused by https://github.com/nextcloud/tables/pull/712 then
We need to decide when to merge this, currently the vite build requires https://github.com/nextcloud/server/pull/36057 which is 27 only.
@susnux I'm having some trouble here with the npm run watch
command which always exits after the first build. Is that something you've seen already? Any clue why that might happen? We just call vite --mode development build --watch
@susnux I'm having some trouble here with the
npm run watch
command which always exits after the first build.
Should be fixed now: https://github.com/vitejs/vite/issues/15951
I think the
?? ''
can just be removed in this case - but it would also be nice to catch such warnings in the ci or so. However i was not able to trigger that check on its own.
The warning means that the right part is never null / undefined because 'string' + variable ?? 'fallback'
reads as:
-
'string' + variable
-
??
Then check the result is null or undefined - Then fallback to
'fallback'
.
So just brackets are missing like 'string' + (variable ?? 'fallback')
.
(Otherwise you might get 'stringnull'
as the result)
@susnux The two issues i mentioned in person now on this PR after updating @nextcloud/dialogs
- The file picker dialog loading fails (a quick patch for the dialogs library is below but I'm unsure if that is the proper approach)
- Once that is patched the dialog does not return any selected file
diff --git a/lib/composables/isPublic.ts b/lib/composables/isPublic.ts
index ec89e8b..a1000ca 100644
--- a/lib/composables/isPublic.ts
+++ b/lib/composables/isPublic.ts
@@ -10,7 +10,7 @@ import { onBeforeMount, ref } from "vue"
export const useIsPublic = () => {
const checkIsPublic = () => (document.getElementById('isPublic') as HTMLInputElement|null)?.value === '1'
- const isPublic = ref(true)
+ const isPublic = ref(checkIsPublic())
onBeforeMount(() => { isPublic.value = checkIsPublic() })
return {