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

Restored columnType visibility #290

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions frontend/.changeset/twenty-eggs-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@liam-hq/erd-core": patch
"@liam-hq/cli": patch
---

Restored columnType visibility.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
transition: opacity 300ms var(--default-timing-function);
}

.wrapper:hover .columnType {
Copy link
Member

Choose a reason for hiding this comment

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

Let me know why this is not working ?👀

Copy link
Member Author

@FunamaYukina FunamaYukina Dec 17, 2024

Choose a reason for hiding this comment

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

I didn't know about that either, but I've just been informed(Mr. Miyagi told me).
You're attempting to access a class named "columnType" from TableNode,

TableNode.module.css

.wrapper:hover .columnType {
  opacity: 1;
}

but the real class name is obfuscated. (it is not columnType)

ss 2513

As a result, you couldn't reference the class from another file. I've resolved this by utilizing the data attribute and global:.

ref: 296fdaa

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for explaining.
data-* attributes can be used in that situation, I see 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes😆 This time, we were able to fix the issue by only modifying the CSS.

:global([data-erd='table-node']):hover .columnType {
opacity: 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const TableNode: FC<Props> = ({ data }) => {
isActive && styles.wrapperActive,
)}
onClick={handleClick}
data-erd="table-node"
>
<TableHeader data={data} />
{showMode === 'ALL_FIELDS' && <TableColumnList data={data} />}
Expand Down
Loading