Skip to content

Fix to comments visualization in tables and fields popovers #33

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 3 commits into from
Apr 14, 2024

Conversation

santilapi13
Copy link
Contributor

I saw issue #26 and I didn't catch what it was refering to (maybe some about bringing comments from SQL code?), but I found out a few bugs in comments display while you hover the mouse over tables and tables' fields.

  • If a word in a table comment (in the SidePanel) was too long, it would get out of the popover. I fixed it by adding wordBreak:"break-word" to the Popover's style property.
  • While hovering a field in any table, it would display all its properties except for its comment, so I added it below "Default" section, adding the word-breaking fix too.

This is not a big deal but it would be my first contribution ever, so I hope it helps.

Copy link

vercel bot commented Apr 11, 2024

@santilapi13 is attempting to deploy a commit to the dottle's projects Team on Vercel.

A member of the Team first needs to authorize it.

@1ilit
Copy link
Member

1ilit commented Apr 12, 2024

Hello! Thank for the contribution.

I can't reproduce the overflow bug
image

</div>
}
position="right"
showArrow
style={{ width: "200px", wordBreak: "break-word" }}
Copy link
Member

Choose a reason for hiding this comment

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

This breaks the UI.

image

Consider removing the width size and adding a 'max-w-[{width}px]' to the comment rather than the whole popover

<p>
<strong>Comment:</strong>{" "}
{e.comment === "" ? (
"Not comment"
Copy link
Member

Choose a reason for hiding this comment

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

Replace "Not comment" with "No comment"

@santilapi13
Copy link
Contributor Author

santilapi13 commented Apr 12, 2024

I've just committed suggested changes, but I don't know how to make the pull request again, nor if I have to do it 😅

The "overflow bug" happened with long but non-existent words, for example "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".:
image

Breaking words solves this problem:
image

As you said, I changed the comment div style instead of the Popover style. I gave it a max width so that it grows to a certain point, but it also keeps small if there are only a few words. Now, the UI doesn't break any more. Finally, I also changed "Not comment" to "No comment". Here you have some pictures.

Field1

Field2

Field3

Copy link

vercel bot commented Apr 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drawdb ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2024 6:57am

Copy link
Member

@1ilit 1ilit 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! Thank you

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