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 anchor select field component #2813

Merged

Conversation

GuySartorelli
Copy link
Member

This should have been done when we upgraded react-select. My bad. The Creatable component is replaced with CreatableSelect and along with changes to that component's props, the selectors have also changed.

Fixes part of https://github.com/silverstripe/silverstripe-cms/actions/runs/3726652553/jobs/6320241058

Element matching css "form#Form_editorAnchorLink" not found. (Behat\Mink\Exception\ElementNotFoundException)

Note

Requires silverstripe/silverstripe-framework#10635 as well, as the affected behat tests also include interacting with tree dropdowns.

Parent issue

This should have been done when we upgraded react-select. My bad.
@@ -95,6 +95,7 @@ class AnchorSelectorField extends SilverStripeComponent {
* @param {String} value
*/
handleChange(value) {
console.log(value);
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
console.log(value);

Oops I need to remove this

@GuySartorelli
Copy link
Member Author

GuySartorelli commented Jan 11, 2023

Marking this as DRAFT as it requires silverstripe/webpack-config#55 to be merged, tagged, and published in npm before I can add the emotion cache component.
Edit: Good to go now

@GuySartorelli GuySartorelli marked this pull request as draft January 11, 2023 02:09
@GuySartorelli
Copy link
Member Author

The changes to yarn.lock are a result of running yarn upgrade @silverstripe/webpack-config so that I can use the EmotionCssCacheProvider exposed in the latest alpha release of that library.

@GuySartorelli GuySartorelli marked this pull request as ready for review January 11, 2023 03:02
This ensures we can override the react-select CSS if we need to.
@GuySartorelli
Copy link
Member Author

Note that this PR now requires silverstripe/silverstripe-admin#1432 to be merged before it will go "green" (behat will still fail, but the tests that this PR specifically is targetting should pass)

Copy link
Contributor

@maxime-rainville maxime-rainville left a comment

Choose a reason for hiding this comment

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

LGTM

@maxime-rainville maxime-rainville merged commit e7d9d1b into silverstripe:5 Jan 11, 2023
@maxime-rainville maxime-rainville deleted the pulls/5/fix-behat2 branch January 11, 2023 04:53
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.

2 participants