Skip to content

Bugifx/qp include field validation#23

Merged
unbrokenclayman merged 22 commits into
mainfrom
bugifx/qp-include-field-validation-wip
May 15, 2026
Merged

Bugifx/qp include field validation#23
unbrokenclayman merged 22 commits into
mainfrom
bugifx/qp-include-field-validation-wip

Conversation

@anesvijskij
Copy link
Copy Markdown
Collaborator

@anesvijskij anesvijskij commented May 8, 2026

Summary of changes in this PR:

This PR fixes a set of false-positive HTML diagnostics and aligns validation/navigation/completion/hover behavior around the same field/view resolution rules.

Main areas covered:

  • Added include-aware HTML validation and navigation:

    • qp-include child fields can resolve against include template TS metadata.
    • qp-include child selectors resolve against include template HTML.
    • Include child fields/selectors also work when the actual fields come from host extension mixins.
    • Include selector validation now applies include parameters before CSS matching, so selectors like #groupAccountAddress [name='PostalCode'] match templates with id="{{fs-id}}".
    • Added modify to the customization selector attributes.
  • Improved extension dependency handling:

    • Selectors can resolve against dependent extension HTML according to TS extension dependencies.
    • Field/view resolution now accounts for extension mixins and imported view classes more consistently.
    • Duplicate view class names are resolved by import source.
  • Shared common HTML field context logic:

    • Extracted common field context resolution into html-field-context-service.
    • Validation, completion, definition, and hover now share the same include/selector/mixin/view-field resolution behavior.
  • Reduced false positives:

    • Ignore mustache-templated bindings where static validation cannot know the runtime value.
    • Ignore unbound field names.
    • Allow id-less shell/utility qp-controls.
    • Accept control config properties inherited from base config interfaces.
    • Accept view bindings whose view class extends an unresolved imported base.
  • Improved state.bind semantics:

    • qp-button state.bind is validated as PXAction.
    • Supports view-qualified button actions like Document.AdjustDocAmt.
    • Non-button state.bind is treated as a View.Field binding, with validation, navigation, hover, and completion support.
  • Provider behavior updated:

    • Completion, definition, and hover now support the same selector/include/mixin cases covered by validation.
    • Hover remains backend-metadata based where applicable.

Validation:

  • Added regression fixtures and tests for each fixed case.
  • Latest local test run: npm run compile and npm test passed, 178 passing.

@unbrokenclayman unbrokenclayman merged commit 3b35dc1 into main May 15, 2026
1 check passed
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.

2 participants