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

[🧹 UNIFICATION CLEANUP] Refactor extensions/components directory #6882

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

Conversation

brionmario
Copy link
Member

@brionmario brionmario commented Sep 10, 2024

Purpose

Completely refactor the admin.extensions.v1/components directly and move the logic to related features.

Related Issues

Related PRs

  • N/A

Checklist

  • e2e cypress tests locally verified. (for internal contributers)
  • Manual test round performed and verified.
  • UX/UI review done on the final implementation.
  • Documentation provided. (Add links if there are any)
  • Relevant backend changes deployed and verified
  • Unit tests provided. (Add links if there are any)
  • Integration tests provided. (Add links if there are any)

Security checks

@brionmario brionmario changed the title Code cleanup 2024 extensions [🧹 UNIFICATION CLEANUP] Refactor extensions feature directory Sep 10, 2024
@brionmario brionmario force-pushed the code-cleanup-2024-extensions branch from bd23e5d to 2bccd03 Compare September 10, 2024 12:35
@brionmario brionmario force-pushed the code-cleanup-2024-extensions branch from cb3df77 to 7fe5d52 Compare September 11, 2024 10:22
@brionmario brionmario changed the title [🧹 UNIFICATION CLEANUP] Refactor extensions feature directory [🧹 UNIFICATION CLEANUP] Refactor extensions/components directory Sep 12, 2024
Comment on lines +51 to +62
const { data, error, isValidating, mutate } = useRequest<Data, Error>(
requestConfig
);

return {
data,
error,
isLoading: !data && !error,
isValidating,
mutate
};
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Moving forward we can directly use isLoading property from swr hook. Please check other places as well

Suggested change
const { data, error, isValidating, mutate } = useRequest<Data, Error>(
requestConfig
);
return {
data,
error,
isLoading: !data && !error,
isValidating,
mutate
};
};
const { data, error, isLoading, isValidating, mutate } = useRequest<Data, Error>(
requestConfig
);
return {
data,
error,
isLoading,
isValidating,
mutate
};
};

Copy link
Member Author

Choose a reason for hiding this comment

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

+1

However, since this PR only focuses on refactoring the existing files and logic, lets not do any drastic logic changes to avoid regressions.

features/admin.sms-providers.v1/configs/endpoints.ts Outdated Show resolved Hide resolved
features/admin.sms-providers.v1/api/add-sms-publisher.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 31.79%. Comparing base (c1a3705) to head (8900f53).
Report is 1182 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6882   +/-   ##
=======================================
  Coverage   31.79%   31.79%           
=======================================
  Files          41       41           
  Lines         890      890           
  Branches      204      220   +16     
=======================================
  Hits          283      283           
+ Misses        607      557   -50     
- Partials        0       50   +50     
Flag Coverage Δ
@wso2is/core 31.79% <ø> (ø)

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

see 15 files with indirect coverage changes

@brionmario brionmario force-pushed the code-cleanup-2024-extensions branch from e89f164 to 8900f53 Compare September 25, 2024 10:10
@wso2-jenkins-bot
Copy link
Contributor

🦋 Changeset detected

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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.

4 participants