Skip to content

Conversation

@hwkr
Copy link
Contributor

@hwkr hwkr commented Oct 9, 2025

Makes the dev toolbar config editable (and synced with the toggles). It was hard to get the config to sync with the toggles in a way that made sense but I think this is okay?

CleanShot.2025-10-08.at.20.26.09.mp4

Checklist

I've gone through the following:

  • I've added an explanation why this change is needed.
  • I've added a changeset (pnpm changeset).
  • I've added tests for the regression or new feature.
  • I've updated the documentation.

@changeset-bot
Copy link

changeset-bot bot commented Oct 9, 2025

⚠️ No Changeset found

Latest commit: 20770b4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

Scalar CDN Snapshot Diff Results

failed  3 failed
passed  15 passed

Details

report  Open report ↗︎
stats  18 tests across 1 suite
duration  34.4 seconds
commit  20770b4
info  These tests are non-blocking and will not prevent merging of your PR.

Failed tests

test-snapshots/snapshot.e2e.ts › Diff with CDN - Relative URL Example
test-snapshots/snapshot.e2e.ts › Diff with CDN - Hello World (string)
test-snapshots/snapshot.e2e.ts › Diff with CDN - Circular

Important

These tests detect visual differences between the current PR and the latest CDN build which means they may be affected by other changes in main that haven't been released yet.

They can help determine if the changes in the PR are causing any unexpected visual regressions but may be less helpful in isolating the exact cause. For more details see the readme.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

Scalar Components Snapshot Test Results

passed  152 passed

Details

report  Open report ↗︎
stats  152 tests across 19 suites
duration  46.2 seconds
commit  20770b4

@hwkr hwkr changed the title Brynn/doc 4212 editable config feat(api-reference): editable config in dev toolbar Oct 9, 2025
@hanspagel
Copy link
Member

hanspagel commented Oct 9, 2025

ha, that’s so cool!

@hwkr hwkr force-pushed the brynn/doc-4212-editable-config branch from 6361e6a to bf657d0 Compare October 10, 2025 23:56
@hwkr hwkr marked this pull request as ready for review October 11, 2025 02:19
@hwkr hwkr marked this pull request as draft October 11, 2025 02:19
@hwkr hwkr force-pushed the brynn/doc-4212-editable-config branch from bf657d0 to 20770b4 Compare October 20, 2025 18:10
@blacksmith-sh
Copy link

blacksmith-sh bot commented Oct 20, 2025

✅ All jobs passed

Summary: 4 successful workflows

Last updated: 2025-10-20 18:22:34 UTC

@hwkr hwkr marked this pull request as ready for review October 21, 2025 00:15
Copy link
Member

@hanspagel hanspagel left a comment

Choose a reason for hiding this comment

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

awesome! a few things that I noticed:

can we make it so, that if I hit return, the next lines start with the correct indentation, so I don’t have to hit space 2 times?

we have some strange attributes there by default (slug, title, default), but not the actual document URL, which is probably coming from the recent changes to the configuration. I think it’s a bit confusing.

it shows "esc then tab" but esc already closes the overlay, that’s not how it’s supposed to work, is it?

Image

@hwkr
Copy link
Contributor Author

hwkr commented Oct 21, 2025

@hanspagel

can we make it so, that if I hit return, the next lines start with the correct indentation, so I don’t have to hit space 2 times?

Seems like this is something with codemirror, the client has the same behavior unfortunately. I'd like to switch this to Monaco anyway so maybe we wait and that should fix it?

we have some strange attributes there by default (slug, title, default), but not the actual document URL, which is probably coming from the recent changes to the configuration. I think it’s a bit confusing.

Yeah I tried to clean it up best I could, maybe there's a better source of truth for the generated config?

It shows "esc then tab" but esc already closes the overlay, that’s not how it’s supposed to work, is it?

Good catch, I should probably capture the esc here

@hanspagel
Copy link
Member

Off-topic: I don’t think we can use Monaco in the self-hosted version. It requires some kind of sophisticated web worker setup. And it’s just way bigger than CodeMirror. If we want it - let’s say for the Scalar App - we could make Monaco a plugin for the API Client package.

@geoffgscott
Copy link
Member

Let's put this one on hold for right now. I have some uncertainty about config reactivity and this is low priority for right now.

@hwkr hwkr marked this pull request as draft November 5, 2025 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants