Skip to content

Commit

Permalink
chore(apps): rename plugins to apps (#9755)
Browse files Browse the repository at this point in the history
* chore(apps): rename plugins to apps

* rename more

* few more links and lines
  • Loading branch information
mariusandra authored May 20, 2022
1 parent 3412eed commit 6a5a71b
Show file tree
Hide file tree
Showing 24 changed files with 71 additions and 73 deletions.
2 changes: 1 addition & 1 deletion frontend/src/layout/navigation/SideBar/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function Pages(): JSX.Element {
<PageButton icon={<IconComment />} identifier={Scene.Annotations} to={urls.annotations()} />
<LemonDivider />
{canViewPlugins(currentOrganization) && (
<PageButton icon={<IconExtension />} identifier={Scene.Plugins} to={urls.plugins()} />
<PageButton icon={<IconExtension />} identifier={Scene.Plugins} to={urls.projectApps()} />
)}
<PageButton icon={<IconTools />} identifier={Scene.ToolbarLaunch} to={urls.toolbarLaunch()} />
<PageButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ export const commandPaletteLogic = kea<
display: 'Go to Plugins',
synonyms: ['integrations'],
executor: () => {
push(urls.plugins())
push(urls.projectApps())
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function redirectOnSelectItems(
router.actions.push(urls.experiment(value))
} else if (groupType === TaxonomicFilterGroupType.Plugins) {
router.actions.push(
combineUrl(urls.plugins(), {
combineUrl(urls.projectApps(), {
tab: (item as PluginSelectionType).tab,
name: (item as PluginSelectionType).name,
}).url
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/scenes/plugins/Plugins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ export function Plugins(): JSX.Element | null {
return (
<div className="plugins-scene">
<PageHeader
title="Plugins"
title="Apps"
caption={
<>
Plugins enable you to extend PostHog's core data processing functionality.
Apps enable you to extend PostHog's core data processing functionality.
<br />
Make use of verified plugins from the{' '}
<a href="https://posthog.com/plugins" target="_blank">
Plugin Library
Make use of verified apps from the{' '}
<a href="https://posthog.com/apps" target="_blank">
App Library
</a>{' '}
– or{' '}
<a href="https://posthog.com/docs/plugins/build" target="_blank">
<a href="https://posthog.com/docs/apps/build" target="_blank">
build your own
</a>
.
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/plugins/PluginsSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function PluginsSearch(): JSX.Element {
return (
<Input.Search
data-attr="plugins-search"
placeholder="Start typing to search for a plugin"
placeholder="Start typing to search for an app"
autoFocus
value={searchTerm || ''}
onChange={(e) => setSearchTerm(e.target.value)}
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/scenes/plugins/edit/PluginDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export function PluginDrawer(): JSX.Element {
canInstallPlugins(user?.organization, editingPlugin.organization_id) && (
<Popconfirm
placement="topLeft"
title="Are you sure you wish to uninstall this plugin completely?"
title="Are you sure you wish to uninstall this app completely?"
onConfirm={() => uninstallPlugin(editingPlugin.name)}
okText="Uninstall"
cancelText="Cancel"
Expand All @@ -168,8 +168,8 @@ export function PluginDrawer(): JSX.Element {
<Tooltip
title={
<>
This plugin can currently be used by other organizations in this
instance of PostHog. This action will <b>disable and hide it</b> for all
This app can currently be used by other organizations in this instance
of PostHog. This action will <b>disable and hide it</b> for all
organizations other than yours.
</>
}
Expand All @@ -187,8 +187,8 @@ export function PluginDrawer(): JSX.Element {
<Tooltip
title={
<>
This action will mark this plugin as installed for{' '}
<b>all organizations</b> in this instance of PostHog.
This action will mark this app as installed for <b>all organizations</b>{' '}
in this instance of PostHog.
</>
}
>
Expand Down Expand Up @@ -307,7 +307,7 @@ export function PluginDrawer(): JSX.Element {
Configuration
</h3>
{getConfigSchemaArray(editingPlugin.config_schema).length === 0 ? (
<div>This plugin is not configurable.</div>
<div>This app is not configurable.</div>
) : null}
{getConfigSchemaArray(editingPlugin.config_schema).map((fieldConfig, index) => (
<React.Fragment key={fieldConfig.key || `__key__${index}`}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function PluginJobOptions({ plugin, pluginConfigId }: PluginJobOptionsPro
return (
<div key={jobName}>
{jobName === 'Export historical events' ? (
<Tooltip title="Run this plugin on all historical events ingested until now">
<Tooltip title="Run this app on all historical events ingested until now">
<i>Export historical events</i>
</Tooltip>
) : (
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/scenes/plugins/plugin/CommunityPluginTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export function CommunityPluginTag({ isCommunity }: { isCommunity?: boolean }):
<Tooltip
title={
isCommunity
? 'This plugin was built by a community memeber, not the PostHog team.'
: 'This plugin was built by the PostHog team.'
? 'This app was built by a community memeber, not the PostHog team.'
: 'This app was built by the PostHog team.'
}
>
<Tag color={isCommunity ? 'cyan' : 'geekblue'}>{isCommunity ? 'Community' : 'Official'}</Tag>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/plugins/plugin/LocalPluginTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function LocalPluginTag({
return (
<Tooltip title={url.substring(5)}>
<Tag color="purple" onClick={() => copyToClipboard(url.substring(5))} style={style}>
{title || 'Local Plugin'}
{title || 'Local App'}
</Tag>
</Tooltip>
)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/plugins/plugin/LogsDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function LogsDrawer(): JSX.Element {
visible={!!showingLogsPlugin}
onClose={hidePluginLogs}
width={'min(90vw, 80rem)'}
title={`Viewing Plugin Logs: ${lastShownLogsPlugin?.name}`}
title={`Viewing App Logs: ${lastShownLogsPlugin?.name}`}
placement="left"
destroyOnClose
>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/scenes/plugins/plugin/PluginCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function PluginCard({
</DragColumn>
) : null}
{unorderedPlugin ? (
<Tooltip title="This plugin does not do any processing in order." placement="topRight">
<Tooltip title="This app does not do any processing in order." placement="topRight">
<Col>
<Tag color="#555">-</Tag>
</Col>
Expand Down Expand Up @@ -204,7 +204,7 @@ export function PluginCard({
title={
pluginConfig?.id
? 'Logs'
: 'Logs – enable the plugin for the first time to view them'
: 'Logs – enable the app for the first time to view them'
}
>
<Button
Expand Down
13 changes: 5 additions & 8 deletions frontend/src/scenes/plugins/source/PluginSource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,14 @@ export function PluginSource({ id, visible, close }: PluginSourceProps): JSX.Ele
<>
<p>
Read our{' '}
<a href="https://posthog.com/docs/plugins/build/overview" target="_blank">
plugin building overview in PostHog Docs
<a href="https://posthog.com/docs/apps/build" target="_blank">
app building overview in PostHog Docs
</a>{' '}
for a good grasp of possibilities.
<br />
Once satisfied with your plugin, feel free to{' '}
<a
href="https://posthog.com/docs/plugins/build/tutorial#submitting-your-plugin"
target="_blank"
>
submit it to the official Plugin Library
Once satisfied with your app, feel free to{' '}
<a href="https://posthog.com/docs/apps/build/tutorial#submitting-your-app" target="_blank">
submit it to the official App Store
</a>
.
</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const createDefaultPluginSource = (name: string): Record<string, any> => ({
'index.ts': `// Learn more about plugins at: https://posthog.com/docs/plugins/build/overview
'index.ts': `// Learn more about plugins at: https://posthog.com/docs/apps/build
// Processes each event, optionally transforming it
export function processEvent(event, { config }) {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/scenes/plugins/tabs/advanced/AdvancedTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ export function AdvancedTab(): JSX.Element {
message="Advanced Features Ahead"
description={
<>
Create and install your <b>own plugins</b> or plugins from <b>third-parties</b>. If you're
looking for officially supported plugins, try the{' '}
Create and install your <b>own apps</b> or apps from <b>third-parties</b>. If you're looking for
officially supported apps, try the{' '}
<a
href="#"
onClick={(e) => {
e.preventDefault()
setPluginTab(PluginTab.Repository)
}}
>
Plugin Repository
App Repository
</a>
.
</>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/scenes/plugins/tabs/advanced/CustomPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function CustomPlugin(): JSX.Element {
<Card>
<Title level={5}>Install from GitHub, GitLab or npm</Title>
<Paragraph>
To install a third-party or custom plugin, paste its URL below. For{' '}
To install a third-party or custom app, paste its URL below. For{' '}
<a
href="https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token"
target="_blank"
Expand All @@ -41,7 +41,7 @@ export function CustomPlugin(): JSX.Element {
</a>{' '}
private repositories, append <code>?private_token=TOKEN</code> to the end of the URL.
<br />
<b className="text-warning">Warning: Only install plugins from trusted sources.</b>
<b className="text-warning">Warning: Only install apps from trusted sources.</b>
</Paragraph>

<Row style={{ width: '100%' }} gutter={16}>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/scenes/plugins/tabs/advanced/LocalPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export function LocalPlugin(): JSX.Element {
return (
<div style={{ marginTop: 16 }}>
<Card>
<Title level={5}>Install Local Plugin</Title>
<Paragraph>To install a local plugin from this computer/server, give its full path below.</Paragraph>
<Title level={5}>Install Local App</Title>
<Paragraph>To install a local app from this computer/server, give its full path below.</Paragraph>

<Row style={{ width: '100%' }} gutter={16}>
<Col style={{ flex: 1 }}>
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/scenes/plugins/tabs/advanced/SourcePlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export function SourcePlugin(): JSX.Element {
return (
<div style={{ marginTop: 16 }}>
<Card>
<Title level={5}>Plugin Editor</Title>
<Title level={5}>App Editor</Title>
<Paragraph>
Write your plugin directly in PostHog.{' '}
<a href="https://posthog.com/docs/plugins/overview" target="_blank">
Write your app directly in PostHog.{' '}
<a href="https://posthog.com/docs/apps" target="_blank">
Read the documentation for more information!
</a>
</Paragraph>
Expand All @@ -26,7 +26,7 @@ export function SourcePlugin(): JSX.Element {
value={sourcePluginName}
disabled={loading}
onChange={(e) => setSourcePluginName(e.target.value)}
placeholder={`For example: "Hourly Weather Sync Plugin"`}
placeholder={`For example: "Hourly Weather Sync App"`}
/>
</Col>
<Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function DisabledPluginSection(): JSX.Element {
) : (
<CaretRightOutlined />
)}
{` Installed plugins (${filteredDisabledPlugins.length})`}
{` Installed apps (${filteredDisabledPlugins.length})`}
</>
}
/>
Expand All @@ -42,7 +42,7 @@ export function DisabledPluginSection(): JSX.Element {
))}
</Row>
) : (
<p style={{ margin: 10 }}>No plugins match your search.</p>
<p style={{ margin: 10 }}>No apps match your search.</p>
)}
</>
) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ export function EnabledPluginSection(): JSX.Element {
<Tooltip
title={
enabledPlugins.length <= 1 ? (
'At least two plugins need to be enabled for reordering.'
'At least two apps need to be enabled for reordering.'
) : (
<>
{!!searchTerm ? (
'Editing the order of plugins is disabled when searching.'
'Editing the order of apps is disabled when searching.'
) : (
<>
Order matters because event processing with plugins works like a pipe: the event is
processed by every enabled plugin <b>in sequence</b>.
Order matters because event processing with apps works like a pipe: the event is
processed by every enabled app <b>in sequence</b>.
</>
)}
</>
Expand Down Expand Up @@ -167,7 +167,7 @@ export function EnabledPluginSection(): JSX.Element {
subtitle={
<>
{sectionsOpen.includes(PluginSection.Enabled) ? <CaretDownOutlined /> : <CaretRightOutlined />}
{` Enabled plugins (${filteredEnabledPlugins.length})`}
{` Enabled apps (${filteredEnabledPlugins.length})`}
{rearranging && sectionsOpen.includes(PluginSection.Enabled) && (
<Tag color="red" style={{ fontWeight: 'normal', marginLeft: 10 }}>
Reordering in progress
Expand All @@ -184,7 +184,7 @@ export function EnabledPluginSection(): JSX.Element {
return (
<>
<EnabledPluginsHeader />
{sectionsOpen.includes(PluginSection.Enabled) && <p style={{ margin: 10 }}>No plugins enabled.</p>}
{sectionsOpen.includes(PluginSection.Enabled) && <p style={{ margin: 10 }}>No apps enabled.</p>}
</>
)
}
Expand All @@ -195,7 +195,7 @@ export function EnabledPluginSection(): JSX.Element {
{sectionsOpen.includes(PluginSection.Enabled) && (
<>
{sortableEnabledPlugins.length === 0 && unsortableEnabledPlugins.length === 0 && (
<p style={{ margin: 10 }}>No plugins match your search.</p>
<p style={{ margin: 10 }}>No apps match your search.</p>
)}
{canRearrange || rearranging ? (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function PluginsEmptyState(): JSX.Element {
subtitle={
<>
{' '}
<CaretRightOutlined /> {'Enabled plugins'}{' '}
<CaretRightOutlined /> {'Enabled apps'}{' '}
</>
}
buttons={<Skeleton.Button style={{ width: 150 }} />}
Expand All @@ -31,13 +31,13 @@ export function PluginsEmptyState(): JSX.Element {
</>
) : (
<>
<Subtitle subtitle="Installed plugins" />
<Subtitle subtitle="Installed apps" />
<Row gutter={16} style={{ marginTop: 16 }}>
<Col span={24}>
<Empty description={<span>You haven't installed any plugins yet</span>}>
<Empty description={<span>You haven't installed any apps yet</span>}>
{canGloballyManagePlugins(user?.organization) && (
<Button type="default" onClick={() => setPluginTab(PluginTab.Repository)}>
Open the Plugin Repository
Open the App Repository
</Button>
)}
</Empty>
Expand Down
Loading

0 comments on commit 6a5a71b

Please sign in to comment.