Skip to content

feat(custom-columns): add guard popup for custom columns#30256

Closed
HamedMP wants to merge 1 commit intomasterfrom
hamed-add-guard-customize-columns
Closed

feat(custom-columns): add guard popup for custom columns#30256
HamedMP wants to merge 1 commit intomasterfrom
hamed-add-guard-customize-columns

Conversation

@HamedMP
Copy link
Contributor

@HamedMP HamedMP commented Mar 20, 2025

Problem

the column customization is ee only feature, causing this for non-ee (self-hosted) users.
image

Changes

add a popup guard similar to color customization (but currently doesn't work for my local customer)

how it will look in future (for color one as example):
image

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

How did you test this code?

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added guard popup functionality for column customization as an Enterprise Edition feature, restricting access for non-EE users with an upgrade modal.

  • Added CUSTOMIZE_COLUMNS to AvailableFeature enum in types.ts to mark feature as enterprise-only
  • Integrated upgradeModalLogic and guardAvailableFeature in ColumnConfigurator.tsx to handle access control
  • Added restriction check when saving custom columns as default with toggleSaveAsDefault
  • Implemented similar UX pattern as existing color customization feature for consistency

2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

bordered
checked={saveAsDefault}
onChange={toggleSaveAsDefault}
onChange={() => guardAvailableFeature(AvailableFeature.CUSTOMIZE_COLUMNS, toggleSaveAsDefault)}
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: The guard is only applied to saving default columns, but not to the initial column customization. Consider guarding the showModal action as well.

@github-actions
Copy link
Contributor

Size Change: +10 B (0%)

Total Size: 9.75 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 9.75 MB +10 B (0%)

compressed-size-action

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week. If you want to permanentely keep it open, use the waiting label.

@posthog-bot
Copy link
Contributor

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

@posthog-bot posthog-bot closed this Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants