Closed Bug 458259 Opened 17 years ago Closed 1 year ago

[10.5] Inline Cocoa tooltips don't wrap in the Bookmark Manager (need to suppress Cocoa's expansion frames)

Categories

(Camino Graveyard :: Bookmarks, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: alqahira, Unassigned)

References

Details

(Keywords: good-first-bug, polish)

We have our own tooltips for long titles and URLs in the Bookmarks Manager. On 10.5, we've magically picked up Cocoa's own inline tooltips, which 90% of the time seem to override ours (I can still see ours if I get the timing just right). On the one hand, this is good; it'll be less code to maintain once we drop 10.4 support. On the other hand, though, the "Cocoa's own" tooltips are clearly inferior, as they don't wrap, not even just not to a reasonable width like ours do, but at all. If you have a long URL, say of a bookmarklet, you have a single-line screen-width tooltip that's truncated and doesn't display the whole URL. (Even if you have a huge screen, screen-width's not exactly readable.) If we can't make the "Cocoa's own" tooltips wrap reasonably, I think we should disable them and continue to use our own working code.
I should add we also get this behavior in History on 10.5, where we previously had no tooltips (bug 370977).
No arguments from me, especially in the bookmarklets case. Full-width tooltips are a little bit ridiculous.
Hardware: Macintosh → All
http://hsoiblog.wordpress.com/2010/03/26/is-your-nstableview-showing-2-tooltips/ explains how to suppress the new "tooltips"; I don't quite understand how to do all the magic, but anyone who actually knows some Cocoa should be able to do it. Given what that entry says about the "expansion frames", I think we want to just suppress them entirely rather than try to subclass them and make them wrap.
Summary: [10.5] Inline Cocoa tooltips don't wrap in the Bookmark Manager → [10.5] Inline Cocoa tooltips don't wrap in the Bookmark Manager (need to suppress Cocoa's expansion frames)
Whiteboard: [good first bug]
Doing what's suggested by the post in comment 3 to ImageAndTextCell (which is a subclass of NSTextFieldCell) fixes this for the Title field (and also fixes bug 550821), but doesn't fix it for any other fields because our Title field is the only one that uses ImageAndTextCell. Subclassing NSTextFieldCell to override this behaviour is going to be the way to fix it, but I'm wondering if it's better to add another file for the sole purpose of fixing this, or to just put the subclass inside BookmarkViewController. Adding a separate file and subclass for this would allow us to override the Cocoa tooltips on History mentioned in comment 1, which are inferior to our theoretical "own" tooltips (which don't exist yet because we haven't fixed bug 370977) for all the reasons outlined in comment 0. It would also allow us to make ImageAndTextCell a subclass of our new subclass, which would save some code duplication. Alternatively, if we think the Cocoa tooltips on History are Good Enough™, then maybe we don't want to bother with a separate file.
Blocks: 550821
(In reply to comment #4) > Alternatively, if we think the Cocoa tooltips on History are Good Enough™ I think they're inferior for all the reasons mentioned in comment 0, and we should fix bug 370977.
We should see if we can make them do what we want before we disable them; there's related discussion here: http://www.cocoabuilder.com/archive/cocoa/280351-10-6-clips-tooltip-if-you-return-nstextfieldcell-in-datacellforrow.html
Keywords: good-first-bug
Whiteboard: [good first bug]
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.