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

feat: download clients integration and widget #895

Conversation

SeDemal
Copy link
Collaborator

@SeDemal SeDemal commented Jul 31, 2024

image
image
(Screenshot only include test files and linux ISO, therefore safe to use)

Usenet and Torrent downloads in 1 widget.
sabNZBd, NzbGet, Deluge, qBitTorrent, and transmission support.
Columns can be reordered in Edit mode.
Sorting enabled.
Time uses Dayjs with auto translation.
Can pause/resume single items, clients, or all.
Can delete items (With option to delete assossiated files).
Clients list and details.
Include all filtering and processing for ratio from oldmarr torrent widget.
Invalidation of old data (older than 30 seconds) to show an integration is not responding anymore.

Misc (So many miscs):
Fixed validation error with multiText.
Fixed translation application for multiSelect to behave the same as select.
Added background to gitignore (I needed to add a background to visually test opacity, probably will in the future too)
Added setOptions to frontend components so potential updates made from the Dashboard can be saved.
Extracted background and border color to use in widgets.
humanFileSize function based on the si format (powers of 1024, not 1000).
Improved integrationCreatorByKind by @Meierschlumpf.
Added getIntegrationKindsByCategory to get a list of integrations sharing categories.
Added IntegrationKindByCategory type to get the types possible for a category (Great to cast on integration.kind that isn't already properly limited/typed but for which we know the limitation)
Added a common AtLeastOneOf type. Applied to TKind and IntegrationSecretKind[] where it was already being used and Added to the getIntegrationKindsByCategory's output to be more freely used.
Hook to get list of integration depending on permission level of user. (By @Meierschlumpf)

@SeDemal SeDemal requested a review from a team as a code owner July 31, 2024 16:11
@SeDemal SeDemal changed the title Download clients integration and widget feat:download clients integration and widget Jul 31, 2024
@SeDemal SeDemal changed the title feat:download clients integration and widget feat: download clients integration and widget Jul 31, 2024
@SeDemal SeDemal force-pushed the feat/download-clients-integration-and-widget branch from 33b5a85 to fb8b15f Compare July 31, 2024 17:17
@SeDemal SeDemal marked this pull request as draft August 1, 2024 10:36
@SeDemal
Copy link
Collaborator Author

SeDemal commented Aug 1, 2024

Forgot to put it as draft.
There is still a todo list.

@SeDemal SeDemal force-pushed the feat/download-clients-integration-and-widget branch from 0dde6e0 to 3ed7adc Compare August 2, 2024 01:13
Copy link

deepsource-io bot commented Aug 3, 2024

Here's the code health analysis summary for commits b2a576c..47ef25a. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ Success
🎯 1 occurence resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@SeDemal SeDemal self-assigned this Aug 9, 2024
@SeDemal SeDemal marked this pull request as ready for review August 9, 2024 01:45
@SeDemal SeDemal requested a review from manuel-rw August 9, 2024 01:45
Copy link
Member

@manuel-rw manuel-rw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most complex widget so far, yet the code is so readable.
I can bearly formulate words to describe how much this is an improvement from the previous Homarr code.
Thanks that you took over this PR. You did well.

I only have two complaints;

  • We should add testing to ensure that we properly call the API methods. E2E testing with the actual download clients running is another topic which we must address after 1.0
  • Can you reduce the size of the icons at the bottom of the widet, so it matches the size of the other icons? I feel that the difference is slightly distracting.

misc: Added maintainers usernames to workspace dictionary
add concatenation in function so it doesn't apply to "NaI" and "∞"
@SeDemal SeDemal force-pushed the feat/download-clients-integration-and-widget branch from 3c4e977 to 6f3c6b0 Compare August 15, 2024 03:04
@SeDemal SeDemal force-pushed the feat/download-clients-integration-and-widget branch from ba63f27 to 9ea0dc8 Compare August 15, 2024 17:53
Copy link
Member

@manuel-rw manuel-rw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nicely documented & made PR. @Meierschlumpf is there anything missing or can you re-review?

@SeDemal
Copy link
Collaborator Author

SeDemal commented Aug 20, 2024

Very nicely documented & made PR. @Meierschlumpf is there anything missing or can you re-review?

There's still a little ToDo that I would like to clear quick first. It's a really small list though.

@Meierschlumpf
Copy link
Member

If you want me to help you with the todo, just let me know 👍🏼

@Meierschlumpf
Copy link
Member

I would suggest to merge this pull request (not squash) what do you think?

@Meierschlumpf Meierschlumpf marked this pull request as draft September 2, 2024 18:52
@Meierschlumpf
Copy link
Member

I converted it back to a draft as there are pending todos, just that we don't merge it accidentally

@SeDemal
Copy link
Collaborator Author

SeDemal commented Sep 4, 2024

Would be beneficial for the extras that would be independent components.
There's more misc components than features for the widget itself x).

But keep in mind there's at least 30 commits and a lot of them are just corrections or merging things.

Also, this PR is merging into another PR, so the issue should be raised there. This specific PR should be merged without squash. Main one could be debated

@SeDemal SeDemal marked this pull request as ready for review September 5, 2024 10:35
@SeDemal
Copy link
Collaborator Author

SeDemal commented Sep 5, 2024

Back to ready since I finished my ToDo list. anyone that wants to add anything is welcome to do so but we should be done now.
I've tested out different scenarios for permission hiding controls testing and it all works as intended.

Copy link
Member

@Meierschlumpf Meierschlumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm gonna fix those directly. The things from deepsource can be ignored IMO

Okay the radius thing with xl has only a size of 32px

packages/widgets/src/downloads/component.tsx Show resolved Hide resolved
packages/widgets/src/downloads/component.tsx Show resolved Hide resolved
packages/widgets/src/downloads/component.tsx Show resolved Hide resolved
@Meierschlumpf Meierschlumpf merged commit 3e32288 into feature/usenet-downloads Sep 6, 2024
4 checks passed
@Meierschlumpf Meierschlumpf deleted the feat/download-clients-integration-and-widget branch September 6, 2024 14:28
@SeDemal SeDemal mentioned this pull request Sep 7, 2024
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