Skip to content

fix(ecau): wrap long URLs in logging banners - #531

Merged
ROpdebee merged 1 commit into
mainfrom
ecau-logger-wrap-urls
Jul 28, 2022
Merged

fix(ecau): wrap long URLs in logging banners#531
ROpdebee merged 1 commit into
mainfrom
ecau-logger-wrap-urls

Conversation

@ROpdebee

@ROpdebee ROpdebee commented Jul 28, 2022

Copy link
Copy Markdown
Owner

Discogs URLs tend to overflow the logging banner. Firefox performs sub-optimal line breaking (it breaks in the middle of the URL), but Chrome performs no line breaking at all.

To fix this, we'll insert word-break hints in front of all forward slashes, which should convince the browsers to perform proper line breaking. However, since it's still possible that an enormous URL without forward slashes will appear, we're also setting a CSS property to allow all browsers to do arbitrary word breaking in case it's really necessary.

https://community.metabrainz.org/t/ropdebees-userscripts-support-thread/551947/96?u=ropdebee

I'm borrowing a modified version of insertBetween from #499, so whenever work on that recommences, it should be synced.

Discogs URLs tend to overflow the logging banner. Firefox performs
sub-optimal line breaking (it breaks in the middle of the URL), but
Chrome performs no line breaking at all.

To fix this, we'll insert word-break hints in front of all forward
slashes, which should convince the browsers to perform proper line
breaking. However, since it's still possible that an enormous URL
without forward slashes will appear, we're also setting a CSS
property to allow all browsers to do arbitrary word breaking in case
it's really necessary.
@ROpdebee ROpdebee added bug Something isn't working mb_enhanced_cover_art_uploads labels Jul 28, 2022
@ROpdebee
ROpdebee merged commit 59f14d7 into main Jul 28, 2022
@ROpdebee
ROpdebee deleted the ecau-logger-wrap-urls branch July 28, 2022 13:41
github-actions Bot added a commit that referenced this pull request Jul 28, 2022
fix(ecau): wrap long URLs in logging banners (#531)
@github-actions

Copy link
Copy Markdown

🚀 Released 1 new userscript version(s):

  • mb_enhanced_cover_art_uploads 2022.7.28.3 in c441cb8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant