dark
dark copied to clipboard
Allow non-admins to view in-Editor debugger
When working on Dark features, namely when adjusting how Fluid responds to my keyboard input, I keep reaching for the in-Editor Dark debugging experience currently only exposed to 'admins' (right now, that's just Paul). I've been locally getting around this restriction by editing Ui.fs
, setting myself as an admin there.
This PR aims at exposing that functionality to anyone who marks themselves as a 'dark developer'. I'd like to use it in prod, both to diagnose my own Dark canvases, as well as potentially use the feature when diagnosing other users' issues.
Changes made:
- A new "Editor" tab has been added to the settings modal, with a single radio button.
- the
editorSettings
model has been changed - it no longer houses therunTimers
,showHandlerASTs
, andshowFluidDebugger
variables directly, but now rather houses these in aoption<darkDev>
field undereditorSettings
. - the sidebar debugger previously used a lot of vertical space in displaying the environment - now each key/value pair just takes up one line (unless it overflows)
- the
SAVE STATE FOR INTEGRATION TEST
feature no longer worked (since the OCaml->F# port?), so has been disabled (by commenting out relevant code).
This is a draft, but some feedback would be appreciated, @pbiggar.
Does this overall direction seem right to you? Do those TODOs seem right to you?
I'll circle back to this after some input - no rush.
If completed, this will help move #4276 forward.
Ah - I just now saw this line in #4276:
It could be set in settings and stored along with the other options in LocalStorage.
I believe that implies I should move darkDev
to editorSettings
, and all of those settings would then be stored for me 'automatically' in LocalStorage. Great. That seems appropriate enough to me.
Looks like a good idea!
- [x] This seems to break the
rename_db_type
integration test somehow
- [x] This seems to break the
rename_db_type
integration test somehow
This is likely caused by runTimer
sneaking into darkDev
. It's true
by default in the original code - I thought this was a mistake, but seeing now that this was a mistake - it should live within editorSettings
as it was.
I believe that the specific integration test failure (glad it was caught!) was that the analysis refresh timer wasn't running, so the DB (with data) didn't realize it had to "lock" itself, visually.
Up-to-date with latest client changed, tidied, and ready for another review, @pbiggar (our last one was over Zoom)
No worries! Yeah that works for me :+1:
Handled by #4426