docs: improve JavaScript interoperability documentation#5087
Draft
Artur- wants to merge 16 commits into
Draft
Conversation
Add TypeScript coverage, npm package wrapping guidance, and advanced Lit integration patterns to address gaps identified in forum feedback.
|
|
Replace manual JSON string passing with setPropertyBean() and a Java record, matching the idiomatic Vaadin pattern for complex objects.
Adapt branch content to the new structure where how-to content moved to building-apps/components/. Accept deletion of an-in-project-web-component.adoc, keep TypeScript and @NpmPackage design sections in index.adoc as reference material, and update cross-references throughout.
The @NpmPackage annotation referencing the non-existing @acme/widget npm package caused build failures. Move it to inline code in the adoc file so it still appears in the docs but is not compiled.
Flow 25 migrated the Element and event APIs from elemental.json to Jackson. Refresh the inline snippets accordingly: - setPropertyJson now takes a Jackson BaseJsonNode; show JacksonUtils.createObjectNode() and add setPropertyList/setPropertyMap - @eventdata binds directly to typed values (List<Integer>) since event data is Jackson-deserialized - low-level listener event data is a Jackson JsonNode, not elemental - callJsFunction accepts all Jackson-serializable types
The project builds with experimentalDecorators/useDefineForClassFields:false, so Lit properties must be declared without the TC39 'accessor' keyword. The dspublisher production build (Rollup) fails to parse 'accessor', which broke build-and-deploy even though Java compile and eslint passed.
Preview DeploymentThis PR has been deployed for preview. URL: https://docs-preview-pr-5087.fly.dev Changed pagesAdded content is highlighted in green; removed content is marked in red on each page.
Built from 4e21002 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add TypeScript coverage, npm package wrapping guidance, and advanced Lit integration patterns to address gaps identified in forum feedback.