Thanks to visit codestin.com
Credit goes to github.com

Skip to content

React Context in settings app#497

Merged
supriya3105 merged 8 commits intodevelopfrom
context-settings-app
Jun 22, 2022
Merged

React Context in settings app#497
supriya3105 merged 8 commits intodevelopfrom
context-settings-app

Conversation

@onkar-saeloun
Copy link
Contributor

Notion card

https://www.notion.so/saeloun/Implementation-of-Context-for-settings-pages-94b4f7c80908450fa6e647cb1b49727f

Summary

  • This feature will introduce the context state management from settings pages.

Preview

Miru._.Time.tracking.and.invoicing.-.20.June.2022.mp4

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Tested Manually on my local machine.

Checklist:

  • I have manually tested all workflows
  • I have performed a self-review of my own code
  • I have added automated tests for my code

@onkar-saeloun onkar-saeloun added the enhancement New feature or request label Jun 20, 2022
@onkar-saeloun onkar-saeloun self-assigned this Jun 20, 2022
@supriya3105
Copy link
Contributor

@ajinkyaa Please review this PR.

await profileApi.update(formD);
setIsDetailUpdated(false);
setErrDetails(initialErrState);
setUserState("profileSettings", {
Copy link
Contributor

Choose a reason for hiding this comment

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

What if API fails? it will still update the profile setting context.
Once API updates should send the response, please check and update accordingly.
Please check and update accordingly to the 200 status.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ajinkyaa I have wrapped this API call with try catch block so it will take care of API failure.

setUserState: (key, value) => { } //eslint-disable-line
}));

export const useEntry = () => useContext(EntryContext);
Copy link
Contributor

Choose a reason for hiding this comment

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

change the name, it's not the entry page.
keep it useProfile something.

@github-actions
Copy link

Current Code Coverage Percent of this PR:

89.28 %

Files having coverage below 100%

Impacted Files Coverage
/lib/custom_failure.rb 80.0 %
/app/controllers/users/invitations_controller.rb 86.36 %
/app/controllers/users/sessions_controller.rb 85.71 %
/app/services/invoice_payment/pdf_generation.rb 70.97 %
/app/services/invoice_payment/checkout.rb 44.0 %
/app/controllers/internal_api/v1/payment_settings_controller.rb 93.33 %
/app/controllers/internal_api/v1/profile_controller.rb 96.88 %
/app/controllers/internal_api/v1/companies_controller.rb 95.45 %
/app/controllers/internal_api/v1/payments/providers_controller.rb 94.74 %
/app/controllers/internal_api/v1/wise/recipients_controller.rb 90.0 %
/lib/benchmarking/benchmarker.rb 0.0 %

@supriya3105
Copy link
Contributor

@ajinkyaa Please review the PR again. Onkar has resolved your feedback comments.

@onkar-saeloun onkar-saeloun requested a review from ajinkyaa June 22, 2022 05:26
@supriya3105 supriya3105 merged commit 5560618 into develop Jun 22, 2022
@supriya3105 supriya3105 deleted the context-settings-app branch June 22, 2022 06:25
@pr-triage pr-triage bot added the PR: merged label Jun 22, 2022
vipulnsward pushed a commit that referenced this pull request Feb 15, 2026
* added context to layout

* added context state management

* addiing context state in userdetails page

* resolved comment

* added loader false on error

* added status validation for context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants