Add optional PDF extension checkbox to invoice path generator#34
Conversation
kzuraw
commented
Jan 11, 2026
- Add checkbox control to toggle .pdf extension
- Default state is unchecked (no extension)
- Update path generation logic to conditionally add extension
- Style checkbox to match Apple-inspired design
- Add checkbox control to toggle .pdf extension - Default state is unchecked (no extension) - Update path generation logic to conditionally add extension - Style checkbox to match Apple-inspired design
PR Review: Add Optional PDF Extension CheckboxSummaryThis PR adds a checkbox control to the invoice path generator that allows users to optionally include the ✅ Strengths
📝 Code QualityCSS (html/invoice-path-generator.html:66-83)
JavaScript (html/invoice-path-generator.html:197-237)
🔍 Observations & SuggestionsMinor: AccessibilityThe checkbox label could be improved for accessibility: <label class="checkbox-label" for="addPdfExt">
<input type="checkbox" id="addPdfExt">
<span>Add .pdf extension</span>
</label>Adding Minor: Initial State BehaviorThe checkbox is unchecked by default. Consider if you want to persist user preference using // On load
const savedPref = localStorage.getItem('addPdfExt');
if (savedPref !== null) {
addPdfExtCheckbox.checked = savedPref === 'true';
}
// On change
addPdfExtCheckbox.addEventListener('change', () => {
localStorage.setItem('addPdfExt', addPdfExtCheckbox.checked);
generatePath();
});This is optional but might improve UX for repeat users. 🔒 Security✅ No security concerns. The change only affects client-side string concatenation. 🐛 Potential Issues✅ No bugs identified. The implementation is solid. ⚡ Performance✅ No performance concerns. The conditional check adds negligible overhead. 🧪 Testing RecommendationsManual testing checklist:
📋 ConclusionRecommendation: APPROVE ✅ This is a clean, well-implemented feature addition that enhances the tool's flexibility. The code follows repository conventions from CLAUDE.md (vanilla HTML/CSS/JS, client-side only, consistent styling). The suggestions above are minor enhancements, not blockers. Great work on maintaining code quality and consistency! |