-
Notifications
You must be signed in to change notification settings - Fork 1
Origin/fluent community #121
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive FluentCommunity integration to the system, introducing support for community management features through a new integration module.
Key changes:
- Complete FluentCommunity integration with multiple actions (add user, remove user, course management, post creation, etc.)
- Frontend components for configuration and field mapping
- Backend API routes and controllers for FluentCommunity operations
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
includes/Actions/FluentCommunity/Routes.php | Defines API routes for FluentCommunity operations |
includes/Actions/FluentCommunity/RecordApiHelper.php | Handles record operations and API interactions for FluentCommunity |
includes/Actions/FluentCommunity/FluentCommunityController.php | Main controller for FluentCommunity integration logic |
frontend-dev/src/components/Flow/New/SelectAction.jsx | Adds FluentCommunity to action selection dropdown |
frontend-dev/src/components/AllIntegrations/NewInteg.jsx | Registers FluentCommunity integration component |
frontend-dev/src/components/AllIntegrations/IntegInfo.jsx | Adds FluentCommunity authorization component |
frontend-dev/src/components/AllIntegrations/FluentCommunity/.js | Complete frontend implementation including forms, field mapping, authorization, and static data |
frontend-dev/src/components/AllIntegrations/EditInteg.jsx | Registers edit component for FluentCommunity |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
frontend-dev/src/components/AllIntegrations/FluentCommunity/FluentCommunityAuthorization.jsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
frontend-dev/src/components/AllIntegrations/FluentCommunity/FluentCommunityIntegLayout.jsx:1
- [nitpick] Using backslash prefix for
\\is_null()
is inconsistent with other function calls in the same file. Consider usingis_null()
without the backslash for consistency, or apply the backslash prefix consistently throughout the file.
import { __ } from '../../../Utils/i18nwrap'
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
frontend-dev/src/components/AllIntegrations/FluentCommunity/EditFluentCommunity.jsx
Show resolved
Hide resolved
frontend-dev/src/components/AllIntegrations/FluentCommunity/EditFluentCommunity.jsx
Show resolved
Hide resolved
frontend-dev/src/components/AllIntegrations/FluentCommunity/FluentCommunity.jsx
Show resolved
Hide resolved
if ( | ||
(fluentCommunityConf?.actionName === 'add-course' || | ||
fluentCommunityConf?.actionName === 'remove-course') && | ||
!fluentCommunityConf.course_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ['add-course', 'remove-course'].includes(fluentCommunityConf?.actionName)
}) | ||
return | ||
} | ||
if (fluentCommunityConf.name !== '' && fluentCommunityConf.field_map.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move those conditions to a separate common file that could be used from multiple files
delete newConf?.fluentCommunityList | ||
delete newConf?.fluentCommunityTags | ||
|
||
if (e.target.value !== '') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use value instead of e.targe.value
setFluentCommunityConf({ ...newConf }) | ||
} | ||
|
||
const handleAction = e => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optimize and rename handleAction
value={fluentCommunityConf?.actionName} | ||
className="btcd-paper-inp w-5"> | ||
<option value="">{__('Select Action', 'bit-integrations')}</option> | ||
{action.map(({ label, value, is_pro }) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map action dropdown in one loop. See what others do
)} | ||
{(fluentCommunityConf?.actionName === 'add-user' || | ||
fluentCommunityConf?.actionName === 'remove-user') && | ||
fluentCommunityConf?.fluentCommunityList && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use [''add-user', 'remove-user'].includes(fluentCommunityConf?.actionName)
)} | ||
{(fluentCommunityConf?.actionName === 'add-course' || | ||
fluentCommunityConf?.actionName === 'remove-course') && | ||
fluentCommunityConf?.fluentCommunityCourses && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use [''add-user', 'remove-user'].includes(fluentCommunityConf?.actionName)
This reverts commit ab96241.
No description provided.