Skip to content

Commit

Permalink
Remove Listbox (#2142)
Browse files Browse the repository at this point in the history
# Pull Request

## 🤨 Rationale

The `Listbox` component was initially implemented with the idea that it
would be used as part of the `RichTextEditor`. However, we pivoted away
from that notion and the `Listbox` is not used anywhere (and is not a
documented component). Instead of making the necessary changes to allow
it to behave properly with not changes that are being introduced it
makes more sense to just remove it for now.

## 👩‍💻 Implementation

Mainly deleting files. Updated a template file to point to FAST export
instead of something from the now deleted `Listbox` file.

## 🧪 Testing

N/A

## ✅ Checklist

<!--- Review the list and put an x in the boxes that apply or ~~strike
through~~ around items that don't (along with an explanation). -->

- [ ] I have updated the project documentation to reflect my changes or
determined no changes are needed.
  • Loading branch information
atmgrifter00 authored May 31, 2024
1 parent aca764d commit ad47a41
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 129 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Remove listbox component as it is unused.",
"packageName": "@ni/nimble-components",
"email": "[email protected]",
"dependentChangeType": "patch"
}
26 changes: 0 additions & 26 deletions packages/nimble-components/src/listbox/index.ts

This file was deleted.

37 changes: 0 additions & 37 deletions packages/nimble-components/src/listbox/styles.ts

This file was deleted.

13 changes: 0 additions & 13 deletions packages/nimble-components/src/listbox/tests/listbox.spec.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { html, ref, slotted } from '@microsoft/fast-element';
import { ListboxElement } from '@microsoft/fast-foundation';
import type { RichTextMentionListbox } from '.';
import { Listbox } from '../../listbox';
import { anchoredRegionTag } from '../../anchored-region';

// prettier-ignore
Expand All @@ -25,7 +25,7 @@ export const template = html<RichTextMentionListbox>`
?disabled="${x => x.disabled}"
>
<slot
${slotted({ filter: (n: Node) => n instanceof HTMLElement && Listbox.slottedOptionFilter(n), flatten: true, property: 'slottedOptions' })}
${slotted({ filter: (n: Node) => n instanceof HTMLElement && ListboxElement.slottedOptionFilter(n), flatten: true, property: 'slottedOptions' })}
>
</slot>
</div>
Expand Down
51 changes: 0 additions & 51 deletions packages/storybook/src/nimble/listbox/listbox-matrix.stories.ts

This file was deleted.

0 comments on commit ad47a41

Please sign in to comment.