microsoft / microsoft/react-native-windows

Hairline Width Separators Do Not Consistently Render

Open
#4,047 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Layout bug Workstream: Component Parity
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

This happens after moving the world to the 0.61 version of RNTester on my Surface book at 150% DPI I think. I didn't notice this happening when using the 0.60 version of RNTester on 0.61. It does not happen on my dev box.

0.59-stable
image

0.61
image

====Investigation========
This is not a regression caused by de-fork or upgrade to RN61. The issue happens randomly but more visible on 150% dpi.
hairlineWidth is a special RN constant calculated inside StyleSheet.js, using pixel ratio with intention to snap into a single pixel. It does not work well with our viewpanel implementation. The fix might just be for fork haridlineWidth and set to 1, but we need more debug

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the hairlineWidth calculation in StyleSheet.js and the viewpanel implementation, then reproduce the separator rendering on a Surface Book at 150% DPI and compare the 0.59-stable and 0.61 behavior. Done means hairline-width separators render consistently rather than intermittently.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
desktop, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.