element-hq / element-hq/element-ios

Links don't get faded out when selecting a message in the same cell.

Open
#4,996 0 comments 0 reactions 0 assignees View on GitHub
A-Timeline T-Defect
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

Splitting this out of #4992:

Due to the use of `UITextView`'s `linkTextAttributes` style, when we set the colour of other messages to have an opacity of 0.2, URLs get set back to the default colour before rendering. This can be disabled by removing the link attributes on the text view, however we must then do all link detection ourselves, and style the links accordingly.

In the following screenshot, only the first link should be highlighted:
![IMG_0198](https://user-images.githubusercontent.com/6060466/137101360-495def18-ab6d-44ce-8747-567fd3128bdd.PNG)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the message cell's UITextView styling when another message is selected, focusing on linkTextAttributes and the opacity change described in the issue. Compare the screenshot's intended state with the current rendering; done means links in unselected messages retain the faded colour while the selected message's link remains highlighted, with link detection and styling handled consistently if the attributes are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.