-
Notifications
You must be signed in to change notification settings - Fork 3
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
Development #368
Development #368
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -7,6 +7,7 @@ import { FaGoogleDrive } from 'react-icons/fa'; | |||||||||
import { FaWikipediaW } from 'react-icons/fa'; | ||||||||||
import { FaGoogle } from 'react-icons/fa'; | ||||||||||
import { FaTelegram, FaTwitter } from 'react-icons/fa6'; | ||||||||||
import { FaSquareXTwitter } from "react-icons/fa6"; | ||||||||||
Comment on lines
9
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Clean up Twitter-related imports Since Twitter has rebranded to X, we should clean up the imports and remove the unused Twitter icon. -import { FaTelegram, FaTwitter } from 'react-icons/fa6';
+import { FaTelegram } from 'react-icons/fa6';
import { FaSquareXTwitter } from "react-icons/fa6"; 📝 Committable suggestion
Suggested change
|
||||||||||
import { RiNotionFill } from 'react-icons/ri'; | ||||||||||
|
||||||||||
interface TcCommunityPlatformIconProps { | ||||||||||
|
@@ -24,6 +25,8 @@ function TcCommunityPlatformIcon({ | |||||||||
return <FaDiscord size={size} />; | ||||||||||
case 'Twitter': | ||||||||||
return <FaTwitter size={size} />; | ||||||||||
case 'X': | ||||||||||
return <FaSquareXTwitter size={size} />; | ||||||||||
case 'Discourse': | ||||||||||
return <FaDiscourse size={size} />; | ||||||||||
case 'Telegram': | ||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -69,11 +69,11 @@ function TcCommunityPlatforms() { | |||||||||||||||||||||||
const fetchPlatformsByType = async () => { | ||||||||||||||||||||||||
const platformNames = [ | ||||||||||||||||||||||||
'discord', | ||||||||||||||||||||||||
'google', | ||||||||||||||||||||||||
'github', | ||||||||||||||||||||||||
'discourse', | ||||||||||||||||||||||||
'notion', | ||||||||||||||||||||||||
'mediaWiki', | ||||||||||||||||||||||||
'discourse', | ||||||||||||||||||||||||
'google', | ||||||||||||||||||||||||
Comment on lines
72
to
+76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Align platform order with IntegrationPlatform enum The platform order in const platformNames = [
'discord',
'github',
'discourse',
'notion',
'mediaWiki',
- 'google',
+ 'gdrive',
]; 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||
]; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
const platformName = platformNames[activeTab]; | ||||||||||||||||||||||||
|
@@ -180,7 +180,7 @@ function TcCommunityPlatforms() { | |||||||||||||||||||||||
return ( | ||||||||||||||||||||||||
<div> | ||||||||||||||||||||||||
<Paper className='rounded-none bg-gray-100 p-4 shadow-none'> | ||||||||||||||||||||||||
<div className='flex flex-col space-y-3 md:flex-row md:items-center md:space-y-0 md:space-x-3'> | ||||||||||||||||||||||||
<div className='flex flex-col space-y-3 md:flex-row md:items-center md:space-x-3 md:space-y-0'> | ||||||||||||||||||||||||
<TcText text='Platforms' variant='h6' fontWeight='bold' /> | ||||||||||||||||||||||||
<TcText text='Add/remove platform integrations' variant='body1' /> | ||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
|
@@ -246,7 +246,7 @@ function TcCommunityPlatforms() { | |||||||||||||||||||||||
)} | ||||||||||||||||||||||||
{activeTab === 1 && ( | ||||||||||||||||||||||||
<TabPanel value={activeTab} index={1}> | ||||||||||||||||||||||||
<TcGdriveIntegration | ||||||||||||||||||||||||
<TcGithubIntegration | ||||||||||||||||||||||||
isLoading={isLoading} | ||||||||||||||||||||||||
connectedPlatforms={platforms} | ||||||||||||||||||||||||
handleUpdateCommunityPlatform={handleUpdateCommunityPlatform} | ||||||||||||||||||||||||
|
@@ -255,7 +255,7 @@ function TcCommunityPlatforms() { | |||||||||||||||||||||||
)} | ||||||||||||||||||||||||
{activeTab === 2 && ( | ||||||||||||||||||||||||
<TabPanel value={activeTab} index={2}> | ||||||||||||||||||||||||
<TcGithubIntegration | ||||||||||||||||||||||||
<TcDiscourse | ||||||||||||||||||||||||
isLoading={isLoading} | ||||||||||||||||||||||||
connectedPlatforms={platforms} | ||||||||||||||||||||||||
handleUpdateCommunityPlatform={handleUpdateCommunityPlatform} | ||||||||||||||||||||||||
|
@@ -282,7 +282,7 @@ function TcCommunityPlatforms() { | |||||||||||||||||||||||
)} | ||||||||||||||||||||||||
{activeTab === 5 && ( | ||||||||||||||||||||||||
<TabPanel value={activeTab} index={5}> | ||||||||||||||||||||||||
<TcDiscourse | ||||||||||||||||||||||||
<TcGdriveIntegration | ||||||||||||||||||||||||
isLoading={isLoading} | ||||||||||||||||||||||||
connectedPlatforms={platforms} | ||||||||||||||||||||||||
handleUpdateCommunityPlatform={handleUpdateCommunityPlatform} | ||||||||||||||||||||||||
|
@@ -292,15 +292,15 @@ function TcCommunityPlatforms() { | |||||||||||||||||||||||
</Box> | ||||||||||||||||||||||||
</Paper> | ||||||||||||||||||||||||
<div className='py-4'> | ||||||||||||||||||||||||
<div className='flex flex-col space-y-3 md:flex-row md:items-center md:space-y-0 md:space-x-3'> | ||||||||||||||||||||||||
<div className='flex flex-col space-y-3 md:flex-row md:items-center md:space-x-3 md:space-y-0'> | ||||||||||||||||||||||||
<TcText text='Modules' variant='h6' fontWeight='bold' /> | ||||||||||||||||||||||||
<TcText | ||||||||||||||||||||||||
text='Turn on/off modules and change their settings' | ||||||||||||||||||||||||
variant='body1' | ||||||||||||||||||||||||
/> | ||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
<div className='flex flex-col space-y-4 md:flex-row md:space-y-0 md:space-x-4'> | ||||||||||||||||||||||||
<div className='flex flex-col space-y-4 md:flex-row md:space-x-4 md:space-y-0'> | ||||||||||||||||||||||||
<TcCard | ||||||||||||||||||||||||
className='max-h-[6rem] min-h-[6rem] min-w-[10rem] max-w-[10rem] flex-grow' | ||||||||||||||||||||||||
children={ | ||||||||||||||||||||||||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
export enum IntegrationPlatform { | ||
Discord = 'Discord', | ||
GDrive = 'GDrive', | ||
Github = 'Github', | ||
Discourse = 'Discourse', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Platform order needs to be aligned with PLATFORM_ORDER The enum order in
Note: The Discourse platform is actively used in the codebase and should not be removed, contrary to the initial concern in the AI summary. 🔗 Analysis chainVerify the status and order of integration platforms The changes to the
Also applies to: 8-10 Let me verify the enum order and Discourse usage further by checking the complete enum definition and its usage across the codebase. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for PLATFORM_ORDER constant and Discourse platform usage
rg -A 5 "PLATFORM_ORDER\s*="
rg "case 'Discourse':"
Length of output: 785 Script: #!/bin/bash
# Get the complete IntegrationPlatform enum definition
ast-grep --pattern 'enum IntegrationPlatform {
$$$
}'
# Check Discourse platform usage in the codebase
rg "IntegrationPlatform.Discourse" -A 2
Length of output: 876 |
||
Notion = 'Notion', | ||
MediaWiki = 'MediaWiki', | ||
Discourse = 'Discourse', | ||
Twitter = 'Twitter', | ||
Telegram = 'Telegram', | ||
X = 'X', | ||
Snapshot = 'Snapshot', | ||
GDrive = 'GDrive', | ||
} | ||
|
||
export enum StatusCode { | ||
|
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.
Fix misleading variable names in platform fetching
The variable names don't match their content:
googleResults
is used for GitHub datagithubResults
is used for Notion dataApply this fix:
Also applies to: 154-154