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

Long URLs in SOUR PUBL Causes Layout Issues in the Source List #4973

Open
samiona2 opened this issue Mar 28, 2024 · 5 comments
Open

Long URLs in SOUR PUBL Causes Layout Issues in the Source List #4973

samiona2 opened this issue Mar 28, 2024 · 5 comments

Comments

@samiona2
Copy link

The PUBL of a SOUR can have very long URLs (with parameters). When the URL is very long, the Source List will render the Publication very wide without scrollbars. This makes some of the data not visible over the margin that can't be scrolled. I was able to address the issue by removing empty parameters that were not needed, but this can be an issue if all of the data in the URL is needed.

@FrankWarius
Copy link

I have changed app/Factories/MarkdownFactory.php in my installation and now render links so that they end after the URL and parameters are not shown.

e.g. https://www.ancestry.de/sharing/2712362?mark=c78a30b6caca40410f94da380cdb9012f6383830a08b9bdae5a1fe2fe93d3cfa is displayed as https://www.ancestry.de/sharing/2712362

see FrankWarius@53ee506 (I know this does not comply with the code guidelines)

@kiwi3685
Copy link
Contributor

When I add the above URL to the PUBL of a SOUR, then look at the Source List, I see that the URL as wrapped to fit whatever space is available. So no scrollbars or code changes seem to be necessary. See attached image.

I tested this on the webtrees Demo - Current release, in all the standard themes. Are you perhaps using a different theme to the standard set, or have modified one?

Or, is it a unique to one browser?

Whatever the issue, it is only a display issue. So if necessary that can be fixed just with css (using the "CSS/JS" module already in the Control panel). Something like:

<td.d-md-table-cell {
max-width: 30px;
}
span.ut a {
max-width: 95%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
}
Screenshot 2024-03-29 at 2 11 56 PM

@samiona2
Copy link
Author

samiona2 commented Apr 1, 2024

I am using the standard webtrees theme. It does not wrap long URLs. My assumption is that it should either wrap, or truncate it with an ellipses and show the full one on a hover.

@kiwi3685
Copy link
Contributor

kiwi3685 commented Apr 1, 2024

The image I attached is from the webtrees.net demo site ("current release"). It shows that the url does wrap.

Can you provide an image of the problem from your system?

@Norwegian-Sardines
Copy link

A couple of points:

  1. I agree with kiwi3685, in the demo system the URL does wrap. Therefore no webtrees code change is necessary. Disable all add-ins and test again.
  2. I think you are using the PUBL tag incorrectly.

a) The PUBL tag contains text information about the Publication. GEDCOM says:

For published works, this includes information such as the city of publication, name of the publisher, and year of publication.
For an unpublished work, it includes the date the record was created and the place where it was created. For example, the county and state of residence of a person making a declaration for a pension or the city and state of residence of the writer of a letter.

b) Ancestry is not the Publisher of most (if not all) information on its website, they are the "Repository" of the information published by other individuals and/or entities. If I was to include the URL of the location I found information, the link would be stored in the Source_Record.REPO.CALN tag. In webtrees this location will actually provide a hyperlink to the URL page.

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

No branches or pull requests

4 participants