Increase the amount of text shown in Note preview column

On Gramps 5.2.2 where would I find in the source code to increase the length of the text shown in the Note preview column?

For the view, you will find the code in gramps/gui/views/treemodels/ For the editor tabs, look in gramps/gui/editors/displaytabs/

1 Like

Thanks, I didn’t think to look in the notemodels.

Does it make sense to add an extended preview string to the Tooltips for rows of the Preview column?

For reference:

The Latitude & Longitude tooltips in the Place Editor are quite verbose. But they are for a GUI element, not a chunk of data.

I was wanting to get a longer string for preview because I extract info from sites and the name of the databases can be quit long and the persons name is cut off from the preview.

It would help for the SuperTool Scripts saved as Notes too. The format for export means that the Note Preview strings are almost idendical for all scripts.

As shown in @emyoulation’s first screen shot, the Notes gramplet shows the entire text, and there you can select text to copy.

By increasing the length of the preview string, I can see enough of the string to find what I’m looking for. With the gramplet, I have to actually click on a note to see it at the bottom of the screen.

I am curious, any reason why the preview length inst longer by standard?
If column gets too small to show it all, it just doesn’t show it anyway.
I am just curious.

(I want to add that I love having the notes gramplet, especially in notes view)

I have ultra wide monitors on my computer so space isn’t a problem. I increased the length of the preview as I extract text from ancestry and family search and with some of the database titles are so long, I ran past the 80 character length so I just see the database title and not who it’s for. This way I can scroll down the screen scanning for the person I’m looking for without have to go line by line using the note gramplet.

I think this is because the size of all gramps windows must be contained in a size 800*600 which is still the case.
it is a developing constraint.

Did the preview column not let you make it it smaller than that at some point in the past?
Because as it is now, you can just make the column narrower and the text automatically get shorter to compensate. I doubt the maximum length of the preview affect that?

I personally don’t mind the max length as much as OP does, but I am curious and ask questions :slight_smile:

This does not change the fact that the maximum visible text would still be 80 characters.

Notes are truncated to 80 into the following files:

We always have something like that:

    # if the note is too long, truncate it
    if len(text) > 80:
        text = text[:80] + "..."
1 Like

I’m not sure why we don’t make the preview longer and let the UI widget truncate the text. With only 5 files to change it would be a quick fix.

I have very long notes. My longest note is 78,500 characters.
We can sort on this text in the note view.
Maybe this could be a new preference?