Skip to content

Implement fluent examples panel #2

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

Open
wants to merge 2 commits into
base: playground
Choose a base branch
from

Conversation

patrickw14
Copy link

@patrickw14 patrickw14 commented Apr 12, 2025

image

Pulled a smattering of examples from here: https://github.com/ServiceNow/sdk-examples

(disclaimer - I did not test the examples I found at the sdk-examples repo, I'm just assuming they're correct)

250
const debouncedHandleChange = useDebounceCallback(
handleChange,
400
Copy link
Author

@patrickw14 patrickw14 Apr 12, 2025

Choose a reason for hiding this comment

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

Bumped the debounce timer up a bit - felt a little too fast to me before, made the code editor feel less responsive when React re-renders.

async (value: string | undefined) => {
console.info("handleChange", value);
if (!value) return;
const handleChange = async (value: string | undefined) => {
Copy link
Author

Choose a reason for hiding this comment

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

Non-debounced variant of the function to make code sample selection update instantly

@patrickw14 patrickw14 marked this pull request as draft April 12, 2025 19:47
@patrickw14 patrickw14 marked this pull request as ready for review April 14, 2025 00:53
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.

1 participant