querybook icon indicating copy to clipboard operation
querybook copied to clipboard

fix: long table name fit hover popover size

Open ShuchiZhang opened this issue 3 years ago • 1 comments

We noticed an issue that the hover popover for table cannot fit when the table name is long. Which was like: image

We notice there was a max-width limit and should be removed to make the popover size larger when the table name is long like: image

ShuchiZhang avatar Aug 10 '22 19:08 ShuchiZhang

hey Shuchi, thanks for fixing it! Is it possible to keep the max-width and wrap the text if it is too long?

czgu avatar Aug 11 '22 23:08 czgu

hey Shuchi, thanks for fixing it! Is it possible to keep the max-width and wrap the text if it is too long?

I use the zero width space to wrap the title and it now looks like: image

But with long strings without "_", it might overflow the popover. But these cases won't happen too often.

There's also a css solution to add

.DataTableHoverContent {
    max-width: 400px;
    overflow-wrap: break-word;

    .DataTableTags {
        margin-bottom: 4px;
        margin-left: -2px;
    }
}

It will break up words but will always work like: image

ShuchiZhang avatar Aug 12 '22 18:08 ShuchiZhang

@ShuchiZhang oh i think it is better if we just do a pure css fix instead of using js. I added a PR https://github.com/pinterest/querybook/pull/974

czgu avatar Aug 12 '22 18:08 czgu