-
Notifications
You must be signed in to change notification settings - Fork 25
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
Updating package-lock.json #5158
Changes from all commits
1ca159a
4a5779c
5eb7f92
d96b6ac
9dfba4b
a360744
f388bc8
843e806
b4c3051
de9aa3a
a557b0c
eea4d1b
50bdf8e
500a99f
faff273
3d11ab3
6a1192b
b389f75
a0c7763
f2b1b64
1cf1a01
59deb6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"browsers": [ | ||
{ | ||
"name": "Chromium", | ||
"version": 130 | ||
"version": 131 | ||
} | ||
], | ||
"system": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,11 +49,11 @@ function addSpaceListener() { | |
if (spaceListenerAdded) return; | ||
spaceListenerAdded = true; | ||
document.addEventListener('keydown', e => { | ||
if (e.keyCode !== 32) return; | ||
if (e.key !== ' ') return; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My IDE was giving me warnings since |
||
spacePressed = true; | ||
}); | ||
document.addEventListener('keyup', e => { | ||
if (e.keyCode !== 32) return; | ||
if (e.key !== ' ') return; | ||
spacePressed = false; | ||
}); | ||
} | ||
|
@@ -244,6 +244,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) { | |
onSubscribe: this._updateActiveFiltersSubscriber.bind(this), | ||
updateSubscribers: this._updateActiveFiltersSubscribers.bind(this) | ||
}); | ||
this._spacePressedDuringLastSelection = false; | ||
} | ||
|
||
static get focusElementSelector() { | ||
|
@@ -617,7 +618,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) { | |
return html` | ||
<d2l-list-item | ||
id="${itemId}" | ||
@d2l-list-item-selected="${ifDefined(item.additionalContent ? this._handleListItemSelelcted : undefined)}" | ||
@d2l-list-item-selected="${item.additionalContent ? this._handleListItemSelected : undefined}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrapping this in |
||
?selection-disabled="${item.disabled}" | ||
?hidden="${item.hidden}" | ||
key="${item.key}" | ||
|
@@ -896,18 +897,23 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) { | |
} | ||
|
||
async _handleExpandCollapse(e) { | ||
const eventPromise = e.target.expanded ? e.detail.expandComplete : e.detail.collapseComplete; | ||
const expanded = e.target.expanded; | ||
const eventPromise = expanded ? e.detail.expandComplete : e.detail.collapseComplete; | ||
const parentListItem = e.target.closest('d2l-list-item'); | ||
parentListItem.classList.add('expanding-content'); | ||
|
||
await eventPromise; | ||
parentListItem.classList.remove('expanding-content'); | ||
|
||
if (expanded && !hasDisplayedKeyboardTooltip && this._spacePressedDuringLastSelection) { | ||
await new Promise(resolve => requestAnimationFrame(resolve)); | ||
this._displayKeyboardTooltip = true; | ||
hasDisplayedKeyboardTooltip = true; | ||
} | ||
} | ||
|
||
_handleListItemSelelcted() { | ||
if (hasDisplayedKeyboardTooltip || !spacePressed) return; | ||
this._displayKeyboardTooltip = true; | ||
hasDisplayedKeyboardTooltip = true; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We were getting really consistent failures (~90% of the time) where the tooltip which is tied to the list item would position itself before the expand/collapse area had finished opening. This captures whether spacebar was pressed (because we lose that information after) but moves the displaying of the tooltip up into the event handler for expand/collapse. |
||
_handleListItemSelected() { | ||
this._spacePressedDuringLastSelection = spacePressed; | ||
} | ||
|
||
_handleSearch(e) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -461,9 +461,17 @@ class InputTime extends InputInlineHelpMixin(FocusMixin(LabelledMixin(SkeletonMi | |
// open and focus dropdown on down arrow or enter | ||
if (e.keyCode === 40 || e.keyCode === 13) { | ||
if (!this._dropdownFirstOpened) this._dropdownFirstOpened = true; | ||
this.opened = true; | ||
e.preventDefault(); | ||
await this._waitForItems(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was seeing consistent vdiff results where it wasn't focusing on the first item in the menu when the time input was opened. I tracked this down to the menu bailing on its focus code because there weren't any items and it therefore couldn't determine where to move focus. That's because time inputs don't render their menu items until the menu is first opened as a performance thing. So this change sets |
||
this.opened = true; | ||
} | ||
} | ||
|
||
async _waitForItems() { | ||
const items = this.shadowRoot.querySelectorAll('d2l-menu-item-radio'); | ||
if (items.length > 0) return; | ||
await new Promise(resolve => requestAnimationFrame(resolve)); | ||
return this._waitForItems(); | ||
} | ||
} | ||
customElements.define('d2l-input-time', InputTime); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,7 +167,8 @@ describe('d2l-input-date-time', () => { | |
it('open time', async() => { | ||
const elem = await fixture(basicFixture); | ||
const textInput = elem.shadowRoot.querySelector('d2l-input-time').shadowRoot.querySelector('input'); | ||
await sendKeysElem(textInput, 'press', 'Enter'); | ||
sendKeysElem(textInput, 'press', 'Enter'); | ||
await oneEvent(elem, 'd2l-dropdown-open'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It needs to wait longer now. |
||
await expect(elem).to.be.golden(); | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dbatiste @margaree FYI on the changes in here.
This first one wasn't causing vdiffs to fail, but it was causing a lot of errors in the console because
this.getContentContainer()
was returningnull
and the code below was assuming that it wasn't. Clearly based on this comment this was a problem in the past, but I'm guessing waiting forupdateComplete
is no longer enough.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why that element would not be rendered by the time
updateComplete
is fulfilled.