Skip to content

Commit

Permalink
Merge branch 'master' into feat/query-cancel-on-navigation-ish
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Dec 22, 2022
2 parents 1064aba + cdf4db4 commit b3c5e2f
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 25 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/ci-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,27 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- name: Get pnpm cache directory path
id: pnpm-cache-dir
run: echo "PNPM_STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Get cypress cache directory path
id: cypress-cache-dir
run: echo "CYPRESS_BIN_PATH=$(npx cypress cache path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: pnpm-cache
with:
path: |
${{ steps.pnpm-cache-dir.outputs.PNPM_STORE_PATH }}
${{ steps.cypress-cache-dir.outputs.CYPRESS_BIN_PATH }}
key: ${{ runner.os }}-pnpm-cypress-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-cypress-
- name: Install package.json dependencies with pnpm
run: |
pnpm install
npx cypress cache clear
npx cypress install
run: pnpm install --frozen-lockfile

- name: Stop/Start stack with Docker Compose
run: |
Expand Down Expand Up @@ -310,7 +324,7 @@ jobs:
config-file: cypress.e2e.config.ts
config: retries=2
spec: ${{ matrix.specs }}
install: true
install: false

- name: Archive test screenshots
uses: actions/upload-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lib/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export const FEATURE_FLAGS = {
WEBSITE_ANALYTICS_TEMPLATE: 'website-analytics-template', // owner: @pauldambra
VARIANT_OVERRIDES: 'variant-overrides', // owner: @neilkakkar
ONBOARDING_V2_EXPERIMENT: 'onboarding-v2-experiment', // owner: #team-growth
ONBOARDING_DEMO_EXPERIMENT: 'onboarding-demo-experiment', // owner: #team-growth
FEATURE_FLAG_ROLLOUT_UX: 'feature-flag-rollout-ux', // owner: @neilkakkar
ROLE_BASED_ACCESS: 'role-based-access', // owner: #team-experiments, @liyiy
DASHBOARD_TEMPLATES: 'dashboard-templates', // owner @pauldambra
Expand Down
8 changes: 2 additions & 6 deletions frontend/src/scenes/ingestion/v2/ingestionLogicV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,7 @@ export const ingestionLogicV2 = kea<ingestionLogicV2Type>([
},
inviteTeamMembersSuccess: () => {
if (router.values.location.pathname.includes('/ingestion')) {
actions.setState({
...values.currentState,
isTechnicalUser: false,
hasInvitedMembers: true,
} as IngestionState)
actions.setState(viewToState(INGESTION_VIEWS.TEAM_INVITED, values.currentState as IngestionState))
}
},
})),
Expand Down Expand Up @@ -597,7 +593,7 @@ function getUrl(values: ingestionLogicV2Type['values']): string | [string, Recor
url += `/${framework.toLowerCase()}`
}
} else {
if (!platform && isTechnicalUser && hasInvitedMembers) {
if (!platform && hasInvitedMembers) {
url += '/invites-sent'
}
}
Expand Down
15 changes: 10 additions & 5 deletions frontend/src/scenes/ingestion/v2/panels/InviteTeamPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useActions } from 'kea'
import { useActions, useValues } from 'kea'
import { ingestionLogicV2 } from 'scenes/ingestion/v2/ingestionLogicV2'
import { LemonButton } from 'lib/components/LemonButton'
import './Panels.scss'
Expand All @@ -7,11 +7,14 @@ import { IconChevronRight } from 'lib/components/icons'
import { inviteLogic } from 'scenes/organization/Settings/inviteLogic'
import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
import { DemoProjectButton } from './PanelComponents'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { FEATURE_FLAGS } from 'lib/constants'

export function InviteTeamPanel(): JSX.Element {
const { next } = useActions(ingestionLogicV2)
const { showInviteModal } = useActions(inviteLogic)
const { reportInviteMembersButtonClicked } = useActions(eventUsageLogic)
const { featureFlags } = useValues(featureFlagLogic)

return (
<div>
Expand Down Expand Up @@ -56,10 +59,12 @@ export function InviteTeamPanel(): JSX.Element {
</p>
</div>
</LemonButton>
<DemoProjectButton
text="I just want to try PostHog with some demo data."
subtext="Explore insights, create dashboards, try out cohorts, and more."
/>
{featureFlags[FEATURE_FLAGS.ONBOARDING_DEMO_EXPERIMENT] === 'test' ? (
<DemoProjectButton
text="I just want to try PostHog with some demo data."
subtext="Explore insights, create dashboards, try out cohorts, and more."
/>
) : null}
</div>
</div>
)
Expand Down
19 changes: 11 additions & 8 deletions frontend/src/scenes/ingestion/v2/panels/TeamInvitedPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
import { useActions } from 'kea'
import { useActions, useValues } from 'kea'
import { ingestionLogicV2 } from 'scenes/ingestion/v2/ingestionLogicV2'
import { LemonButton } from 'lib/components/LemonButton'
import './Panels.scss'
import { LemonDivider } from 'lib/components/LemonDivider'
import { IconChevronRight } from 'lib/components/icons'
import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
import { DemoProjectButton } from './PanelComponents'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { FEATURE_FLAGS } from 'lib/constants'

export function TeamInvitedPanel(): JSX.Element {
const { completeOnboarding } = useActions(ingestionLogicV2)
const { reportIngestionContinueWithoutVerifying } = useActions(eventUsageLogic)
const { featureFlags } = useValues(featureFlagLogic)

return (
<div>
<h1 className="ingestion-title">Help is on the way!</h1>
<p className="prompt-text">
You can still explore all PostHog has to offer while you wait for your team members to join.
</p>
<p className="prompt-text">You can still explore PostHog while you wait for your team members to join.</p>
<LemonDivider thick dashed className="my-6" />
<div className="flex flex-col mb-6">
<DemoProjectButton
text="Quickly try PostHog with some demo data."
subtext="Explore insights, create dashboards, try out cohorts, and more."
/>
{featureFlags[FEATURE_FLAGS.ONBOARDING_DEMO_EXPERIMENT] === 'test' ? (
<DemoProjectButton
text="Quickly try PostHog with some demo data."
subtext="Explore insights, create dashboards, try out cohorts, and more."
/>
) : null}
<LemonButton
onClick={() => {
completeOnboarding()
Expand Down

0 comments on commit b3c5e2f

Please sign in to comment.