-
Notifications
You must be signed in to change notification settings - Fork 48
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
Passing context or metadata into component cards/atoms #82
Comments
@decasia I believe you want to pass See: https://github.com/bustlelabs/mobiledoc-kit/blob/master/CARDS.md |
ah, grand. Thanks! |
Hi @mixonic, I checked into this a bit more and it looks like there are a couple of changes that we'd need in ember-mobiledoc-editor in order to use the options hash in an Ember atom/card component. Basically, to get the end user's
I've tested this myself in this branch and it seems to work well. Would you be amenable to seeing this as a PR? I'd be happy to add unit tests. |
@decasia that change seems totally reasonable to me- would be great to have in a PR with some tests 😄 Please tag me on the PR to review! |
I'd like to be able to pass some arbitrary metadata about a mobiledoc down into the Ember components that render cards and/or atoms. Is there any good way to do this at the moment?
Here's a use case: I have some metadata about a mobiledoc's author. I'd like to refer to this in building the payload for certain atoms.
At the moment, it seems to me that the only way to do this is to subclass the
mobiledoc-editor
component and write a custom template that passes in the additional properties here. That doesn't seem optimal to me, because there's no way to inherit a parent template and override only a subsection thereof. Among other things, it's hard for maintainability; every time the component template changed upstream, consumers would have to manually review changes to the code upstream and update...I understand if you don't want unnecessary clutter in the code, but I think it would be quite helpful to provide some way for consumers to pass context into their atom/card components. Any suggestions? (I'd be happy to provide a PR if appropriate.)
The text was updated successfully, but these errors were encountered: