docs(methods): update component method documentation #4145 (#30495)

Issue number: resolves ionic-team/ionic-docs#4145

---------

## What is the current behavior?
Some component methods are missing param tags in the JSDoc comments.
Some comments are out of order and the method description is below the
last param description. Some back ticks are misplaced around words
resulting in incorrect formatting in the docs site.

## What is the new behavior?
Method documentation in app, action-sheet, alert, datetime, loading,
menu, modal, popover, reorder-group, router, searchbar, and toast now
include descriptions for all params, all method descriptions are placed
above param descriptions, and back ticks are formatted correctly. All
changes are within JSDoc comments so will result in a change to the docs
site but no functional change to any components.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

In order to preview these changes I took the JSON generated from the
build on this branch and used it in the docusaurus script in place of
the fetch from unpkg. I set up a preview from my fork on Vercel -
https://ionic-docs-git-temptotestdocs-soundproofboots-projects.vercel.app/docs/components
. The change I made to the docusaurus script to use this temp data is
here - https://github.com/soundproofboot/ionic-docs/pull/1/files.
tempDocs.json is the output of the framework build after making these
changes.

---------

Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
This commit is contained in:
Colin Bares
2025-06-26 13:15:14 -05:00
committed by GitHub
parent 4b5753a4ce
commit db915bf6c7
13 changed files with 100 additions and 59 deletions

View File

@ -459,6 +459,8 @@ export class Popover implements ComponentInterface, PopoverInterface {
* Developers can pass a mouse, touch, or pointer event
* to position the popover relative to where that event
* was dispatched.
*
* @param event The event to position the popover relative to.
*/
@Method()
async present(event?: MouseEvent | TouchEvent | PointerEvent | CustomEvent): Promise<void> {
@ -540,15 +542,14 @@ export class Popover implements ComponentInterface, PopoverInterface {
/**
* Dismiss the popover overlay after it has been presented.
*
* @param data Any data to emit in the dismiss events.
* @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
* @param dismissParentPopover If `true`, dismissing this popover will also dismiss
* a parent popover if this popover is nested. Defaults to `true`.
*
* This is a no-op if the overlay has not been presented yet. If you want
* to remove an overlay from the DOM that was never presented, use the
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
*
* @param data Any data to emit in the dismiss events.
* @param role The role of the element that is dismissing the popover. For example, `cancel` or `backdrop`.
* @param dismissParentPopover If `true`, dismissing this popover will also dismiss
* a parent popover if this popover is nested. Defaults to `true`.
*/
@Method()
async dismiss(data?: any, role?: string, dismissParentPopover = true): Promise<boolean> {