-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
feat: Add configurable auto-approval #1190
base: develop
Are you sure you want to change the base?
feat: Add configurable auto-approval #1190
Conversation
Suggestion: Move this to settings page as a tab. As this is 100% a setting |
It could be cool to have the same rule system as the override rules one: #945 (But we could do it in another PR) |
eb7cd47
to
b2351d5
Compare
Oh, I wasn't aware that existed! That looks really awesome. One thing I would've liked is the ability to send a notification without approving the request, but I don't see it as an absolute necessity. With "same rule system", do you mean to use the same component for both? Or something in the backend? |
Probably more for the frontend, but if you can think of something clean for the backend it could be useful too (as long as the abstraction for the "rule system" doesn't make things more complicated) |
Idk if this is genius or moronic (though I'm leaning towards the latter), but: The edit modal has basically a list of variable length of different kinds of conditions, which have different UIs (some have text boxes, others have multi-selects), and I'm trying to make adding new conditions later on as simple as possible, so I had the idea of putting the UI and the logic together in the same class. Basically, it's this:
Both IMO, this would consolidate it into a neat little package, but I can also see it being convoluted/messy/just generally bad practice to mix logic and UI in this way. |
…fications to be based on Adds the AutoApprovalSpecificationBase entity to base other specifications on to allow generic interfacing. Also adds UI list items for each specification.
To be honest i'm not exactly sure what you mean by this mix of UI and logic, but feel free to send the updates in this PR and i'll review it. |
Basically, instead of having two parts, e.g. Unfortunately, I've already moved away from this, because I tried it myself and got an issue that seemed to relate to trying to use UI components in a server object.
That's fair, but to be fair I also figured it could simplify adding the conditions currently, instead of having to go through and update the UI components with every added condition. Also, if possible, I'd like to ask you some questions on Discord about how Jellyseerr works/is built. I don't think they're necessary to include here in the PR. |
|
||
public value: string; | ||
|
||
public comparator = 'is'; |
Check warning
Code scanning / CodeQL
Useless assignment to property Warning
another property write
|
||
class ReleaseYearSpecification extends AutoApprovalSpecificationBase { | ||
public implementationName = 'releaseyear'; | ||
public comparator = 'equals'; |
Check warning
Code scanning / CodeQL
Useless assignment to property Warning
another property write
If the result is simpler yes go ahead.
Sure, feel free to reach us in the #development channel |
Description
Add the ability to define "rules" for auto-approval, instead of the simple yes/no system from before.
Features:
christmas
tag, change the root folder tochristmas_movies
Screenshot (if UI-related)
To-Dos
pnpm build
pnpm i18n:extract