MacDownApp / MacDownApp/macdown
Polish: Reduce font style jitter, seen when typing
- Dominant language
- Rich Text Format
- Stars
- 9.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
(Feature/polish suggestion, not a bug)
As you type in the editor pane of Macdown, it seems to follow behind slightly, changing each letter to the correct "style" milliseconds later.
When you type in a `# heading` or in a `**bold section**`, however, there is a "jitter" that is noticeable and a little distracting.
The effect *feels* like this, as it jitters each letter you type in to place:
```
## [M]
## M[y]
## My [h]
## My h[e]
## My he[a]
## My hea[d]
## My head[i]
## My headi[n]
## My headin[g]
## My heading
```
For paragraphs, quotes, and lists, there's (usually, depends on font) no jitter. This is because the default document type style and the correct local style is the same.
My question is:
* What level of effort would this be to fix? (`2 weeks` rewrite the whole text style preview engine? `2 days` Tweak the event that prompts the recalculation?)
* What classes should I look at if I were going to poke around and try to work this out?
* What are the correct names for these two concepts in the codebase (document default type and styled local type)?
* Any unexpected side effects I should think about besides perf?
PS. I use this program all the time. Love it. Thanks for making it.
Contributor guide
Research direction
Use the editor pane behavior described in the issue as the starting point; investigate the text style preview engine and the event that prompts recalculation. Compare typing in headings and bold sections with paragraphs, quotes, and lists, and define done as eliminating the visible jitter without introducing unacceptable performance side effects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, markdown, objective-c
- Domain
- desktop, frontend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100