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

Task/WP-726: Mutation hook: Mkdir #997

Merged
merged 13 commits into from
Dec 4, 2024
Merged

Conversation

jalowe13
Copy link
Collaborator

@jalowe13 jalowe13 commented Nov 5, 2024

Overview

Updating hooks to use React Query mutations with Typescript. This mutation covers making a project directory.

Related

Changes

  • useMkDir.js to useMkDir.ts
  • Identify types of payloads
  • Wraps dispatch actions inside a mutation

Testing

  1. Navigate to where you would like to create a directory
  2. Press the add button and the folder selection
  3. Name your folder
  4. Create folder

UI

image

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 77.14286% with 16 lines in your changes missing coverage. Please review.

Project coverage is 72.88%. Comparing base (e5c17d8) to head (d2f0d08).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
client/src/hooks/datafiles/mutations/useMkdir.ts 77.14% 16 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #997      +/-   ##
==========================================
- Coverage   72.88%   72.88%   -0.01%     
==========================================
  Files         534      534              
  Lines       33455    33491      +36     
  Branches     2981     2984       +3     
==========================================
+ Hits        24385    24409      +24     
- Misses       8875     8887      +12     
  Partials      195      195              
Flag Coverage Δ
javascript 75.75% <77.14%> (-0.02%) ⬇️
unittests 60.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
client/src/hooks/datafiles/mutations/useMkdir.ts 77.14% <77.14%> (ø)

@jalowe13 jalowe13 marked this pull request as ready for review November 6, 2024 16:10
@jalowe13 jalowe13 marked this pull request as draft November 7, 2024 18:35
@jalowe13 jalowe13 marked this pull request as ready for review November 7, 2024 18:53
@jalowe13 jalowe13 requested a review from shayanaijaz November 13, 2024 15:05
Copy link
Collaborator

@jmcmillenmusic jmcmillenmusic left a comment

Choose a reason for hiding this comment

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

It works on my end, but for some reason, the Toast notification says that it failed. Not sure why that's happening, but I can see the new folder and access it, so it looks like it works.

@jalowe13
Copy link
Collaborator Author

@jmcmillenmusic

It works on my end, but for some reason, the Toast notification says that it failed. Not sure why that's happening, but I can see the new folder and access it, so it looks like it works.

Resolved this in 2112858

@jalowe13
Copy link
Collaborator Author

Removed test in 2e853fb
let me know if this test needs to be converted to test for something related to react-query instead

Copy link
Collaborator

@jarosenb jarosenb left a comment

Choose a reason for hiding this comment

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

LGTM!

@jarosenb jarosenb merged commit 46cf216 into main Dec 4, 2024
5 of 6 checks passed
@jarosenb jarosenb deleted the task/WP-726--useMkDir-mutation-hook branch December 4, 2024 21:35
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