Skip to content

fix(masonry): use different selection color for unfocused Prose - #1856

Merged
PoignardAzur merged 1 commit into
linebender:mainfrom
qrilka:prose-unfocused-different-selection-color
Oct 29, 2026
Merged

PoignardAzur merged 1 commit into
linebender:mainfrom
qrilka:prose-unfocused-different-selection-color

Conversation

@qrilka

@qrilka qrilka commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

This was discovered while checking out new tests for #1341
It looks to be a miss in the current Prose code. The code (both
in test and in implementation) mostly follows what already exists
in TextInput. Support for CaretColor property is added as a logical
addition to SelectionColor.
LLM was used as a consultant for this change.

This was discovered while checking out new tests for linebender#1341
It looks to be a miss in the current Prose code. The code (both
in test and in implementation) mostly follows what already exists
in TextInput. Support for CaretColor property is added as a logical
addition to SelectionColor.
LLM was used as a consultant for this change.
@qrilka qrilka mentioned this pull request Oct 22, 2026

@PoignardAzur PoignardAzur left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines +154 to +161
// FIXME - Find more elegant way to propagate property to child.
if property_type == TypeId::of::<CaretColor>() {
ctx.mutate_self_later(|mut input| {
let mut input = input.downcast::<Self>();
let color = *input.get_prop::<CaretColor>();
let mut text_area = Self::text_mut(&mut input);
text_area.insert_prop(color);
});

@PoignardAzur PoignardAzur Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this? That is such incredibly ugly code, I cannot belie- oh, right, we already do this everywhere else.

Jokes aside, we need property inheritance so badly. =(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those FIXMEs looked suspicious to me as well, I suppose #1342 is the main ticket on this topic, right?

@PoignardAzur
PoignardAzur added this pull request to the merge queue Oct 29, 2026
Merged via the queue into linebender:main with commit 40f3ecb Oct 29, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants