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

[#185004673] Focus plugin when clicked anywhere in the component #22

Merged
merged 3 commits into from
Sep 28, 2023

Conversation

eireland
Copy link
Contributor

@eireland eireland commented Sep 27, 2023

Adds ability to bring component forward when clicked anywhere in the component.
The script that does the focusing is in useCodapState and connect.js. Then rest of the files are just passing in the onClick handler

@eireland eireland marked this pull request as draft September 27, 2023 22:50
@eireland eireland marked this pull request as ready for review September 27, 2023 23:18
Copy link
Member

@dougmartin dougmartin left a comment

Choose a reason for hiding this comment

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

Looks good 👍 I would try removing the inner onClick handlers to see if the single app level click handler that wraps those views would catch the event.

@@ -44,7 +45,7 @@ export const Hierarchy = (props: IProps) => {
};

return (
<>
<div className={css.hierarchyWrapper} onClick={handleShowComponent}>
Copy link
Member

Choose a reason for hiding this comment

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

Do we need these inner onClick handlers here and on the table view since you also added it to the outer app?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no outer app. The select view, heirarchy view, and the nested table view replace each other as the app so I had to add the onClick handler to each of the views.

@eireland eireland merged commit 44a47c5 into main Sep 28, 2023
5 checks passed
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.

2 participants