Skip to content

Integrate posthog in frontend#335

Merged
joanagmaia merged 4 commits intomainfrom
feature/integrate-posthog-frontend
Dec 13, 2022
Merged

Integrate posthog in frontend#335
joanagmaia merged 4 commits intomainfrom
feature/integrate-posthog-frontend

Conversation

@joanagmaia
Copy link
Copy Markdown
Contributor

@joanagmaia joanagmaia commented Dec 9, 2022

Changes proposed ✍️

  • Add posthog-js lib to frontend and initialize it with API key
  • Created a method to check if feature flag value is enabled
  • Updated configs to check community and premium versions
  • Added feature flag validation for:
    • Organizations page -> if not show restricted access page
    • Eagle eye page -> if not show restricted access page
    • Community Help Center page -> if not show free badge, disable custom domain url and add a CTA that leads to show restricted access page
    • Automations page -> if not, when clicked on Add automation, show restricted access page

NOTE: Cannot be merged before #318

Checklist ✅

  • Label appropriately with Feature, Enhancement, or Bug.
  • Tests are passing.
  • New backend functionality has been unit-tested.
  • Environment variables have been updated:
    • Local frontend configuration: frontend/.env.dist.local, frontend/.env.dist.composed.
    • Local backend: backend/.env.dist.local, backend/.env.dist.composed.
    • Configuration docs have been updated.
    • Team members only: update environment variables in override, staging and production env. files and trigger update config script.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.
  • All changes have been tested in a staging site.
  • All changes are working locally running crowd.dev's Docker local environment.

@joanagmaia joanagmaia added the Feature Created by Linear-GitHub Sync label Dec 9, 2022
@joanagmaia joanagmaia requested a review from mariobalca December 9, 2022 09:47
@joanagmaia joanagmaia self-assigned this Dec 9, 2022
@joanagmaia joanagmaia removed the request for review from mariobalca December 9, 2022 19:27
@joanagmaia joanagmaia force-pushed the feature/integrate-posthog-frontend branch from 9b87a61 to 79c8d71 Compare December 9, 2022 19:52
Copy link
Copy Markdown
Contributor

@mariobalca mariobalca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job here @joanagmaia 🙌
Left a minor comment, but shouldn't be a blocker.
Will try to QA this a bit in local/staging, during the afternoon 👍

get currentTenantPlan() {
if (!this.currentTenant) {
return plans.free
return plans.essential
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these the only changes we need to include related to plans?
We also have the plans.js file, which we should also update I think

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I forgot to mention but both permissions and plans file were updated in Anil's PR https://github.com/CrowdDotDev/crowd.dev/pull/318/files#diff-0e09062fc2c86ce9490bfbd2117e20613eb73e9cb7e7c7232a879213e76696d6

This one cannot be deployed without that PR. Given that this branch does not include backend changes, to test it locally you will either need to test it in staging branch or run with the backend from the feature/tenant-plans-and-feature-flagging branch

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see! Thanks for clearing that out, makes sense!

@joanagmaia joanagmaia merged commit b97622a into main Dec 13, 2022
@joanagmaia joanagmaia deleted the feature/integrate-posthog-frontend branch December 13, 2022 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Created by Linear-GitHub Sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants