Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Sidenav variant property is missing in typescript type definition #2933

Closed
1 task done
jianliao opened this issue Feb 15, 2023 · 0 comments · Fixed by #2934
Closed
1 task done

[Bug]: Sidenav variant property is missing in typescript type definition #2933

jianliao opened this issue Feb 15, 2023 · 0 comments · Fixed by #2934
Labels
bug Something isn't working Components: Side Navigation triage An issue needing triage

Comments

@jianliao
Copy link
Contributor

Code of conduct

  • I agree to follow this project's code of conduct.

Impacted component(s)

@spectrum-web-components/sidenav

Expected behavior

According to the Sidenav documentation, users can this property to render multi-layers Side navigation. This property should be usable in a typescript project.

Actual behavior

The typescript type definition of this property is missing. https://unpkg.com/browse/@spectrum-web-components/sidenav@0.13.9/src/Sidenav.d.ts. It will lead to ts compile error in a typescript project if I use it.

Screenshots

image

What browsers are you seeing the problem in?

No response

How can we reproduce this issue?

  1. npm i @spectrum-web-components/sidenav@latest
  2. cd node_modules/@spectrum-web-components/sidenav
  3. code src/sp-sidenav.d.ts

or just go to https://unpkg.com/browse/@spectrum-web-components/sidenav@0.13.9/src/Sidenav.d.ts

Sample code that illustrates the problem

The latest type definition for SideNav looks like:

/**
 * @element sp-sidenav
 *
 * @slot - the Sidenav Items to display
 * @fires change - Announces a change in the `value` property of the navigation element.
 * This change can be "canceled" via `event.preventDefault()`.
 */
export declare class SideNav extends Focusable {
    static get styles(): CSSResultArray;
    private items;
    startTrackingSelectionForItem(item: SideNavItem): void;
    stopTrackingSelectionForItem(item: SideNavItem): void;
    rovingTabindexController: RovingTabindexController<SideNavItem>;
    manageTabIndex: boolean;
    value: string | undefined;
    private handleSelect;
    focus(): void;
    blur(): void;
    click(): void;
    get focusElement(): SideNavItem | SideNav;
    private isDisabledChild;
    private handleSlotchange;
    protected render(): TemplateResult;
    protected willUpdate(): void;
    protected updated(changes: PropertyValues): void;
}

Logs taken while reproducing problem

No response

@jianliao jianliao added bug Something isn't working triage An issue needing triage Components: Side Navigation labels Feb 15, 2023
@jianliao jianliao linked a pull request Feb 15, 2023 that will close this issue
13 tasks
bernhard-adobe added a commit that referenced this issue Feb 22, 2023
* main: (41 commits)
  chore: release new versions #publish
  docs: use code splitting in the JS output
  fix(avatar): ensure there is ALWAYS a focusElement
  test: type like a user
  ci: update golden images cache
  feat(tabs): update imports to get correct coverage
  feat(tabs): add test coverage, remove unused property from  component class
  feat(tabs): add test coverage, update import paths
  feat(tabs): update bundle setup and readme
  feat(tabs): moving tabs overflow under tabs package
  feat(tabs-overflow): address comments
  feat(tabs-overflow): fix style and update unittest
  feat(tabs-overflow): update CSS and component to be more spectrum compliant
  feat(tabs-overflow): testing cli
  feat(tabs-overflow): update documentation
  feat(tabs-overflow): first round of feedback
  feat(tabs-overflow): first round implementation of sp-tabs-overflow
  chore: add description to the variant property
  fix: #2933 by adding optional variant property to SideNav
  chore(tooltip): update selfManaged story to be open by default
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Components: Side Navigation triage An issue needing triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant