Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement proper Markdown link styling #455

Merged
merged 1 commit into from
Jul 18, 2024
Merged

Implement proper Markdown link styling #455

merged 1 commit into from
Jul 18, 2024

Conversation

rock3r
Copy link
Collaborator

@rock3r rock3r commented Jul 18, 2024

We weren't using the TextLinkStyles provided by the LinkAnnotation API, and as a result, our links weren't stateful. We were also not properly setting a disabled colour — now we do.

Also changed, we force the Markdown text to not be focusable, even if it is clickable, since we don't want it to get focused. Now only links are focused while tabbing through Markdown.

This also removes some testing harness left around from #425, and that we don't need anymore.

Note: links should have a border around them when they are focused, but that's not possible with the Compose APIs. What we do instead is show a subtle background color, taken from the ActionButtons' hover and pressed states, for our focused and pressed states, respectively.

Demo

@rock3r rock3r added consistency Our UI presentation is not consistent with IJ api Changes related to the public API labels Jul 18, 2024
@rock3r rock3r requested a review from hamen July 18, 2024 08:43
@rock3r rock3r self-assigned this Jul 18, 2024
We weren't using the TextLinkStyles provided by the LinkAnnotation API,
and as a result, our links weren't stateful. We were also not properly
setting a disabled colour — now we do.

Also changed, we force the Markdown text to not be focusable, even if it
is clickable, since we don't want it to get focused. Now only links are
focused while tabbing through Markdown.

This also removes some testing harness left around from #425, and that
we don't need anymore.

Note: links should have a border around them when they are focused, but
that's not possible with the Compose APIs. What we do instead is show
a subtle background color,
taken from the ActionButtons' hover and pressed states, for our focused
and pressed states, respectively.
@rock3r rock3r enabled auto-merge (squash) July 18, 2024 08:47
@rock3r rock3r merged commit 00f8c60 into main Jul 18, 2024
4 checks passed
@rock3r rock3r deleted the md-link-styles branch July 18, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Changes related to the public API consistency Our UI presentation is not consistent with IJ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants