Skip to content

Node22-24#706

Open
bourgeoa wants to merge 5 commits intomainfrom
node22-24
Open

Node22-24#706
bourgeoa wants to merge 5 commits intomainfrom
node22-24

Conversation

@bourgeoa
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 11, 2026 15:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 tabWidget inline style for the tab body container and update the corresponding Jest snapshot.
  • Refactor the ui:Classifier widget 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.

Comment on lines +736 to +740
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;
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

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')).

Suggested change
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
})

Copilot uses AI. Check for mistakes.
@bourgeoa bourgeoa changed the title Node22 24 Node22-24 Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants