Conversation
|
this is badass and clearly the right thing to do imo. My big question: is there anything we can do to trip an alarm if/when the configuration values drift out of date? or even better, would it be possible to always derive them from the source code? (edit: to be clear I am asking this in the abstract, not with any concrete knowledge of how often this happens. Maybe it's not a big deal! just thinking of the case where we have some new config item and it doesn't get added, and how we'd guard against that) |
this actually crossed my mind this morning when I was re-looking at the PR. maintenance is definitely an issue. derive from source code would be SICK... I will dig into that 🙏🏼 |
There was a problem hiding this comment.
I prefer the two column layout because it always spotlights the code, but the description text looks cramped on a laptop
instead of having the code block be fixed or sticky, maybe we try increasing the code block's min-height (or the same height as the entire component) and making the config list be scrollable. that way it doesn't eat up the entire vertical scroll
feel free to go a different direction, it's lookin awesome
config-builder-ui.mp4
|
or maybe you do single column layout but you fix the code block at the top with sticky scroll |
Adds a reusable ConfigBuilder component and JS-specific implementation that generates posthog.init() configuration code interactively. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a650566 to
8686e21
Compare
Deploy preview
|
|
Vale prose linter → found 2 errors, 32 warnings, 1 suggestions in your markdown Full report → Copy the linter results into an LLM to batch-fix issues. Linter being weird? Update the rules!
|
| Line | Severity | Message | Rule |
|---|---|---|---|
| 20:136 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 42:242 | warning | 'pageleave' is a possible misspelling. | PostHogBase.Spelling |
| 48:205 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 48:308 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 50:213 | warning | Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. | PostHogBase.ProductNames |
| 52:233 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 53:270 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 54:448 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 54:500 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 54:565 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 60:263 | warning | 'googlebot' is a possible misspelling. | PostHogBase.Spelling |
| 61:239 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 76:68 | warning | 'autocapture's' is a possible misspelling. | PostHogBase.Spelling |
| 82:187 | warning | 'textarea' is a possible misspelling. | PostHogBase.Spelling |
| 87:16 | warning | 'rageclick' is a possible misspelling. | PostHogBase.Spelling |
| 106:216 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 106:255 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 107:178 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 108:152 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 108:170 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 108:236 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 108:254 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 108:291 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 109:130 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 111:125 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 111:390 | error | Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. | PostHogBase.EnDash |
| 113:118 | warning | 'params' is a possible misspelling. | PostHogBase.Spelling |
| 114:482 | error | Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. | PostHogBase.EnDash |
| 121:244 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 135:125 | warning | 'gzip' is a possible misspelling. | PostHogBase.Spelling |
| 136:7 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 136:50 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 137:63 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
|
aw yeah. wanna try building your use case on top of this branch @willwearing? |
willwearing
left a comment
There was a problem hiding this comment.
I'm not seeing the 'Navigate to' affordance and think it would be useful/look better
Context on Loom here: https://www.loom.com/share/e087fb6db15d4a51a68a258b4789d561
reviving this one from the depths. re: https://posthog.slack.com/archives/C043VJ93L3B/p1772223020503949
adds a configurable code snippet builder
demo on JS Web SDK config page:
CleanShot.2026-02-27.at.16.59.21.mp4