Skip to content

Message with a link changes colour when clicked. #103

Description

@scoates

When clicking the non-link part of a message, the text turns dark (or probably different in light mode).

Before:

Image

After clicking "remember:

Image

Activity

  1. glasfisch3000 commented on Jul 23, 2026

    @glasfisch3000
    Contributor

    This is caused by NSTextField resetting certain styling options, like text color, to their default values during text selection. Just clicking on a message counts as selection too.
    I have no idea why NSTextField does that. It seems to be a common problem, although I haven't found any good fixes yet.
    An option would be to use SwiftUI's Text instead, see #112.

  2. viktorstrate commented on Jul 23, 2026

    @viktorstrate
    Owner

    NSTextField uses an optimization pattern where for static content it uses a very lightweight and performant text renderer, but as soon as you interact with it, it will swap it out with an NSTextView under the hood, which has way more features such as highlighting text.

    The reason why I want to keep NSTextField if possible is because it is way more performant, especially if many text fields are drawn, which is the case with the timeline.

    The reason why the timeline was rewritten using AppKit was because SwiftUI was way too slow and the timeline was jumping alot when updating.

  3. glasfisch3000 commented on Jul 24, 2026

    @glasfisch3000
    Contributor

    Understandable. However I tried around a little and I don't see a way to make the text coloring work with NSTextField. Maybe someone else will find a fix 🤷‍♂️

  4. viktorstrate commented on Sep 28, 2026

    @viktorstrate
    Owner

    The new timeline #118 replaces this with NSTextView which should solve the issue

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions