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

Link decorator fixes #4742

Merged
merged 5 commits into from
Apr 20, 2018
Merged

Link decorator fixes #4742

merged 5 commits into from
Apr 20, 2018

Conversation

edmundoa
Copy link
Contributor

After merging #4669, I realised that there were a couple of problems left:

  • Fields decorated with decorators other than LinkFieldDecorator threw an error, as we used the in decorator to see if we needed to render a link for them, but that operator is only available in objects. I fixed that condition in here, to ensure it works in other decorated fields
  • Fields using the LinkFieldDecorator were not decorated when being rendered in the message table, as the logic to decorate the field was in the message details. To fix this, I moved the logic up the component tree, and used the already existing renderForDisplay function to render the field

screen shot 2018-04-19 at 18 04 05

Edmundo Alvarez added 5 commits April 19, 2018 17:26
The `in` operator is not available for all types, and can make the
condition throw an error.
Fixing a linting error
Preparing for the changes to come
This will help us to check if a field was decorated without passing
around functions.
Move logic decorating message to MessageTableEntry, and apply the same
logic to the message details.
@edmundoa edmundoa added this to the 3.0.0 milestone Apr 19, 2018
@edmundoa
Copy link
Contributor Author

The linting errors are not related to the changes, so I'll leave them be to not add more noise in here.

Copy link
Member

@kmerz kmerz left a comment

Choose a reason for hiding this comment

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

LGTM and tested!

@kmerz kmerz merged commit 3b2efc6 into master Apr 20, 2018
@kmerz kmerz deleted the link-decorator-leftovers branch April 20, 2018 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants