Add parent components and data property for components that reference data.js Issue#86 #173
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!)