Skip to content

Add more data for entity components (#91) #124

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

Merged
merged 3 commits into from
Jan 1, 2020

Conversation

thibaudcolas
Copy link
Collaborator

Fixes #91, in a non-breaking way.

Entity components now have access to the following data under props['entity']:

props['entity'] = {
    'type': entity_details['type'],
    'mutability': entity_details['mutability'] if 'mutability' in entity_details else None,
    'block': block,
    'blocks': blocks,
    'entity_range': {
        'key': self.completed_entity,
    },
}

I’ve also documented the shortcomings of the current implementation in the Troubleshooting docs. Addressing this would require breaking changes so I think it’s relatively unlikely to happen.


  • Stay on point and keep it small so it can be easily reviewed. For example, try to apply any general refactoring separately outside of the PR.
  • Consider adding unit tests, especially for bug fixes. If you don't, tell us why.
  • All new and existing tests pass, with 100% test coverage (make test-coverage)
  • Linting passes (make lint)
  • Consider updating documentation. If you don't, tell us why.
  • List the environments / platforms in which you tested your changes. make test-ci

@thibaudcolas thibaudcolas added the enhancement New feature or request label Jan 1, 2020
@thibaudcolas thibaudcolas added this to the v3.0.0 milestone Jan 1, 2020
@thibaudcolas thibaudcolas merged commit 13c5ff0 into master Jan 1, 2020
@thibaudcolas thibaudcolas deleted the feature/91-entity-renderer-data branch January 1, 2020 17:57
@thibaudcolas thibaudcolas mentioned this pull request Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entity renderers should be given more data on render
1 participant