Conversation
There was a problem hiding this comment.
Pull request overview
Updates the project’s supported Node.js versions in CI and adjusts a couple of UI-related outputs likely impacted by the Node/JSDOM upgrade (tabs snapshot/style and classifier field rendering).
Changes:
- Update GitHub Actions CI matrix to run on Node.js 22 and 24 (and align artifact/publish steps to Node 22).
- Change
tabWidgetinline style for the tab body container and update the corresponding Jest snapshot. - Refactor the
ui:Classifierwidget rendering to include a label + value container structure and attempt to apply an “uneditable” style.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Moves CI from Node 20/22 to 22/24 and adjusts which job uploads the build artifact + publish Node version. |
src/tabs.ts |
Updates the inline style used for the per-tab <main> container. |
test/unit/__snapshots__/tabs.test.ts.snap |
Updates snapshot to match the new tab body style string. |
src/widgets/forms.js |
Wraps classifier select in a labeled container and adds logic intended to make the select uneditable when the document isn’t editable. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (selectElement && selectElement.querySelector && selectElement.querySelector('select')) { | ||
| const select = selectElement.querySelector('select'); | ||
| if (select && !kb.updater.editable(dataDoc.uri)) { | ||
| select.readOnly = true; | ||
| select.style = style.textInputStyleUneditable; |
There was a problem hiding this comment.
HTMLSelectElement doesn’t support readOnly, so this won’t actually prevent edits (and can leave the UI looking uneditable while still interactive). Use disabled = true (and/or appropriate aria-disabled) for non-editable selects. Also, querySelector('select') only targets the first select; nested classifier selects created by makeSelectForNestedCategory will remain editable unless you apply the same logic to all descendant selects (e.g., iterate querySelectorAll('select')).
| if (selectElement && selectElement.querySelector && selectElement.querySelector('select')) { | |
| const select = selectElement.querySelector('select'); | |
| if (select && !kb.updater.editable(dataDoc.uri)) { | |
| select.readOnly = true; | |
| select.style = style.textInputStyleUneditable; | |
| if (selectElement && selectElement.querySelectorAll) { | |
| const selects = selectElement.querySelectorAll('select') | |
| if (selects.length && !kb.updater.editable(dataDoc.uri)) { | |
| selects.forEach(select => { | |
| select.disabled = true | |
| select.setAttribute('aria-disabled', 'true') | |
| select.style = style.textInputStyleUneditable | |
| }) |
No description provided.