Skip to content

Assign EuiComboBox data-test-subj to the options list with a '-optionsList' suffix#1054

Merged
cjcenizal merged 6 commits into
elastic:masterfrom
cjcenizal:combo-box-list-test
Jul 30, 2018
Merged

Assign EuiComboBox data-test-subj to the options list with a '-optionsList' suffix#1054
cjcenizal merged 6 commits into
elastic:masterfrom
cjcenizal:combo-box-list-test

Conversation

@cjcenizal
Copy link
Copy Markdown
Contributor

@cjcenizal cjcenizal commented Jul 27, 2018

This is so you can find a specific combo box instance's options list. This wasn't previously possible because the options list is attached to the body element, not the combo box element.

@cjcenizal cjcenizal added the breaking change PRs with breaking changes. (Don't delete - used for automation) label Jul 27, 2018
@cjcenizal cjcenizal force-pushed the combo-box-list-test branch from f24f59e to 4785b84 Compare July 27, 2018 18:50
@cjcenizal
Copy link
Copy Markdown
Contributor Author

Looks like the icon snapshots were removed in #1040, which is why I think they're showing up in this PR.

CC @snide @cchaos

Comment thread CHANGELOG.md Outdated

**Breaking changes**

- `EuiComboBox` now applies the provided `data-test-subj` to its options list element with the suffix `-optionsList` so you can find a specific combo box instance's options list. This wasn't previously possible because the options list is attached to the body element, not the combo box element. This is a break from the previous `data-test-subj` which was simply `comboBoxOptionsList`. ([#1054](https://github.com/elastic/eui/pull/1054))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't see this as a breaking change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Kibana has tests which rely on the data-test-subj="comboBoxOptionsList" selector, and they'll break once we intake this change.

Copy link
Copy Markdown
Contributor

@chandlerprall chandlerprall Jul 27, 2018

Choose a reason for hiding this comment

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

I tried to find that line in the PR, but couldn't (sorry). Can that attribute be left in place and just add the one for individual options?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea! I'll make that change.

@cjcenizal
Copy link
Copy Markdown
Contributor Author

@chandlerprall Thanks, done.

@snide
Copy link
Copy Markdown
Contributor

snide commented Jul 27, 2018

@cjcenizal Thanks. I'll fix.

@snide
Copy link
Copy Markdown
Contributor

snide commented Jul 27, 2018

@cjcenizal err, I mean, thanks for fixing.

Copy link
Copy Markdown
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

Small changelog note.

Comment thread CHANGELOG.md Outdated

## [`3.2.1`](https://github.com/elastic/eui/tree/v3.2.1)

- `EuiComboBox` now applies the provided `data-test-subj` to its options list element with the suffix `-optionsList` so you can find a specific combo box instance's options list. This wasn't previously possible because the options list is attached to the body element, not the combo box element. This is in addition to the existing `data-test-subj="comboBoxOptionsList"`. ([#1054](https://github.com/elastic/eui/pull/1054))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be under master and labeled as a breaking change.

Copy link
Copy Markdown
Contributor

@chandlerprall chandlerprall Jul 27, 2018

Choose a reason for hiding this comment

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

not a breaking change, this is now only adding new attributes without removing the old one (but yes, under master)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@chandlerprall chandlerprall removed the breaking change PRs with breaking changes. (Don't delete - used for automation) label Jul 27, 2018
Copy link
Copy Markdown
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

lgtm
code review, inspected dom to view new data-test-subj attributes

@cjcenizal cjcenizal merged commit 35f77ba into elastic:master Jul 30, 2018
@cjcenizal cjcenizal deleted the combo-box-list-test branch July 30, 2018 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants