From 48d9c70ec62bd1584df597a7b360fdb8587ad241 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Date: Mon, 18 Mar 2024 11:05:52 +0100 Subject: [PATCH] fix: links and migrate to js-lite new major (#20854) --- README.md | 2 +- .../Subscriptions/views/EditSubscription.tsx | 7 ++----- frontend/src/scenes/actions/ActionEdit.tsx | 2 +- frontend/src/scenes/experiments/Experiment.tsx | 2 +- .../ExperimentImplementationDetails.tsx | 16 ++++++++-------- .../feature-flags/FeatureFlagCodeOptions.tsx | 4 ++-- .../FeatureFlagReleaseConditions.tsx | 2 +- .../onboarding/sdks/product-analytics/nodejs.tsx | 2 +- .../sdk-install-instructions/react-native.tsx | 2 +- .../settings/project/WebhookIntegration.tsx | 2 +- posthog/api/person.py | 4 ++-- 11 files changed, 21 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index d8169fb7acc..a26a11d5710 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ PostHog brings all the tools and data you need to build better products. ### Analytics and optimization tools -- **Event-based analytics:** Capture your product's usage [automatically](https://posthog.com/docs/integrate/client/js#autocapture), or [customize](https://posthog.com/docs/integrate) it to your needs +- **Event-based analytics:** Capture your product's usage [automatically](https://posthog.com/docs/libraries/js#autocapture), or [customize](https://posthog.com/docs/getting-started/install) it to your needs - **User and group tracking:** Understand the [people](https://posthog.com/manual/persons) and [groups](https://posthog.com/manual/group-analytics) behind the events and track properties about them - **Data visualizations:** Create and share [graphs](https://posthog.com/docs/features/trends), [funnels](https://posthog.com/docs/features/funnels), [paths](https://posthog.com/docs/features/paths), [retention](https://posthog.com/docs/features/retention), and [dashboards](https://posthog.com/docs/features/dashboards) - **SQL access:** Use [SQL](https://posthog.com/docs/product-analytics/sql) to get a deeper understanding of your users, breakdown information and create completely tailored visualizations diff --git a/frontend/src/lib/components/Subscriptions/views/EditSubscription.tsx b/frontend/src/lib/components/Subscriptions/views/EditSubscription.tsx index 0ad87f8ae1a..ed34a261c61 100644 --- a/frontend/src/lib/components/Subscriptions/views/EditSubscription.tsx +++ b/frontend/src/lib/components/Subscriptions/views/EditSubscription.tsx @@ -268,10 +268,7 @@ export function EditSubscription({ help={ <> Private channels are only shown if you have{' '} - + added the PostHog Slack App {' '} to them @@ -300,7 +297,7 @@ export function EditSubscription({ to the channel otherwise Subscriptions will fail to be delivered.{' '} See the Docs for more information diff --git a/frontend/src/scenes/actions/ActionEdit.tsx b/frontend/src/scenes/actions/ActionEdit.tsx index 6c335555c7e..9da61873583 100644 --- a/frontend/src/scenes/actions/ActionEdit.tsx +++ b/frontend/src/scenes/actions/ActionEdit.tsx @@ -277,7 +277,7 @@ export function ActionEdit({ action: loadedAction, id }: ActionEditLogicProps): /> See documentation on how to format webhook messages. diff --git a/frontend/src/scenes/experiments/Experiment.tsx b/frontend/src/scenes/experiments/Experiment.tsx index b375314a7f2..40dc9632a61 100644 --- a/frontend/src/scenes/experiments/Experiment.tsx +++ b/frontend/src/scenes/experiments/Experiment.tsx @@ -442,7 +442,7 @@ export function Experiment(): JSX.Element { sure you manually send feature flag information for server-side libraries if necessary.{' '} {' '} diff --git a/frontend/src/scenes/experiments/ExperimentImplementationDetails.tsx b/frontend/src/scenes/experiments/ExperimentImplementationDetails.tsx index 13bebbf4a3d..8880b55f7ea 100644 --- a/frontend/src/scenes/experiments/ExperimentImplementationDetails.tsx +++ b/frontend/src/scenes/experiments/ExperimentImplementationDetails.tsx @@ -19,49 +19,49 @@ interface ExperimentImplementationDetailsProps { } const UTM_TAGS = '?utm_medium=in-product&utm_campaign=experiment' -const DOC_BASE_URL = 'https://posthog.com/docs/integrate/' +const DOC_BASE_URL = 'https://posthog.com/docs/' const FF_ANCHOR = '#feature-flags' const OPTIONS = [ { value: 'JavaScript', - documentationLink: `${DOC_BASE_URL}client/js${UTM_TAGS}${FF_ANCHOR}`, + documentationLink: `${DOC_BASE_URL}libraries/js${UTM_TAGS}${FF_ANCHOR}`, Icon: IconJavascript, Snippet: JSSnippet, }, { value: 'ReactNative', - documentationLink: `${DOC_BASE_URL}client/react-native${UTM_TAGS}${FF_ANCHOR}`, + documentationLink: `${DOC_BASE_URL}libraries/react-native${UTM_TAGS}${FF_ANCHOR}`, Icon: IconJavascript, Snippet: RNSnippet, }, { value: 'Node.js', - documentationLink: `${DOC_BASE_URL}server/node${UTM_TAGS}${FF_ANCHOR}`, + documentationLink: `${DOC_BASE_URL}libraries/node${UTM_TAGS}${FF_ANCHOR}`, Icon: IconNodeJS, Snippet: NodeJSSnippet, }, { value: 'PHP', - documentationLink: `${DOC_BASE_URL}server/php${UTM_TAGS}${FF_ANCHOR}`, + documentationLink: `${DOC_BASE_URL}libraries/php${UTM_TAGS}${FF_ANCHOR}`, Icon: IconPHP, Snippet: PHPSnippet, }, { value: 'Ruby', - documentationLink: `${DOC_BASE_URL}server/ruby${UTM_TAGS}${FF_ANCHOR}`, + documentationLink: `${DOC_BASE_URL}libraries/ruby${UTM_TAGS}${FF_ANCHOR}`, Icon: IconRuby, Snippet: RubySnippet, }, { value: 'Golang', - documentationLink: `${DOC_BASE_URL}server/go${UTM_TAGS}${FF_ANCHOR}`, + documentationLink: `${DOC_BASE_URL}libraries/go${UTM_TAGS}${FF_ANCHOR}`, Icon: IconGolang, Snippet: GolangSnippet, }, { value: 'Python', - documentationLink: `${DOC_BASE_URL}server/python${UTM_TAGS}${FF_ANCHOR}`, + documentationLink: `${DOC_BASE_URL}libraries/python${UTM_TAGS}${FF_ANCHOR}`, Icon: IconPython, Snippet: PythonSnippet, }, diff --git a/frontend/src/scenes/feature-flags/FeatureFlagCodeOptions.tsx b/frontend/src/scenes/feature-flags/FeatureFlagCodeOptions.tsx index 1c87dd765df..c17c7b418d9 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlagCodeOptions.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlagCodeOptions.tsx @@ -141,14 +141,14 @@ export const PAYLOAD_LIBRARIES: string[] = [ export const BOOTSTRAPPING_OPTIONS: InstructionOption[] = [ { value: 'JavaScript', - documentationLink: `${DOC_BASE_URL}integrations/js-integration${UTM_TAGS}${BOOTSTRAPPING_ANCHOR}`, + documentationLink: `${DOC_BASE_URL}libraries/js${UTM_TAGS}${BOOTSTRAPPING_ANCHOR}`, Snippet: JSBootstrappingSnippet, type: LibraryType.Client, key: SDKKey.JS_WEB, }, { value: 'React Native', - documentationLink: `${DOC_BASE_URL}integrate/client/react-native${UTM_TAGS}${BOOTSTRAPPING_ANCHOR}`, + documentationLink: `${DOC_BASE_URL}libraries/react-native${UTM_TAGS}${BOOTSTRAPPING_ANCHOR}`, Snippet: JSBootstrappingSnippet, type: LibraryType.Client, key: SDKKey.REACT_NATIVE, diff --git a/frontend/src/scenes/feature-flags/FeatureFlagReleaseConditions.tsx b/frontend/src/scenes/feature-flags/FeatureFlagReleaseConditions.tsx index 62b997734a5..389e0e2e4f2 100644 --- a/frontend/src/scenes/feature-flags/FeatureFlagReleaseConditions.tsx +++ b/frontend/src/scenes/feature-flags/FeatureFlagReleaseConditions.tsx @@ -151,7 +151,7 @@ export function FeatureFlagReleaseConditions({ These properties aren't immediately available on first page load for unidentified persons. This feature flag requires that at least one event is sent prior to becoming available to your product or website.{' '} - + {' '} Learn more about how to make feature flags available instantly. diff --git a/frontend/src/scenes/onboarding/sdks/product-analytics/nodejs.tsx b/frontend/src/scenes/onboarding/sdks/product-analytics/nodejs.tsx index 39d758c03dc..0dbea9723a9 100644 --- a/frontend/src/scenes/onboarding/sdks/product-analytics/nodejs.tsx +++ b/frontend/src/scenes/onboarding/sdks/product-analytics/nodejs.tsx @@ -13,7 +13,7 @@ function NodeCaptureSnippet(): JSX.Element { // Send queued events immediately. Use for example in a serverless environment // where the program may terminate before everything is sent. // Use \`client.flush()\` instead if you still need to send more events or fetch feature flags. -client.shutdownAsync()`} +client.shutdown()`} ) } diff --git a/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/react-native.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/react-native.tsx index b54a7b481d1..a206fdc6ec9 100644 --- a/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/react-native.tsx +++ b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/react-native.tsx @@ -28,7 +28,7 @@ pod install`}

PostHog is most easily used via the PostHogProvider component but if you need to instantiate it directly,{' '} - + check out the docs {' '} which explain how to do this correctly. diff --git a/frontend/src/scenes/settings/project/WebhookIntegration.tsx b/frontend/src/scenes/settings/project/WebhookIntegration.tsx index a3e30b57fce..6a01dd2e113 100644 --- a/frontend/src/scenes/settings/project/WebhookIntegration.tsx +++ b/frontend/src/scenes/settings/project/WebhookIntegration.tsx @@ -42,7 +42,7 @@ export function WebhookIntegration(): JSX.Element { Send notifications when selected actions are performed by users.
Guidance on integrating with webhooks available in our docs,{' '} - for Slack and{' '} + for Slack and{' '} for Microsoft Teams. Discord is also supported.

diff --git a/posthog/api/person.py b/posthog/api/person.py index c17fde28938..5e232822366 100644 --- a/posthog/api/person.py +++ b/posthog/api/person.py @@ -220,7 +220,7 @@ def get_funnel_actor_class(filter: Filter) -> Callable: class PersonViewSet(TeamAndOrgViewSetMixin, viewsets.ModelViewSet): """ - To create or update persons, use a PostHog library of your choice and [use an identify call](/docs/integrate/identifying-users). This API endpoint is only for reading and deleting. + To create or update persons, use a PostHog library of your choice and [use an identify call](/product-analytics/identify). This API endpoint is only for reading and deleting. """ scope_object = "person" @@ -646,7 +646,7 @@ class PersonViewSet(TeamAndOrgViewSetMixin, viewsets.ModelViewSet): def create(self, *args, **kwargs): raise MethodNotAllowed( method="POST", - detail="Creating persons via this API is not allowed. Please create persons by sending an $identify event. See https://posthog.com/docs/integrate/identifying-user for details.", + detail="Creating persons via this API is not allowed. Please create persons by sending an $identify event. See https://posthog.com/docs/product-analytics/identify for details.", ) def _set_properties(self, properties, user):