Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(flags): Add C# language examples for feature flags #28702

Merged
merged 9 commits into from
Feb 14, 2025

Conversation

haacked
Copy link
Contributor

@haacked haacked commented Feb 14, 2025

Problem

Adds C# as a language in the "How to implement" section when looking at the details for a feature flag.

Screenshot 2025-02-13 at 4 55 42 PM

Changes

Some examples.

Screenshot 2025-02-13 at 5 07 06 PM
Screenshot 2025-02-13 at 5 06 16 PM
Screenshot 2025-02-13 at 5 06 29 PM
Screenshot 2025-02-13 at 5 06 37 PM
Screenshot 2025-02-13 at 5 06 56 PM

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

Yes.

How did you test this code?

Manually tested.

@haacked haacked requested a review from a team February 14, 2025 01:08
@haacked
Copy link
Contributor Author

haacked commented Feb 14, 2025

Note that this doesn't include the recently shipped remote config setting code. I'll get to that soon.

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 C# language support for feature flags in PostHog, including code snippets, documentation links, and UI elements for the .NET SDK.

  • Added CSharpSnippet component in /frontend/src/scenes/feature-flags/FeatureFlagSnippets.tsx with async/await patterns and C# naming conventions
  • Added DOTNET SDK key to SDKKey enum in /frontend/src/types.ts and included in local evaluation/payload libraries lists
  • Added IconCSharp component in /frontend/src/lib/lemon-ui/icons/icons.tsx for C# language representation
  • Added C# language support to CodeSnippet component with Prism syntax highlighting integration
  • Added C# implementation examples with proper documentation links in FeatureFlagCodeOptions.tsx

5 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

github-actions bot commented Feb 14, 2025

Size Change: +5 B (0%)

Total Size: 1.21 MB

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

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

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

nice work nice work!

@haacked haacked enabled auto-merge (squash) February 14, 2025 02:57
@haacked haacked disabled auto-merge February 14, 2025 03:29
@haacked
Copy link
Contributor Author

haacked commented Feb 14, 2025

I need #28705 to land before I can merge this.

@haacked haacked enabled auto-merge (squash) February 14, 2025 19:18
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@haacked haacked merged commit 7a88dbd into master Feb 14, 2025
104 checks passed
@haacked haacked deleted the haacked/add-dotnet-examples branch February 14, 2025 20:04
HamedMP pushed a commit that referenced this pull request Feb 19, 2025
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants