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

Add parent components and data property for components that reference data.js Issue#86 #173

Closed
wants to merge 2 commits into from
Closed

Add parent components and data property for components that reference data.js Issue#86 #173

wants to merge 2 commits into from

Conversation

davidcilley
Copy link

This pull request is an attempt to create all of the original emoji-mart component behavior, while decoupling it from the large dataset contained in data.js.

This adds a parent-like component prefixed with "Nimble" for the following objects:
Picker, Category, Emoji, Preview, Search

The parent components now have a required data property so that a partial or changed version of the original data.js output can be used. The child components pass the original data.js output to maintain backwards compatibility.

This also updates several of the util methods to allow for data passage. One possible breaking change, "emoji-index.js" now has an instanced version of the original globals, and uses a new instance of NimbleEmojiIndex with data.js as it's input. Maybe this addresses PR #172 ?

I attempted to keep data.js from being referenced throughout all of the new Nimble components, but in my test app, WebPack was still outputting the original data, even though I was referencing the components directly. This may still need some tweaking to fully address Issue #86

Unfortunately, I couldn't find a way to keep backwards compatibility, without moving all of the original code to the parent Nimble objects. This will remove a lot of the original git history (unless someone has a better idea!)

@vcervellera-turbulent
Copy link

👋
Thanks for mentioning the PR I opened, I just tested yours to see if it was patching our issue, and unfortunately it doesn't, there seems to be a custom emoji contamination on that PR as well.
I will create a jsfiddle to outline our issue and update my PR with it shortly, in case you want to give it a go. 🐝

@davidcilley
Copy link
Author

Sorry all, I need to close this PR and go through proper channels on my end. Got a little ahead of myself!

@EtienneLem
Copy link
Member

@davidcilley No worries, thanks for giving it a stab! Will be happy to review when you’re ready 👍

@davidcilley davidcilley deleted the davec/add-data-property branch March 13, 2018 19:18
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.

3 participants