Skip to content

Docs - LiveCode in table cell - block interaction #3610

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

Merged
merged 6 commits into from
Mar 16, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docuilib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uilib-docs",
"version": "3.7.0",
"version": "3.8.0",
"main": "./src/index.ts",
"scripts": {
"docusaurus": "docusaurus",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
align-items: center;
right: 0px;
top: 0px;
z-index: 100;
}

.componentExample {
Expand Down
3 changes: 3 additions & 0 deletions docuilib/src/components/pageComponents/ContentItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ const ComponentItem = (props: ComponentItemProps) => {

const content = showCode ? codePreview : componentPreview;

const interactionBlocker = <div style={{position: 'absolute', top: 0, left: 0, height: '100%', width: '100%'}}/>;

return (
<div className={`${styles.componentItemContainer} ${!showCode ? styles.componentSpotlightStyle : ''}`}>
{content}
{interactionBlocker}
Copy link
Collaborator

@nitzanyiz nitzanyiz Mar 13, 2025

Choose a reason for hiding this comment

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

Because this div is over the content, when the content is the codePreview, the user can't select the code or copy it. It blocks the interactions with it. Perhaps we can just wrap the componentPreview with a div that has pointerEvents: none. Wdyt?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried that but it didn't work, now it is so probably didn't implemented well. Anyways, changed.
Good catch!

{showCodeButton && (
<button onClick={toggleCode} className={styles.showCodeButton}>
<CodeIcon/>
Expand Down