Improve API docs scrollbar theming and CSS contract coverage#133
Improve API docs scrollbar theming and CSS contract coverage#133PrzemyslawKlys merged 2 commits intomainfrom
Conversation
Pull Request Review: Improve API docs scrollbar theming and CSS contract coverageSummaryThis PR adds scrollbar theming for code blocks in API documentation, along with CSS contract validation to ensure the new selectors are present in custom CSS files. The changes include dark/light theme support and comprehensive test coverage. Code Quality & Best Practices ✅Strengths:
Code organization:
Potential Issues & Concerns1. Browser Compatibility
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 104c2b6a16
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ".member-card pre::-webkit-scrollbar", | ||
| ".member-card pre::-webkit-scrollbar-thumb" |
There was a problem hiding this comment.
Avoid prefix-overlapping CSS selectors in contract list
Adding both ".member-card pre::-webkit-scrollbar" and ".member-card pre::-webkit-scrollbar-thumb" makes the new scrollbar check unreliable because ValidateCssContract currently uses IndexOf substring matching; if a site defines only the thumb selector, the base scrollbar selector is still reported as present (the thumb text contains it), so the intended warning is skipped. This weakens the regression detection this commit is trying to add.
Useful? React with 👍 / 👎.
PR Review: Improve API docs scrollbar theming and CSS contract coverageSummaryThis PR adds themed scrollbar styling to API documentation code blocks with proper dark/light mode support, updates the CSS contract validation to include scrollbar selectors, and adds comprehensive regression tests. Overall, this is a well-executed enhancement with good test coverage. ✅ Strengths
🔍 Code Quality ObservationsPowerForge.Web/Services/WebApiDocsGenerator.cs:222-228
PowerForge.Web/Assets/ApiDocs/fallback.css:160-164, 269-272
PowerForge.Tests/WebApiDocsGeneratorContractTests.cs:793-861
PowerForge.Tests/WebApiDocsGeneratorSourceAndCssTests.cs:157-160
💡 Suggestions (Optional)
🎯 Performance & Security
✅ Test CoverageThe PR demonstrates solid test coverage:
VerdictApproved ✅ This is a clean, well-tested enhancement that improves the visual consistency of API documentation. The code follows established patterns, includes proper regression tests, and maintains the CSS contract validation system. No blocking issues identified. 🤖 Generated with Claude Code |
Summary: themed API docs code-block scrollbars for dark/light fallback CSS; added CSS contract selectors for scrollbar coverage; added regression tests for missing scrollbar selectors. Validation: targeted WebApiDocsGenerator tests passed locally (26 passed, 0 failed).