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

Add comment to column tooltip if exists #1745

Merged
merged 2 commits into from Nov 22, 2023

Conversation

p-Jimenez
Copy link
Contributor

If the column has a comment, display it on the tooltip

image

@@ -614,6 +614,11 @@ export default Vue.extend({
headerTooltip += ' [Primary Key]'
}

// if column has a comment, add it to the tooltip
if (column.comment) {
headerTooltip += `<br/> ${column.comment}`
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be made HTML safe, but otherwise, love this! So:

headerTooltip += `<br/> ${escapeHtml(column.comment)}`

Once you've made that change I will merge!

@p-Jimenez
Copy link
Contributor Author

p-Jimenez commented Nov 17, 2023

Pushed already! Haven't thought about sanitizing HTML.

image

Also tried it with large comments, don't know if it should be truncated but I've actually found it way less intrussive than I thought it would be.

image

@rathboma rathboma merged commit 8491b14 into beekeeper-studio:master Nov 22, 2023
@rathboma
Copy link
Collaborator

Amazing, thanks!

@p-Jimenez p-Jimenez deleted the show-table-comments branch November 23, 2023 11:39
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.

None yet

2 participants