File tree 3 files changed +9
-8
lines changed
3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,6 @@ function Playground() {
82
82
history . pushState ( null , "" , currentUrl . toString ( ) ) ;
83
83
posthog . capture ( "overlay.speakeasy.com:share" , {
84
84
openapi : JSON . parse ( info ) ,
85
- currentUrl : currentUrl . toString ( ) ,
86
85
} ) ;
87
86
} else {
88
87
setError ( "Failed to create share URL" ) ;
@@ -115,12 +114,8 @@ function Playground() {
115
114
116
115
const changed = await ApplyOverlay ( original , result , false ) ;
117
116
const info = await GetInfo ( original , false ) ;
118
- const bestURL = new URL ( window . location . href ) ;
119
- bestURL . searchParams . set ( "s" , hash ) ;
120
- bestURL . hash = "" ;
121
117
posthog . capture ( "overlay.speakeasy.com:load-shared" , {
122
118
openapi : JSON . parse ( info ) ,
123
- currentUrl : bestURL . toString ( ) ,
124
119
} ) ;
125
120
126
121
setChanged ( changed ) ;
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ export function Editor(props: EditorComponentProps) {
67
67
( ) => ( {
68
68
readOnly : props . readonly ,
69
69
minimap : { enabled : false } ,
70
+ automaticLayout : true ,
70
71
} ) ,
71
72
[ props . readonly ] ,
72
73
) ;
Original file line number Diff line number Diff line change @@ -7,12 +7,17 @@ import posthog from "posthog-js";
7
7
if ( process . env . PUBLIC_POSTHOG_API_KEY ) {
8
8
posthog . init ( process . env . PUBLIC_POSTHOG_API_KEY , {
9
9
api_host : "https://metrics.speakeasy.com" ,
10
- person_profiles : "identified_only" ,
11
10
disable_session_recording : true ,
12
11
autocapture : false ,
12
+ before_send : function ( event ) {
13
+ if ( event ?. properties ?. $current_url ) {
14
+ const url = new URL ( event . properties . $current_url ) ;
15
+ url . hash = "" ;
16
+ event . properties . $current_url = url . toString ( ) ;
17
+ }
18
+ return event ;
19
+ } ,
13
20
} ) ;
14
-
15
- posthog . capture ( "$pageview" ) ;
16
21
}
17
22
18
23
ReactDOM . createRoot ( document . getElementById ( "root" ) ! ) . render (
You can’t perform that action at this time.
0 commit comments