Skip to content

Integrating Tim's work on separating RDF forms#779

Open
timea-solid wants to merge 4 commits into
mainfrom
rdfForms
Open

Integrating Tim's work on separating RDF forms#779
timea-solid wants to merge 4 commits into
mainfrom
rdfForms

Conversation

@timea-solid
Copy link
Copy Markdown
Member

No description provided.

  - autocompleteBar.ts now imports directly from ../../buttons and ../../dragAndDrop
  - autocompleteField.ts imports from ../../error and ../basic
  - autocompletePicker.ts imports from ../../error
  - forms.js no longer imports ../widgets at all
Copilot AI review requested due to automatic review settings June 1, 2026 11:47
Copy link
Copy Markdown
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

This PR continues the refactor to separate RDF form/widget functionality by replacing broad widgets imports with more focused module imports (buttons, error, drag-and-drop, basic field label), and adjusts button APIs to support call sites that don’t provide handlers.

Changes:

  • Refactor autocomplete form components to import errorMessageBlock, fieldLabel, button helpers, and drag-and-drop directly (instead of via widgets).
  • Update cancelButton / continueButton signatures to allow an omitted click handler.
  • Update Jest snapshots and refresh package-lock.json from dependency resolution.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/unit/widgets/forms/autocomplete/snapshots/autocomplete.test.ts.snap Snapshot updates for autocomplete field rendering (currently reflecting a style="undefined" regression).
test/unit/widgets/forms/snapshots/basic.test.ts.snap Snapshot updates for basic field error rendering (currently reflecting missing inline styles).
test/unit/widgets/snapshots/error.test.ts.snap Snapshot updates for errorMessageBlock rendering (currently reflecting missing inline styles).
src/widgets/forms/autocomplete/autocompletePicker.ts Switch from widgets.errorMessageBlock to direct errorMessageBlock import.
src/widgets/forms/autocomplete/autocompleteField.ts Replace widgets.* usage with direct imports; adjust error rendering and label rendering.
src/widgets/forms/autocomplete/autocompleteBar.ts Replace widgets.* usage with direct imports from buttons and dragAndDrop.
src/widgets/forms.js Remove unused widgets import; use buttons.continueButton and direct errorMessageBlock.
src/widgets/error.ts Switch cancelButton import to ./buttons and change style import style (currently incorrect).
src/widgets/buttons.ts Make cancelButton/continueButton handler parameter optional.
package-lock.json Lockfile changes from dependency updates/resolution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import { style } from '../../../style'
import { errorMessageBlock } from '../../error'
import { fieldLabel } from '../basic'
import * as style from '../../../style'
Comment on lines 69 to 72
} catch (err) {
callbackFunction(false, err)
box.appendChild(widgets.errorMessageBlock(dom, 'Autocomplete form data update error:' + err, null, err))
box.appendChild(errorMessageBlock(dom, 'Autocomplete form data update error:' + err, err))
return
Comment on lines 93 to 97
} catch (err) {
const e2 = new Error('Autocomplete form data delete error:' + err)
callbackFunction(false, err)
box.appendChild(widgets.errorMessageBlock(dom, e2, null, err))
box.appendChild(errorMessageBlock(dom, e2, err))
return
Comment thread src/widgets/error.ts
Comment on lines +13 to 15
import { cancelButton } from './buttons'
import * as style from '../style'
import styleConstants from '../styleConstants'
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