Skip to content

Outline shaded cells: autodetect exterior shade#489

Open
cryslith wants to merge 3 commits intorobx:mainfrom
cryslith:outline-shaded-exterior-color
Open

Outline shaded cells: autodetect exterior shade#489
cryslith wants to merge 3 commits intorobx:mainfrom
cryslith:outline-shaded-exterior-color

Conversation

@cryslith
Copy link
Copy Markdown
Contributor

Some people prefer to use yellow for the inside of the loop. This PR allows autodetecting this preference according via a cross mark on the exterior border.

slither
slither(1)

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pzprjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2023 11:56pm

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 29, 2023

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.63%. Comparing base (efa9bed) to head (e84434f).
⚠️ Report is 576 commits behind head on main.

Files with missing lines Patch % Lines
src/puzzle/Board.js 88.88% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #489      +/-   ##
==========================================
- Coverage   90.66%   90.63%   -0.03%     
==========================================
  Files         183      183              
  Lines       20004    20008       +4     
==========================================
- Hits        18136    18134       -2     
- Misses       1868     1874       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@x-sheep x-sheep added the enhancement New feature or request label Aug 30, 2023
Copy link
Copy Markdown
Collaborator

@x-sheep x-sheep left a comment

Choose a reason for hiding this comment

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

Overall this looks good. Before I can merge this, I'd like the test coverage to cover the other case as well (since this is a library function).

Comment thread src/puzzle/Board.js
// A line is drawn between two shaded cells with opposite shades,
// or erased between shaded cells with the same shade.
// "Cells" outside the grid are treated as having shade 2,
// unless there is a cross mark between a shaded cell and the exterior, in which case that cell's shade is used as the exterior shade.
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.

I'd like this part of the comment to be rewritten. The exterior shade should be treated as the more common case, with the default value of 2 mentioned afterwards. Also, line 908 is currently too long. (we don't have strict lint rules for this, but it currently sticks out compared to the rest)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants