Skip to content
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

Migration to Vue 3 #2689

Merged
merged 158 commits into from
Apr 1, 2024
Merged

Migration to Vue 3 #2689

merged 158 commits into from
Apr 1, 2024

Conversation

kloon15
Copy link
Contributor

@kloon15 kloon15 commented Aug 31, 2023

Brings the frontend to run under Vue 3 while maintaining the same behavior as much as possible.
Current status: rewrite to typescript and compositions API mostly finished.

🚨 Before submitting your PR, please read community, and indicate which issues (in any of the repos) are either fixed or closed by this PR. See GitHub Help: Closing issues using keywords.

  • DO make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • DO make sure you are making a pull request against the master branch (left side). Also you should start your branch off our master.
  • DO make sure that File Browser can be successfully built. See builds and development.
  • DO make sure that related issues are opened in other repositories. I.e., the frontend, caddy plugins or the web page need to be updated accordingly.
  • AVOID breaking the continuous integration build.

@kloon15
Copy link
Contributor Author

kloon15 commented Aug 31, 2023

Implements #2623

@joepbuhre
Copy link
Contributor

I like it and I want to perhaps join in on this. But what is the plan / to do list. Also do we want to perhaps consider moving to typescript (improved tooling). Let me know how I can join in

@kloon15
Copy link
Contributor Author

kloon15 commented Sep 7, 2023

I like it and I want to perhaps join in on this. But what is the plan / to do list. Also do we want to perhaps consider moving to typescript (improved tooling). Let me know how I can join in

Thanks for ur interest, my current plan for this migration is to port the current codebase to Vue3 with only mostly necessary changes before we reach the EOL of Vue2.
I would absolutely love if someone took the time and effort to rewrite it with typescript and compositions API but that is out of my scope atm. Im also not very familiar at all with Vue.

The tasks left on my todo list are:

  • Sync with master branch
  • Replace noty with something that is still supported/maintained
  • Fix lint warnings

Ur more than welcome to help out in any of those tasks or lmk if u find anything that seems wrong.

@joepbuhre
Copy link
Contributor

Okay good to know. I'll build upon your branch and try to move everything over to composition api and typescript. Lovely to hear that almost everything is ported to Vue3.

@joepbuhre
Copy link
Contributor

joepbuhre commented Sep 7, 2023

Just checked about noty. I almost exclusively use my own notification system using just pinia. Will try to make a semi compatible port from noty :D

@kloon15
Copy link
Contributor Author

kloon15 commented Sep 7, 2023

Just checked about noty. I almost exclusively use my own notification system using just pinia. Will try to make a semi compatible port from noty :D

I just looked into this and found vue-toastification to have everything we need and added it so u dont have to bother with this.
Quick question if u know: why couldnt i use $t inside the custom toast component?

@omalk98
Copy link
Contributor

omalk98 commented Mar 25, 2024

@kloon15 Branch is now aligned with master again, I pulled the most recent updates as well and should be ready for merge.

@kloon15
Copy link
Contributor Author

kloon15 commented Mar 25, 2024

@kloon15 Branch is now aligned with master again, I pulled the most recent updates as well and should be ready for merge.

Thank you very much i will test it this week!

@omalk98
Copy link
Contributor

omalk98 commented Mar 27, 2024

@kloon15 I've done some light testing and there seems to be a bug with the prompts. For (Copy, Move, Upload) prompts.
The issue:
When uploading/copying/moving a file with a duplicate causing a conflict, the prompt shows up momentarily before being popped from currentPrompt array and being unable to reach it. Seems to exist before the merge.
How to reproduce:
Copy/Move/Upload a duplicate file into FileBrowser.

I suspect this is due to Pinia running state mutations async but not confirmed yet.

@kloon15
Copy link
Contributor Author

kloon15 commented Mar 29, 2024

@kloon15 I've done some light testing and there seems to be a bug with the prompts. For (Copy, Move, Upload) prompts. The issue: When uploading/copying/moving a file with a duplicate causing a conflict, the prompt shows up momentarily before being popped from currentPrompt array and being unable to reach it. Seems to exist before the merge. How to reproduce: Copy/Move/Upload a duplicate file into FileBrowser.

I suspect this is due to Pinia running state mutations async but not confirmed yet.

I do get the prompt on Upload
image

@omalk98
Copy link
Contributor

omalk98 commented Mar 29, 2024

@kloon15 I've done some light testing and there seems to be a bug with the prompts. For (Copy, Move, Upload) prompts. The issue: When uploading/copying/moving a file with a duplicate causing a conflict, the prompt shows up momentarily before being popped from currentPrompt array and being unable to reach it. Seems to exist before the merge. How to reproduce: Copy/Move/Upload a duplicate file into FileBrowser.

I suspect this is due to Pinia running state mutations async but not confirmed yet.

I do get the prompt on Upload

image

Will test it further this weekend to confirm why it's happening on my side

@kloon15
Copy link
Contributor Author

kloon15 commented Mar 30, 2024

This looks good to me, ill change it to ready to review. Thanks everyone for their contribs!

@kloon15 kloon15 marked this pull request as ready for review March 30, 2024 14:21
@kloon15 kloon15 requested a review from o1egl as a code owner March 30, 2024 14:21
@kloon15 kloon15 changed the title WIP: Migration to Vue 3 Migration to Vue 3 Mar 31, 2024
@o1egl
Copy link
Member

o1egl commented Apr 1, 2024

You all have done a great job!

@o1egl o1egl merged commit 5100e58 into filebrowser:master Apr 1, 2024
7 of 8 checks passed
@kloon15 kloon15 deleted the vue3 branch April 1, 2024 19:24
@gdy666
Copy link
Contributor

gdy666 commented Apr 28, 2024

@kloon15 Hi,The Vue3 version is likely related to the code in the "VideoPlayer.vue" file, which cannot play MKV format video files.

@kloon15
Copy link
Contributor Author

kloon15 commented Apr 28, 2024

@kloon15 Hi,The Vue3 version is likely related to the code in the "VideoPlayer.vue" file, which cannot play MKV format video files.

The thing is, most browsers dont even support the mkv container, let alone the proprietary codecs such files are encoded with.

Modern web browsers only support the WebM container format that is based on Matroska, but limited to royalty-free codecs. Even when the MKV file contains media encoded by a codec that the browser is able to decode, most browsers are unable to play media in such a container.

Whats ur use case that requires u to play mkv in a browser?

@gdy666
Copy link
Contributor

gdy666 commented Apr 28, 2024

@kloon15 Hi,The Vue3 version is likely related to the code in the "VideoPlayer.vue" file, which cannot play MKV format video files.

The thing is, most browsers dont even support the mkv container, let alone the proprietary codecs such files are encoded with.

Modern web browsers only support the WebM container format that is based on Matroska, but limited to royalty-free codecs. Even when the MKV file contains media encoded by a codec that the browser is able to decode, most browsers are unable to play media in such a container.

Whats ur use case that requires u to play mkv in a browser?

You can test this file, which could be played online in the previous version of the file browser.

https://www.daji.it:66/release/v2.5.1/test.mkv

Actually, what I mean is that all the MKV files I have been using could be played normally in the browser before.

@kloon15
Copy link
Contributor Author

kloon15 commented Apr 29, 2024

@kloon15 Hi,The Vue3 version is likely related to the code in the "VideoPlayer.vue" file, which cannot play MKV format video files.

The thing is, most browsers dont even support the mkv container, let alone the proprietary codecs such files are encoded with.

Modern web browsers only support the WebM container format that is based on Matroska, but limited to royalty-free codecs. Even when the MKV file contains media encoded by a codec that the browser is able to decode, most browsers are unable to play media in such a container.

Whats ur use case that requires u to play mkv in a browser?

You can test this file, which could be played online in the previous version of the file browser.

https://www.daji.it:66/release/v2.5.1/test.mkv

Actually, what I mean is that all the MKV files I have been using could be played normally in the browser before.

We could bypass videojs for unsupported formats i guess. Dont have a better idea.

@Daniel-dev22
Copy link
Contributor

Daniel-dev22 commented Jun 8, 2024

This migration to vue3 broke the ability to pull down to refresh on mobile in a text editor.

#3131

I assume @touchmove.prevent.stop might be to blame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants