+
Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Conversation

clintcs
Copy link
Collaborator

@clintcs clintcs commented Jul 10, 2025

🚀 Description

Patch

  • 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.

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

  • I have followed the Contributing Guidelines.
  • I have added tests to cover new or updated functionality.
  • I have added or updated Storybook stories.
  • I have localized new strings.
  • I have followed the ARIA Authoring Practices Guide or met with the Accessibility Team.
  • I have included a changeset.
  • I have scheduled a design review.
  • I have reviewed the Storybook and Visual Test Report links below.

🔬 Testing

Input now passes aria-controls, aria-expanded, and aria-haspopup down to its underlying input field

Not 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

  1. Navigate to Tooltip in Storybook.
  2. Add an event listener to Tooltip's target that cancels "mouseover".
  3. Add an event listener to Tooltip's target that cancels "mouseout".
  4. Hover Tooltip's target.
  5. Verify Tooltip remains closed.
  6. Set Tooltip's open attribute to true.
  7. Hover to and then away from Tooltip's target.
  8. Verify Tooltip remains open.

Copy link

changeset-bot bot commented Jul 10, 2025

🦋 Changeset detected

Latest commit: 4f71b1f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@crowdstrike/glide-core Patch

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`
Copy link
Collaborator Author

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 {
Copy link
Collaborator Author

@clintcs clintcs Jul 10, 2025

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 () => {
Copy link
Collaborator Author

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}
Copy link
Collaborator Author

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,
Copy link
Collaborator Author

@clintcs clintcs Jul 10, 2025

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
Copy link
Collaborator Author

@clintcs clintcs Jul 10, 2025

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}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some sorting.

@clintcs clintcs force-pushed the grab-bag branch 6 times, most recently from f5b0015 to 75ff811 Compare July 10, 2025 15:26
expect(tooltip.checkVisibility()).to.be.true;
});

it('closes on "blur"', async () => {
Copy link
Collaborator Author

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 () => {
Copy link
Collaborator Author

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".

@clintcs clintcs force-pushed the grab-bag branch 2 times, most recently from b93de39 to f6e2314 Compare July 10, 2025 15:31
@clintcs clintcs marked this pull request as ready for review July 10, 2025 15:55
'@crowdstrike/glide-core': patch
---

- Input now passes `aria-controls`, `aria-expanded`, and `aria-haspopup` down to its underlying input field.
Copy link
Collaborator

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 🤷

Image

Copy link
Collaborator Author

@clintcs clintcs Jul 10, 2025

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator

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:

Screenshot 2025-07-11 at 10 18 19 AM

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. 🤷

Copy link
Collaborator Author

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.

@clintcs clintcs added this pull request to the merge queue Jul 11, 2025
Merged via the queue into main with commit 0a95a6f Jul 11, 2025
29 checks passed
@clintcs clintcs deleted the grab-bag branch July 11, 2025 15:23
@github-actions github-actions bot mentioned this pull request Jul 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载