Skip to content
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

Allow disabling quickstart panel grabbing focus #300

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

randomnetcat
Copy link
Contributor

I'm working on an application that provides a UI for people making QuickStart files. As part of this, I'm trying to use QuickStartDrawer to render a preview of the QuickStart. However, if the QuickStart is a QuickStart with tasks, thus opening the side panel, whenever the values in the QuickStart are changed, the panel grabs focus.

For instance, if I have a textbox that allows editing the description of a QuickStart, the user will enter a character into the textbox. That will result in the QuickStart being changed in the QuickStartContext. This will propagate down to QuickStartPanel and trigger this hook and pull focus to the panel, away from the textbox the user was editing.

To allow working around this, I am proposing to allow disabling everything that pulls focus to the panel with a new value in QuickStartContext. This value defaults to the status quo to preserve backwards-compatibility.

Copy link

netlify bot commented Jun 12, 2024

Deploy Preview for quickstarts ready!

Name Link
🔨 Latest commit bf4ea4e
🔍 Latest deploy log https://app.netlify.com/sites/quickstarts/deploys/6669f26b69f1ce000806d7df
😎 Deploy Preview https://deploy-preview-300--quickstarts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nicolethoen nicolethoen merged commit 0fb0809 into patternfly:main Jun 18, 2024
9 of 10 checks passed
@randomnetcat randomnetcat deleted the context-focus branch June 18, 2024 17:03
Copy link

🎉 This PR is included in version 5.4.0-prerelease.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants