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

fix(list): clicking on item should focus on list itself #272

Merged
merged 37 commits into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
954778f
fix(list): clicking on item should focus on list itself
phetw Apr 4, 2022
43ac15e
Merge branch 'v6' into fix-list-focus
wsuwt Apr 7, 2022
c6acebf
Merge branch 'v6' into fix-list-focus
wsuwt Apr 8, 2022
aa292fa
Merge branch 'v6' into fix-list-focus
wsuwt Apr 8, 2022
02bb855
Merge branch 'v6' into fix-list-focus
wsuwt Apr 29, 2022
77ab81d
Merge branch 'v6' into fix-list-focus
wsuwt Jun 20, 2022
8d4cc90
Merge remote-tracking branch 'origin/v6' into fix-list-focus
wsuwt Jun 30, 2022
c28df5d
chore: update package-lock
wsuwt Jun 30, 2022
4498ffa
Merge branch 'v6' into fix-list-focus
wsuwt Jul 4, 2022
6b8131b
chore: update package-lock
wsuwt Jul 12, 2022
1f6add4
feat(tree): use `defaultTabIndex` to control `tree-item` tabIndex value
wsuwt Jul 12, 2022
c92723c
feat(list): introduce `ef-list-item` element to override `tabIndex`
wsuwt Jul 12, 2022
f06afd8
test(combo-box): change `ef-item` element name to `ef-list-item`
wsuwt Jul 12, 2022
56c9a76
test: update snapshots
wsuwt Jul 12, 2022
9215c83
Merge branch 'v6' into fix-list-focus
wsuwt Jul 12, 2022
07d37a1
Update list-item.ts
wsuwt Jul 14, 2022
c304273
refactor: replace `ef-item` with `ef-list-item` for `noItemsTemplate(…
wsuwt Jul 14, 2022
7b0cdc7
test: update snapshots
wsuwt Jul 14, 2022
3e8f1e2
fix(list-item): add ef-list-item to global `HTMLElementTagNameMap`
wsuwt Jul 15, 2022
471451b
fix(tree-item): use `import type` instead
wsuwt Jul 15, 2022
f56d46d
refactor: import item elements only in parent class not in renderers
wsuwt Jul 15, 2022
cc6a06d
test(list): add a test case on focus point
wsuwt Jul 15, 2022
993071a
fix: revert `willUpdate()` modifier back to protected
wsuwt Jul 18, 2022
293ac90
chore: update package-lock
wsuwt Jul 18, 2022
ad5e658
style: remove `TreeItem` type
wsuwt Jul 18, 2022
d04d58b
test: use `click()` instead of firing tap event
wsuwt Jul 18, 2022
46dff12
refactor: simplify nested ternary operators
wsuwt Jul 18, 2022
a2b1a79
refactor: replace nested ternary operator with typical if-else
wsuwt Jul 18, 2022
645db0b
Merge branch 'v6' into fix-list-focus
wsuwt Jul 18, 2022
2b9de0d
fix: scroll should not reset position to 0 when arrow up
wsuwt Jul 19, 2022
39efec2
refactor: remove unused code
wsuwt Jul 19, 2022
6c3dd82
refactor: remove unecessary null checking
wsuwt Jul 19, 2022
81aa986
test: add `selectItem()` tests
wsuwt Jul 19, 2022
d2ba6db
refactor: replace `property` duplicate naming
wsuwt Jul 19, 2022
0fb72e6
test: add `item-id` test
wsuwt Jul 19, 2022
9ceb5f8
refactor: extract array mutating function to a seperate statement
wsuwt Jul 19, 2022
ef4bfa4
Merge branch 'v6' into fix-list-focus
wsuwt Jul 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,690 changes: 1,378 additions & 1,312 deletions package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "ef-item";

2 changes: 1 addition & 1 deletion packages/elemental-theme/src/custom-elements/ef-list.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'element:ef-item';
@import 'element:ef-list-item';
@import '../shared-styles/scrollbar';
@import '../responsive';

Expand Down
27 changes: 11 additions & 16 deletions packages/elements/src/combo-box/__snapshots__/AsyncFilter.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@
tabindex="-1"
with-shadow=""
>
<ef-item
<ef-list-item
aria-disabled="true"
aria-selected="false"
disabled=""
tabindex="-1"
>
No results found.
</ef-item>
</ef-list-item>
</ef-overlay>

```
Expand Down Expand Up @@ -91,37 +90,33 @@
aria-multiselectable="false"
id="internal-list"
role="listbox"
tabindex="-1"
tabindex=""
>
<ef-item
<ef-list-item
aria-selected="false"
role="presentation"
tabindex="-1"
type="header"
>
</ef-item>
<ef-item
</ef-list-item>
<ef-list-item
aria-selected="false"
highlighted=""
id="AF"
role="option"
tabindex="-1"
>
</ef-item>
<ef-item
</ef-list-item>
<ef-list-item
aria-selected="false"
id="AX"
role="option"
tabindex="-1"
>
</ef-item>
<ef-item
</ef-list-item>
<ef-list-item
aria-selected="false"
id="AL"
role="option"
tabindex="-1"
>
</ef-item>
</ef-list-item>
</ef-list>
</ef-overlay>

Expand Down
29 changes: 12 additions & 17 deletions packages/elements/src/combo-box/__snapshots__/Filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,27 @@
aria-multiselectable="false"
id="internal-list"
role="listbox"
tabindex="-1"
tabindex=""
>
<ef-item
<ef-list-item
aria-selected="false"
role="presentation"
tabindex="-1"
type="header"
>
</ef-item>
<ef-item
</ef-list-item>
<ef-list-item
aria-selected="false"
highlighted=""
id="AX"
role="option"
tabindex="-1"
>
</ef-item>
<ef-item
</ef-list-item>
<ef-list-item
aria-selected="false"
id="AL"
role="option"
tabindex="-1"
>
</ef-item>
</ef-list-item>
</ef-list>
</ef-overlay>

Expand Down Expand Up @@ -113,23 +110,21 @@
aria-multiselectable="false"
id="internal-list"
role="listbox"
tabindex="-1"
tabindex=""
>
<ef-item
<ef-list-item
aria-selected="false"
role="presentation"
tabindex="-1"
type="header"
>
</ef-item>
<ef-item
</ef-list-item>
<ef-list-item
aria-selected="false"
highlighted=""
id="AX"
role="option"
tabindex="-1"
>
</ef-item>
</ef-list-item>
</ef-list>
</ef-overlay>

Expand Down
Loading