-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
🦋 Changeset detectedLatest commit: 4f71b1f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
'arrow-left': svg` | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18" /> | ||
`, | ||
'three-dots': svg` |
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.
This will be used in Menu's story. It's not strictly necessary to add it now. But I wanted to reduce the size of my upcoming Menu PR as much as possible—because it'll be a big one.
`, | ||
css` | ||
.component { | ||
.button { |
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.
Not the top-level tag, so I renamed it.
).to.be.true; | ||
}); | ||
|
||
it('remains closed on hover when disabled', async () => { |
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.
Dupe.
data-test="component" | ||
@mouseover=${this.#onComponentMouseover} | ||
@mouseout=${this.#onComponentMouseout} | ||
@mouseover=${this.#onComponentMouseOver} |
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.
Camel-cased these to match the other event handlers in this component.
// 30 seconds or so when Dropdown is moved out of the repository. | ||
testsFinishTimeout: process.env.CI ? 90_000 : 60_000, | ||
// won't finish. 2 minutes is the default. | ||
testsFinishTimeout: process.env.CI ? 120_000 : 60_000, |
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.
Menu's interactions test suite will be mostly boilerplate but will be massive, and it takes some time to run. It's not strictly necessary to add this now. But, again, I wanted to reduce the size of my upcoming Menu PR as much as possible.
@type {Element} | ||
--> | ||
</slot> | ||
<div |
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.
Not sure how the indentation got out of whack. Linter out to lunch.
aria-haspopup=${ifDefined(this.ariaHasPopup ?? undefined)} | ||
aria-invalid=${this.#isShowValidationFeedback || | ||
this.#isMaxCharacterCountExceeded} | ||
autocapitalize=${this.autocapitalize} |
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.
Just some sorting.
f5b0015
to
75ff811
Compare
expect(tooltip.checkVisibility()).to.be.true; | ||
}); | ||
|
||
it('closes on "blur"', async () => { |
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.
Dupe.
await hover(target); | ||
await aTimeout(0); // Wait for Floating UI and `#onComponentMouseOver()` | ||
|
||
it('closes on Escape', async () => { |
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.
Moved this test below next to "closes when hovered away from".
b93de39
to
f6e2314
Compare
'@crowdstrike/glide-core': patch | ||
--- | ||
|
||
- Input now passes `aria-controls`, `aria-expanded`, and `aria-haspopup` down to its underlying input field. |
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.
Super nit, but the downside to starting out with a bullet point is the release note doubles up on the -
.
So this will show up as #123 <commit> Thanks @clintcs! - - Input now passes
aria-controls,
aria-expanded, and
aria-haspopup down to its underlying input field.
I've been starting out the release note with a single sentence to hopefully break it up, but no strong opinions from me 🤷
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.
Aye. I think this has come up a couple times now. I don't like how bullet points get formatted. But I'm also reluctant to add an otherwise unnecessary sentence before the changes, and doing so is hard to enforce. So I'm not sure what the best solution is.
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.
What about this as a format?
## Input
- Now passes `aria-controls`, `aria-expanded`, and `aria-haspopup` down to its underlying input field.
## Tooltip
- Can now be stopped from opening and closing by canceling "mouseover" and "mouseout" events on its target.
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 think we may run into the same issue without a starter sentence. If you take a look at https://github.com/CrowdStrike/glide-core/pull/932/files#diff-578302523fd9647f4ff6769a88c274dcf582deac425b2e9a3127f2215b0d8efc, for example, it gets rendered as:
I was thinking - what if each component has a separate changeset? So for above, you'd have two changesets, one for Input, one for Tooltip. That works if there's only one change for that component. But as soon as you get back to a bulleted list of items, you run into the same issue without a beginning sentence.
We do have @crowdstrike/glide-core/styles/variables.css has been updated with the latest from Figma:
for Figma updates. 🤷
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 think the best course of action is probably for us to continue with the status quote, accept the weird formatting, and file an issue with Changesets.
🚀 Description
The first change is to support Input as Menu's target, which will enable Menu filtering. The second is so Menu can stop Tooltip from opening when the target of a sub-Menu is hovered. Also made a handful of other tweaks.
📋 Checklist
🔬 Testing
Input now passes
aria-controls
,aria-expanded
, andaria-haspopup
down to its underlying input fieldNot much to test. Code review should suffice.
Tooltip can now be stopped from opening and closing by canceling "mouseover" and "mouseout" events on its target
open
attribute totrue
.