Refresh settings UI and extension branding#34
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Code Review
This pull request refactors the UI and standardizes visibility logic by replacing direct style.display manipulations with CSS classes. It introduces a 'settings-surface' design system and enhances the GitHub connection flow with automatic clipboard copying. Feedback identifies an inconsistency where d-none was used instead of the project-standard hidden class in options.js and its tests, and suggests removing an unused transform property from a CSS transition.
| const itemExpiryEnabled = settings.itemExpiryHours !== null && settings.itemExpiryHours !== undefined; | ||
| document.getElementById('itemExpiryEnabled').checked = itemExpiryEnabled; | ||
| document.getElementById('itemExpiryInputRow').style.display = itemExpiryEnabled ? 'block' : 'none'; | ||
| document.getElementById('itemExpiryInputRow').classList.toggle('d-none', !itemExpiryEnabled); |
There was a problem hiding this comment.
For consistency with the rest of the application's visibility handling (which uses the hidden class), please use hidden instead of d-none. Both classes are defined identically in options.css, but hidden is the more widely used convention in this project.
| document.getElementById('itemExpiryInputRow').classList.toggle('d-none', !itemExpiryEnabled); | |
| document.getElementById('itemExpiryInputRow').classList.toggle('hidden', !itemExpiryEnabled); |
| const isEnabled = e.target.checked; | ||
| if (isEnabled) { | ||
| itemExpiryInputRow.style.display = 'block'; | ||
| itemExpiryInputRow.classList.remove('d-none'); |
| toastManager.info(`Auto-removal enabled: items older than ${hours} hours will be removed`); | ||
| } else { | ||
| itemExpiryInputRow.style.display = 'none'; | ||
| itemExpiryInputRow.classList.add('d-none'); |
| border: 1px solid var(--border-color); | ||
| border-radius: 18px; | ||
| box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset; | ||
| transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease; |
There was a problem hiding this comment.
The transform property is included in the transition list for .settings-surface, but it is not utilized in the hover state or any other state for this base class. Removing it avoids unnecessary transition tracking.
| transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease; | |
| transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; |
| <input id="itemExpiryEnabled" type="checkbox" /> | ||
| <input id="itemExpiryHours" value="24" /> | ||
| <div id="itemExpiryInputRow" style="display:none"></div> | ||
| <div id="itemExpiryInputRow" class="d-none"></div> |
| expect(document.getElementById('color-graphite').checked).toBe(true); | ||
| expect(document.getElementById('itemExpiryEnabled').checked).toBe(true); | ||
| expect(document.getElementById('itemExpiryInputRow').style.display).toBe('block'); | ||
| expect(document.getElementById('itemExpiryInputRow').classList.contains('d-none')).toBe(false); |
| <input id="itemExpiryEnabled" type="checkbox" /> | ||
| <input id="itemExpiryHours" /> | ||
| <div id="itemExpiryInputRow"></div> | ||
| <div id="itemExpiryInputRow" class="d-none"></div> |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64cc102afa
ℹ️ 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".
| importModalState.filteredRepos = [...importModalState.repos]; | ||
|
|
||
| document.getElementById('importLoadingState').style.display = 'none'; | ||
| document.getElementById('importLoadingState').classList.add('hidden'); |
There was a problem hiding this comment.
Hide import loading pane with a stronger display override
After this change, openImportModal hides #importLoadingState by adding hidden, but in options/options.css the utility rule .hidden { display: none; } is declared before .import-loading { display: flex; }, so the later .import-loading rule wins and the loading pane remains visible even after repos are fetched. In practice, successful imports render the repo list while the spinner block is still shown, which regresses the modal state transition.
Useful? React with 👍 / 👎.
| </div> | ||
| `; | ||
| paginationControls.style.display = 'none'; | ||
| paginationControls.classList.add('hidden'); |
There was a problem hiding this comment.
Use a hide mechanism that can override pagination flex styles
Pagination visibility now depends on toggling the hidden class, but options/options.css defines .pagination-controls { display: flex; } after .hidden { display: none; } with equal specificity. That means classList.add('hidden') does not actually hide the controls, so pagination stays visible even when there are no repositories or only one page.
Useful? React with 👍 / 👎.
- keep GitHub auth in the current Chrome profile until disconnect/reset\n- allow public repo validation and activity checks without GitHub auth\n- reuse shared GitHub repo-source fetching across settings and onboarding
Summary
.mockups/previews so design scratch files stay out of git statusTesting