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

[CP-2191] I want only supported files to be uploaded #1393

Merged
merged 10 commits into from
Sep 25, 2023
Merged

Conversation

OskarMichalkiewicz
Copy link
Contributor

@OskarMichalkiewicz OskarMichalkiewicz commented Sep 20, 2023

Jira: CP-2191

Description

  • getState function in async thunk actions is correctly typed
  • redux selectors are used in components / prop drilling is reduce
Screenshots // put images here

@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Patch coverage: 82.22% and project coverage change: +0.02% 🎉

Comparison is base (b681a76) 76.49% compared to head (d4c4dd0) 76.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1393      +/-   ##
==========================================
+ Coverage   76.49%   76.51%   +0.02%     
==========================================
  Files         919      921       +2     
  Lines       13634    13671      +37     
  Branches     2036     2039       +3     
==========================================
+ Hits        10429    10461      +32     
- Misses       2624     2628       +4     
- Partials      581      582       +1     
Files Changed Coverage Δ
...mponents/files-manager/files-manager.component.tsx 63.05% <0.00%> (-0.41%) ⬇️
...rc/files-manager/reducers/files-manager.reducer.ts 75.00% <0.00%> (-2.15%) ⬇️
...pp/src/files-manager/actions/upload-file.action.ts 55.73% <33.33%> (-1.89%) ⬇️
...s-manager/helpers/check-files-extensions.helper.ts 87.50% <85.71%> (+7.50%) ⬆️
...alid-files-modal/invalid-files-modal.component.tsx 95.83% <95.83%> (ø)
...kages/app/src/files-manager/actions/base.action.ts 100.00% <100.00%> (ø)
...oad-files-modals/upload-files-modals.component.tsx 97.29% <100.00%> (+0.07%) ⬆️
...es-manager/selectors/get-invalid-files.selector.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

)
})

return [validFiles, invalidFiles]
Copy link
Contributor

Choose a reason for hiding this comment

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

actually it doesn't matter at all, but why array of arrays not object with two fields? :D

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it would ease things to create function:
const isPathEligible = (path: string) => eligibleFormat.includes(
(path.split(".").pop() ?? "").toLocaleLowerCase()

and then use it in both filters? :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While writing this i had in mind the syntax of useState for example where as a return value you get something similar to tuple.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

still I think that object might be more descriptive + the filter function is a great idea. Working on it.

@@ -1,3 +1,3 @@
{
"component.collectingDataModalBody": "I agree on sending anonymized data to Mudita"
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't it suppose to be in polish? :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that was synced with phrase, i guess that's some legacy data that still lingers there

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.

2 participants