chore: remove orphaned @event JSDoc blocks (post-CEM cleanup)#11621
Merged
web-padawan merged 1 commit intomainfrom Apr 30, 2026
Merged
chore: remove orphaned @event JSDoc blocks (post-CEM cleanup)#11621web-padawan merged 1 commit intomainfrom
web-padawan merged 1 commit intomainfrom
Conversation
Now that #11539 has migrated web-types and API docs generation to CEM, event documentation is canonically expressed via `@fires {CustomEvent} <name> - …` lines on the class JSDoc. CEM does not read `@event` JSDoc blocks at all. The 2026-04-29 batch (#11604–#11610 + follow-up #11619) copied long descriptions from `@event` blocks into the corresponding `@fires` lines. The `@event` blocks remained in source as duplicate dead documentation, kept only because nobody got around to deleting them. Remove them now: 129 blocks across 49 `.js` files. Web-types output (per-package `web-types.json` and `web-types.lit.json`) is byte-identical before and after the removal — verified by snapshotting both files for all 60 packages, running `yarn release:cem && yarn release:web-types`, and `diff -r`-ing against the snapshot. Empty diff confirms CEM ignores `@event` as expected. The CustomEvent `detail` shape, which some `@event` blocks documented via `@param detail.*` lines, is captured by the `*Event` type aliases in `.d.ts` files (e.g., `UploadBeforeEvent = CustomEvent<{ xhr: XMLHttpRequest; file: UploadFile }>`). `.d.ts` files are untouched in this commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
tomivirkki
approved these changes
Apr 30, 2026
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.



Summary
Now that #11539 has migrated web-types and API docs generation to CEM, event documentation is canonically expressed via
@fires {CustomEvent} <name> - …lines on the class JSDoc. CEM does not read@eventJSDoc blocks at all.The 2026-04-29 batch (#11604–#11610) plus follow-up #11619 copied long descriptions from
@eventblocks into the corresponding@fireslines. The@eventblocks remained in source as duplicate dead documentation.This PR removes them: 129 blocks across 49
.jsfiles, ~928 lines deleted. Concentrated in:charts(34 blocks invaadin-chart-mixin.js)upload(13 blocks)grid(12 blocks)dashboard(7 blocks)overlay,crud,combo-box,dialog,date-picker,confirm-dialog, plus 22 other packages with 1–3 blocks each.d.tsfiles are untouched.Verification — web-types output is byte-identical
Per the user's stated success criterion. Snapshotted
custom-elements.jsonand all 120 per-packageweb-types.json/web-types.lit.jsonfiles before the cleanup, applied the change, regenerated everything, and confirmed viadiff -rthat every per-package output is byte-identical.The root
custom-elements.jsonshows module-ordering variation between runs (a pre-existing CEM-analyzer non-determinism), but every module's content is identical when sorted bypath. Per-package CEM output that's published to npm is unaffected.Note on
@param detail.*documentationA handful of
@eventblocks (invaadin-upload.js,vaadin-chart-mixin.js,vaadin-crud-mixin.js) included@param detail.*lines describing thedetailobject's shape. The shape itself remains fully captured by theCustomEvent<{…}>type parameter on the*Eventtype aliases in.d.tsfiles (e.g.,UploadBeforeEvent = CustomEvent<{ xhr: XMLHttpRequest; file: UploadFile }>), which IDE / TS users consume directly. The@param detail.*lines were never read by Polymer Analyzer or CEM — they were inline source-only prose.If a specific
@param detail.xdescription is judged worth preserving, it can be lifted into the affected component's@firesline in a follow-up.Test plan
yarn release:cemandyarn release:web-typesproduce byte-identical per-package output vs. the pre-change snapshotyarn lintandyarn lint:typespassgit diff --stat -- 'packages/*/src/*.d.ts'is empty (.d.tsfiles untouched)@fireslines are still present and unchanged on the affected components🤖 Generated with Claude Code