-
Notifications
You must be signed in to change notification settings - Fork 200
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: monaco editor for console #2040
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2040 +/- ##
=======================================
Coverage 70.41% 70.41%
=======================================
Files 70 70
Lines 6820 6820
=======================================
Hits 4802 4802
Misses 1741 1741
Partials 277 277 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…to mp/monaco-redo * 'mp/monaco-redo' of https://github.com/flipt-io/flipt: chore: fix nightly build; add footer to release notes on GH (#2041) chore: bump changelog for 1.25.2 fix(internal/ext): add 1.1 to versions and validate explicit 1.2 (#2042) chore: update go mod fix(internal/ext): add 1.1 to versions and validate explicit 1.2 (#2042) chore(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 (#2037) chore(deps-dev): bump postcss from 8.4.27 to 8.4.28 in /ui (#2028) chore: change parameter name of PKCE feat(oidc): Add parameters for pkce flow
@@ -0,0 +1,21 @@ | |||
// @ts-ignore | |||
self.MonacoEnvironment = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these workers still dont actually work.. im going to create an issue once this is merged to see if anyone with more knowledge of react/vite/monaco/web workers can help
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably tried all these things, but thought I would link just incase:
https://github.com/microsoft/monaco-editor/blob/main/docs/integrate-esm.md#using-vite
vitejs/vite#1791 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yah i did, i think those docs are from an older version of vite, like 2.0 and they don't seem to work for the later version we are using , 4.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
} | ||
|
||
export default function Console() { | ||
const [flags, setFlags] = useState<FilterableFlag[]>([]); | ||
const [selectedFlag, setSelectedFlag] = useState<FilterableFlag | null>(null); | ||
const [context, setContext] = useState<string | null>(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context
seems a bit overloaded with React.Context
etc. You can take it or leave it but wonder if we should name this:
const [context, setContext] = useState<string | null>(null); | |
const [evaluationContext, setEvaluationContext] = useState<string | null>(null); |
Fixes: FLI-390
Adds https://github.com/microsoft/monaco-editor for request console so we can get proper JSON formatting support
Reset
button because im not sure how useful it is, it actually was kind of annoying that it cleared the flagKey selected IMO, as you most likely want to keep the same flagKey but play with theentityID
and or `context.entityID
field to regen/get a new entityID only