-
Notifications
You must be signed in to change notification settings - Fork 278
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
move quality-chooser to vue #3818
Conversation
Looks nice. But because you replace the mako, it has to be implemented in a big bang right? Can't we create new mako vue import files. And them implement the components one page at a time? |
I'm good with that. I still need to fix the forms but I could rename this and copy the old file back in? Which page would we use first? Edit or new show? |
Codecov Report
@@ Coverage Diff @@
## develop #3818 +/- ##
========================================
Coverage 29.26% 29.26%
========================================
Files 276 276
Lines 35411 35411
========================================
Hits 10363 10363
Misses 25048 25048 Continue to review full report at Codecov.
|
Else you start on the new show. Then I'll finish editShow |
I think the only issue I found was on the edit page it would show blank instead of the quality you have it set as so I need to fix that. |
@@ -1,5 +1,54 @@ | |||
<script type="text/x-template" id="quality-chooser-template"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file needs to be in themes-default/slim/views/vue-components/qualityChooser.mako
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you want me to replace this file with the old content and just move the new code to a new file?
@OmgImAlexis as discussed we should remove all direct python calls / mako vars. And pass those along through props. This will result in a clean set of components, that we can move to .Vue files in the end. |
<div id="archive" v-if="archive"> | ||
<h5> | ||
<b> | ||
Archive downloaded episodes that are not currently in <a target="_blank" href="manage/backlogOverview/"><font color="blue"><u>backlog</u>.</font></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not showing anything when changing to a lower quality. I suspect you wanted to subsittute the .
@@ -18,6 +18,20 @@ | |||
% if show.is_anime: | |||
<script type="text/javascript" src="js/blackwhite.js?${sbPID}"></script> | |||
% endif | |||
<script src="js/lib/vue.js"></script> | |||
<script src="js/lib/[email protected]"></script> | |||
<%include file="/vue-components/inc_qualityChooser.mako"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still including the old file.
data() { | ||
return { | ||
// Python convertions | ||
allowedQualities: ${convert(allowed_qualities)}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change this so it's using props/events and not directly the python vars?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now let's leave this here since otherwise each file that uses this will need that python code which will just duplicate it.
We should wait util those vars can be returned by the API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case I don't fully agree. But it's up to you. And what works best for you. So i'm fine with it.
Besides this, you think it's ready to merge? Needs some more reviewing? When this is ready I can merge it into my editShow pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it'l need a rebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think after a rebase it'll still need a little bit of testing as I believe it still has the issue of getting the wrong quality when you first open the edit show page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I'll merge it into my branch. Let's test there.
897128f
to
3a1f847
Compare
|
+ a few changes in add-show-options I needed to make the save defaults button work better
quality-chooser.mako add-show-options.js vue-submit-form.js
- Fix Backlog warning missing word and link. - Fix archive episodes button, html and function.
3a1f847
to
134097a
Compare
@OmgImAlexis @sharkykh i'm a bit confused. There aren't any child -> parent event's defined nor methods to patch the quality settings for a show directly? How should we update selected quality settings? |
@p0psicles If I understand your question, Currently this is working off of this: Medusa/themes-default/slim/views/vue-components/quality-chooser.mako Lines 55 to 61 in 134097a
(BTW, line 61 is not needed?) |
Yeah have been talking with @medariox about it. And imo we should split quality into allowed and preferred. So we can cleanly pass them as properties but also store them independently. Else we would have so always store the combined quality. But then you keep glaring to combine them in frontend. |
The quality-chooser should pass a value to the main page using the I'd prefer if the quality was saved separately and if we didn't use bitwise operators everywhere to compare quality. It'd make working with the quality settings on the frontend a lot easier. |
@sharkykh can you check my last commit fixed this? |
@OmgImAlexis
The call is: And I selected "SD" preset. Edit: Fixed by #4027. |
**Always render** the allowed/preferred qualities select elements, so jQuery could pull data from them to send to Python. Signed-off-by: sharkykh <[email protected]>
it was probably re-added in the rebase by mistake Signed-off-by: sharkykh <[email protected]>
Also emits an event when one of the qualities (allowed/preferred) changes. And:
|
What else do we need to do for this? |
and some finishing touches
8c3e385
to
c6bfe1f
Compare
With the latest commit:
Notes:
|
when changing from a preset to custom quality + Fix indentation in Vue code
@p0psicles I still need to fix the forms on the pages that use this but it should be fine to test.
MAKE SURE NOT TO SAVE SHOWS WITH THIS IT WILL 100% KILL THE SHOW QUALITYEdit: This should be working on both the edit and new show page. Please let me know if there's any issues.
Closes #3909