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

Allow editing all onboarding pages #471

Merged
merged 22 commits into from
Aug 4, 2024

Conversation

albinmedoc
Copy link

Several people wanted to be able to edit all onboarding pages.

I am working on trying to get this functionality working.

@albinmedoc albinmedoc marked this pull request as ready for review August 2, 2024 16:47
@albinmedoc
Copy link
Author

Discord and Request page are not editable, they are very dynamic.

@JamsRepos
Copy link
Member

The timing! I’ve just turned off my computer as I’m putting in a new cooler but I’ll get to it as soon as I’m done. 😊

@albinmedoc albinmedoc marked this pull request as draft August 2, 2024 17:47
@JamsRepos
Copy link
Member

@albinmedoc I'm back at my PC, did you want this reviewed or are you still working?

@albinmedoc
Copy link
Author

@albinmedoc I'm back at my PC, did you want this reviewed or are you still working?

I think I can improve the implementation.

@JamsRepos
Copy link
Member

No worries! Let me know when you need me.

@albinmedoc
Copy link
Author

Now I feel satisfied with the implementation.

During setup, the Welcome & Download page is created automatically based on the server type chosen (plex, jellyfin, emby).

Discord page is added/hidden automatically when connecting/disconnecting from discord.

The same applies to the Request page. If there is at least one request connection, the page is created. When there are no connections, it is hidden.

If you change the server type (for example from plex to Jellyfin), the onboarding pages are NOT updated. Welcome & Download page is just a standard markdown string saved to the DB.

I have created in the migration that Welcome & Download (for the current server type), Discord, Request pages are created. This makes the onboarding page (/help) look exactly like before.

@albinmedoc albinmedoc marked this pull request as ready for review August 3, 2024 20:48
@JamsRepos
Copy link
Member

@albinmedoc I'll get it tested for you now, whilst I have you... Did you want to look into an issue people are having with the image upload limit? Seems files larger than 1MB cannot be uploaded, no error message or anything. Perhaps we need to increase it on the web service?

@albinmedoc
Copy link
Author

@albinmedoc I'll get it tested for you now, whilst I have you... Did you want to look into an issue people are having with the image upload limit? Seems files larger than 1MB cannot be uploaded, no error message or anything. Perhaps we need to increase it on the web service?

I can take a look

@albinmedoc
Copy link
Author

I have only tested this with Plex and Discord.

We must not miss testing this with Jellyfin, Emby and request systems

@albinmedoc
Copy link
Author

Thank you for the feedback. I will mark this as draft again and continue with the work.

@albinmedoc albinmedoc marked this pull request as draft August 3, 2024 21:18
@PhantomMantis PhantomMantis removed their request for review August 3, 2024 21:41
@albinmedoc
Copy link
Author

@albinmedoc One thing I have noticed is if you are upgrading from a pre-existing installation, it will delete the old defaults so now I have only my custom page. Setting up from scratch and it works as intended.

The pre-existing onboarding pages (Welcome & Download) are just plain markdown texts, I can't separate them from others.
This issue will only apply if you were beta-testing and added one or more custom onboarding pages.

I also noticed that my custom page seems to cut off? As soon as I inspect the page the full onboarding page loads. Might be related to the image, i'm not sure.

I need to look this up further.

Is it possible at all to retain the buttons or perhaps does the markdown editor support buttons? Probably not right? Just looks a tad odd without them. Might even just be an idea to leave the download buttons at the bottom hard-coded etc, and just allow the text on the page to be editable? Or we just leave them as hard-coded pages, and give the admin the ability to just "turn off" the page in their onboarding process, so you can turn them on/off or make your own page if you wanted.

Markdown doesn't support buttons. Maybe it is possible to create an extension to the md-editor-v3 library that is used. I know they support extension in some way.

I liked the idea to have the buttons hard coded and make the text editable. I will look into this further.

Other than that, the Automatic Media Requests page works great. The Discord widget seems to be showing on my onboarding process even though I have not got it enabled.

Thats weird, the Discord page should not have been added. I will take a look at this.

It might even be an idea to allow toggle on/off for all static pages, just to give that little bit more freedom, after all they can just turn them off and make their own like I mentioned above for the joining process.

Definitely, I will implement it

@JamsRepos
Copy link
Member

Don’t worry about implementing buttons then, unless you see the appeal for them to be used aside from that functionality as we could just have the download page hard coded again and use the toggle system to just allow them to toggle it off and make their own version.

@albinmedoc
Copy link
Author

Don’t worry about implementing buttons then, unless you see the appeal for them to be used aside from that functionality as we could just have the download page hard coded again and use the toggle system to just allow them to toggle it off and make their own version.

Yeah, I agree. That sounds like the best option.

@albinmedoc
Copy link
Author

I also noticed that my custom page seems to cut off? As soon as I inspect the page the full onboarding page loads. Might be related to the image, i'm not sure.

This might be an caching issue.

@albinmedoc albinmedoc marked this pull request as ready for review August 4, 2024 14:25
@albinmedoc
Copy link
Author

I'm happy with this. Please take a look and give comments

@JamsRepos
Copy link
Member

image
Getting this when trying to hide a default page, move up/down and adding a page. Seems to be with the onboarding endpoint. This is from a fresh install with cache cleared.

@albinmedoc
Copy link
Author

albinmedoc commented Aug 4, 2024

image Getting this when trying to hide a default page, move up/down and adding a page. Seems to be with the onboarding endpoint. This is from a fresh install with cache cleared.

I have also encountered this problem. It only happens after setup (ie once).

There is something about the jwt key being incorrect/expired. Try logging out and then logging in.

This error is to be resolved in a separate PR. It's not something I've broken now.

@JamsRepos
Copy link
Member

image
image

When adding a request server onto the installation.

@albinmedoc
Copy link
Author

image image

When adding a request server onto the installation.

It probably depends on something else. Looks like you are trying to add a second request with the same url as a previous one.

I have not changed the requests database table

@JamsRepos
Copy link
Member

Give me a moment, i'll completely wipe everything and start again as it occured even adding for the first time.

@albinmedoc
Copy link
Author

I don't have a request system, so I haven't tested this.

However, according to the error message, it indicates that a row is trying to be inserted into the database, but requests.url is not unique.

@JamsRepos
Copy link
Member

JamsRepos commented Aug 4, 2024

image
image

I screenshotted the wrong error, apologies. That's upon adding a request server for the first time.

@albinmedoc
Copy link
Author

Great!
I think I found the problem. Please try again

@PhantomMantis PhantomMantis removed their request for review August 4, 2024 19:27
@JamsRepos
Copy link
Member

Approved :D

@JamsRepos JamsRepos merged commit 3d4c06a into wizarrrr:develop Aug 4, 2024
4 checks passed
wizarr-sentry bot pushed a commit that referenced this pull request Aug 5, 2024
## [4.2.0-beta.3](v4.2.0-beta.2...v4.2.0-beta.3) (2024-08-05)

### New Features

* ✨ Allow editing of all onboarding pages ([#471](#471)) ([3d4c06a](3d4c06a))
* 🎉 Add MAX_CONTENT_LENGTH configuration for file uploads ([#473](#473)) ([2edf951](2edf951))
* 🎉 Add swedish translations ([#475](#475)) ([e3b0240](e3b0240))

### Chores

* 🧽 sync develop with beta ([3de4467](3de4467))

### Code Refactoring

* 🛠️ Remove auto PR [skip-ci] ([d57e726](d57e726))
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.

3 participants