Refactor js
Split the big js file in multiple files
Merge request reports
Activity
Thanks a lot for this MR! I'll take care of the merge soon and if you don't mind, I'll make a few adjustments on the code style even if my style does not respect the linter advises
.A few question on the content:
- Why do you import moment as it appears to be working without the import? It appears Nextcloud is providing moment anyway. I'll adjust that if possible.
- Why did you replace
OC.Notification.showTemporary
? I'll maybe revert that and usewindow.OC.Notification.showTemporary
which is accessible anywhere.
Thanks again for this huge work.
mentioned in commit 45fd6192
mentioned in commit 9a6bf534
mentioned in commit a655aca5
mentioned in commit 9ba52372
mentioned in commit c6d10dc4
mentioned in commit dc939c12
mentioned in commit b23d6dac
mentioned in commit 65d45806
mentioned in commit d26c1be4
mentioned in commit 4ddb4cbd
mentioned in commit b7c9d4ae
mentioned in commit a92c2a94
mentioned in commit bfe42c87
mentioned in commit f239ce3e
mentioned in commit 5014efa8
mentioned in commit 72cb2c37
Ok merge done, I took the liberty to push it a little bit further, click/edit/... events are now declared in corresponding files too. I've moved a few things where I thought it belongs.
I've changed a little bit the code style.
I fixed small things here and there like color conversion (rgb to hexa) that was broken, restore options that was done asynchronously so it was not restoring last selected project, sorttable import was not working. Little things. Moment does not need to be imported as it's shipped with NC stuff.
It looks much nicer now. Great job!
I've got a request for you
. Do you know how we could importemojionearea.min.js
? 'Cause the little time I spent trying to do it was not successful. So there is now a trick (manual file copy and manual include in template) that does not allow to usenpm run watch
anymore becausejs
folder gets erased and recreated on webpack build. We can talk about that here, even if the MR is closed.You could import it via import
'emojionearea/dist/emojionearea';
And also the css via import'emojionearea/dist/emojionearea.css';
if you activate a loader in webpack (and install css-loader via npm):{ test: /\.css$/, use: ['css-loader'], },
But the emojionearea tries to load from cloudflare which is not allowed. You could circumvent that if emojione is present, but I failed activating it. But emojione is also archived and maintained in a different package as well as emojione-assets, so would no use emojionearea at all.
Edited by briefChain