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: upload queue #203

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open

Conversation

greatgitsby
Copy link
Contributor

@greatgitsby greatgitsby commented Mar 15, 2025

second part of #51

Copy link

github-actions bot commented Mar 15, 2025

deployed preview: https://203.connect-d5y.pages.dev

Welcome to connect! Make sure to:

  • read the contributing guidelines
  • mark your PR as a draft until it's ready to review
  • post the preview on Discord; feedback from users will speedup the PR review

Mobile

Desktop

@greatgitsby greatgitsby force-pushed the feat/upload branch 3 times, most recently from ee8087a to c538949 Compare March 16, 2025 06:08
@greatgitsby
Copy link
Contributor Author

how flexible are the LoC and bundle size numbers? i will do some refactoring but there will be limits.

@incognitojam
Copy link
Member

The hard limit is 500 kb, 5000 lines

I see about 200 lines is in the API fetchers, another 100 for types - for now I think you can save a bunch of lines by wrapping the lines less. I'd like to move this out to a separate package later if it's all standard comma API stuff (there is already a comma API package but it doesn't have types)

@greatgitsby
Copy link
Contributor Author

thanks!

yea moving api calls and types out will help quite a lot. i'll do some refactors and it should be achievable

@incognitojam
Copy link
Member

Need any help finishing this? You could also split the requesting uploads and upload queue into separate PRs

@greatgitsby
Copy link
Contributor Author

nope, i've been working on the clip bounty. i'm planning on separating the API contract and calls separately as that is well defined now

@greatgitsby greatgitsby changed the title feat(new-connect): implement file uploads feat: upload queue Mar 22, 2025
@greatgitsby greatgitsby force-pushed the feat/upload branch 4 times, most recently from 091b189 to a3d05b4 Compare March 23, 2025 22:17
@greatgitsby greatgitsby marked this pull request as ready for review March 24, 2025 00:16
@incognitojam
Copy link
Member

incognitojam commented Mar 24, 2025

Can you split this up at all? It's pretty difficult to review (e.g. small fixes can be their own PRs, StatisticsBar refactor..)

@greatgitsby
Copy link
Contributor Author

let me see what i can do. some refactors were for DRY (like the stats bar, that code was already somewhere else)

Copy link

github-actions bot commented Mar 24, 2025

Changes:

┌───┬─────────────────────────────────────────────────┬───────┬──────┐
│   │ path                                            │ lines │ diff │
├───┼─────────────────────────────────────────────────┼───────┼──────┤
│ 0 │ ./hooks/use-upload-queue.ts                     │ 165   │ 165  │
│ 1 │ ./components/upload-queue/QueueItemTable.tsx    │ 67    │ 67   │
│ 2 │ ./components/upload-queue/QueueItem.tsx         │ 47    │ 47   │
│ 3 │ ./components/upload-queue/index.tsx             │ 39    │ 39   │
│ 4 │ ./components/upload-queue/QueueStatistics.tsx   │ 26    │ 26   │
│ 5 │ ./pages/dashboard/activities/DeviceActivity.tsx │ 163   │ 19   │
│ 6 │ ./types.d.ts                                    │ 199   │ 11   │
│ 7 │ ./api/upload.ts                                 │ 48    │ 1    │
│ 8 │ ./components/material/Icon.tsx                  │ 35    │ 1    │
└───┴─────────────────────────────────────────────────┴───────┴──────┘

Total lines: 4399 (+376)

@greatgitsby
Copy link
Contributor Author

removed the stats bar component and changes to the progress bar

@incognitojam
Copy link
Member

let me see what i can do. some refactors were for DRY (like the stats bar, that code was already somewhere else)

removed the stats bar component and changes to the progress bar

I just meant you could open PRs to fix/cleanup things first, which would be small and easy to merge, if they help make the diff for this PR smaller

@incognitojam incognitojam added the enhancement New feature or request label Mar 24, 2025
@greatgitsby
Copy link
Contributor Author

created these which are self-contained:

#235
#236
#237

i'll do some component refactors later today

@@ -52,6 +53,7 @@
"playwright": "^1.51.1",
"postcss": "^8.5.3",
"solid-devtools": "^0.33.0",
"solid-transition-group": "^0.3.0",
Copy link
Member

Choose a reason for hiding this comment

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

this is a normal dep instead of a dev dep?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, used to putting everything in dev for FE apps. will move it since it's the standard here

@@ -40,6 +40,7 @@
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@solid-primitives/timer": "^1.4.0",
Copy link
Member

Choose a reason for hiding this comment

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

is this used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice catch, was using it but not anymore. removing in next rev

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

Successfully merging this pull request may close these issues.

2 participants