westberliner / checksum

Plugin for Nextcloud and ownCloud to create hashes of files.
GNU General Public License v3.0
29 stars 15 forks source link

Update frontend code #48

Closed st3iny closed 3 years ago

st3iny commented 3 years ago

The frontend uses code that is deprecated and will be removed very soon. Additionally, the global jQuery will be removed soon too.

Nextcloud apps are now required to ship their own dependencies. Most apps I worked with solve this by using a bundler like Webpack.

@westberliner Are you fine with using Webpack to bundle the dependencies? I have worked on some official Nextcloud apps (e.g. mail) and could set up the stack. Note that this will increase the amount of work needed to maintain this app due to the added complexity. Otherwise, we have to drop the jQuery dependency and use the DOM APIs directly. This would eliminate the need for a bundler, but may turn the rendering code into a mess.

From app/files/js/filelist.js:

3699:       registerTabView: function(tabView) {
3700:           console.warn('registerTabView is deprecated! It will be removed in nextcloud 20.');

(Spoiler: It was not removed in version 20 but probably will be very soon).

Ref #45

westberliner commented 3 years ago

I am fine with webpack. Currently the standard - although does not say much in the js world :) Changes every other month feels like.

If it is now possible to remove jQuery it should be done. I could this as well in two weeks. I will have some free time by then. If you are eager to help do not let me hold you off :)

st3iny commented 3 years ago

@westberliner Yeah, the js world can be kind of chaotic sometimes. I have been quite busy in the past 2 weeks but I have some time to spare now. I would be happy to work on the frontend code if you didn't start already.

Sorry for the delayed response :D

westberliner commented 3 years ago

Nvm :) Did not started yet. Got some family business.

westberliner commented 3 years ago

Just want to let you know, that I saw your pr. I will check it as soon as I can.

westberliner commented 3 years ago

I created a branch on switched to vue/removed jquery. See migrated branch. I need to implement to allow only files and then I will release it.

Thx for the kickoff.

st3iny commented 3 years ago

Very nice. I'm glad I could help with the refactors. Thanks for maintaining this app.

westberliner commented 3 years ago

And released :) The integration is a bit yank though. NC 20/21 vue integration kinda work in progress. Because version 21 is quite new I implemented both versions. If you'll have a better solution or any comments, let me know.