Fix lengthy URLs in tooltips
ClosedPublic

Authored by krutovmikhail on Mar 23 2019, 12:40 AM.

Details

Summary

BUG: 389963

Test Plan

To reproduce the issue (https://bugs.kde.org/show_bug.cgi?id=389963):

xattr -w user.xdg.origin.url "VeryLongUrlWithoutSpaces" file.name

Diff Detail

Repository
R824 Baloo Widgets
Branch
mkrutov/20190323/fix/dolphin/tooltip_sizes
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10002
Build 10020: arc lint + arc unit
krutovmikhail created this revision.Mar 23 2019, 12:40 AM
Restricted Application added a project: Baloo. · View Herald TranscriptMar 23 2019, 12:40 AM
Restricted Application added a subscriber: Baloo. · View Herald Transcript
krutovmikhail requested review of this revision.Mar 23 2019, 12:40 AM
krutovmikhail added a comment.EditedMar 23 2019, 12:43 AM

To reproduce the issue (https://bugs.kde.org/show_bug.cgi?id=389963):

xattr -w user.xdg.origin.url "VeryLongUrlWithoutSpaces" file.name

This is a dirty fix; not sure what would be considered a proper one for the issue.

a) Only display hostname in label? (but then downloaded from xattr might be something that is not URL)

b) Split label into several strings (\n every X characters)? (but that would make it quite unreadable)

You probably want to be using KStringHandler::rsqueeze (or in case of URLs I think we prefer eliding in the middle, ie. csqueeze)

  • Use KStringHandler per suggestion in phabricator

broulik, this makes sense. Updated, thank you for your input :)

elvisangelaccio added inline comments.
src/widgetfactory.cpp
131–132

Please put the 80 constant in a variable.

Please add spaces before/after the > operator.

  • Update per comments on phabricator
krutovmikhail marked an inline comment as done.Mar 24 2019, 11:53 AM

Thanks for input, done

src/widgetfactory.cpp
107

Space before/after = also here ;)

  • BUG: 389963 Limiting length of URLs in tooltips
ngraham accepted this revision.Mar 24 2019, 4:42 PM
ngraham edited the summary of this revision. (Show Details)
ngraham edited the test plan for this revision. (Show Details)
ngraham added a subscriber: ngraham.

Makes sense to me and works as expected. Can you provide your full name and email address?

This revision is now accepted and ready to land.Mar 24 2019, 4:43 PM

Nathaniel, I've tried to reach to you on IRC to clarify this question, but there was no answer :)

I have my name and email both in git commits (Mikhail Krutov | mikhail.krutov on seznam.cz); and I have my old email with proper name here on Phabricator. However, I can't update my email on Phabricator for some reason; while my KDE Identity has both my old email (secondary) and new email (primary).

What do I do to make this information properly available for all future work I'll be commiting here?

Nathaniel, I've tried to reach to you on IRC to clarify this question, but there was no answer :)

Sorry, I'm not on right now. I'm digging out from under a mountain of emails and review requests and fewer distractions are the only way to keep my sanity. :)

I have my name and email both in git commits (Mikhail Krutov | mikhail.krutov on seznam.cz); and I have my old email with proper name here on Phabricator. However, I can't update my email on Phabricator for some reason; while my KDE Identity has both my old email (secondary) and new email (primary).

File a sysadmin ticket (click on the star at the top of the page). They can help you out.

What do I do to make this information properly available for all future work I'll be commiting here?

My mistake, you're all good. I'll land the patch now.

This revision was automatically updated to reflect the committed changes.