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

Update module to use react-select #113

Merged

Conversation

ScopeyNZ
Copy link
Contributor

Resolves #110

This PR implements the change requested in the above issue. I added yarn and updated all the directory structure to match what new SS4 modules usually do. This is a backwards compatible enhancements so can me released in a minor - I have set the version in package.json to 2.2.0 - for what that's worth.

I noticed the implementation on the disabled attribute on the react-select dependency isn't great - might want to look at raising an issue for that.

@ScopeyNZ
Copy link
Contributor Author

ScopeyNZ commented Jul 16, 2018

Ok Travis pointed out that I lied, I've changed the format of the suggestion API on tagfield. I could change this to be backwards compatible? For now I just updated the tests, but I can revert that if we want backwards compatibility.

@dhensby
Copy link
Contributor

dhensby commented Jul 16, 2018

master can have breaking changes, but whether it should for our internal integration effort is something we should consider. I'll leave you to weigh up the cost-benefit of keeping BC

Copy link
Contributor

@robbieaverill robbieaverill left a comment

Choose a reason for hiding this comment

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

Two minor comments, also can you remove the map files?

Regarding B/C, it would be ideal to release this as a minor update instead of a major release so if you can make it backwards compatible easily enough then I'd suggest we try and do that. If it's going to be too much effort though then we'll bite the bullet and bump it up.

return Promise.resolve({ options: [] });
}

const fetchURL = url.parse(this.props.optionUrl, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please dereference these props - lazyLoad, options and optionUrl? There's also some places in the render method that could use this too

}

.Select-menu-outer {
border-top-color: #e6e6e6;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a variable in admin somewhere we can use here?

package.json Outdated
"sass-loader": "^6.0.7"
"@storybook/addon-actions": "^3.2.19",
"@storybook/addon-options": "^3.2.19",
"@storybook/react": "^3.2.19",
Copy link
Contributor

Choose a reason for hiding this comment

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

Were you going to add a story book definition for it? That'd be cool, but not required

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was playing around with that but I didn't get around to it. I can remove that.

Copy link
Contributor

@robbieaverill robbieaverill left a comment

Choose a reason for hiding this comment

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

One more request - we need to register the TagField React component with injector so other modules can modify it if they want to

@ScopeyNZ
Copy link
Contributor Author

ScopeyNZ commented Jul 17, 2018

I removed the BC changes so this can target the next minor now 🙂

@robbieaverill robbieaverill merged commit c18690b into silverstripe:master Jul 17, 2018
@robbieaverill robbieaverill deleted the pulls/master/reactify-tags branch July 17, 2018 05:08
@pxwee5
Copy link

pxwee5 commented Sep 18, 2018

This is a backwards compatible enhancements so can me released in a minor

If it's backwards compatible, can you make the silverstripe/framework dependency abit lower than 4.3 ?

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