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

Render display name in new annotations #545

Merged
merged 2 commits into from
Sep 15, 2017

Conversation

robertknight
Copy link
Member

Depends on #541

Initialize the user_info field for new annotations

Populate the user_info field for new annotations from the logged-in
user's profile. This enables new annotation cards to render the user's
display name instead of their username if they have set one.

This logic is currently in the annotation component init function for
consistency with how the user field is initialized. However, it really
ought to be in the code that handles the addAnnotations Redux action.

If the display name is provided by the server in the annotation's
`user_info` field, render it instead of the username in annotation card
headers.
Populate the `user_info` field for new annotations from the logged-in
user's profile. This enables new annotation cards to render the user's
display name instead of their username if they have set one.

This logic is currently in the annotation component init function for
consistency with how the `user` field is initialized. However, it really
ought to be in the code that handles the `addAnnotations` Redux action.
@codecov
Copy link

codecov bot commented Sep 14, 2017

Codecov Report

Merging #545 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #545      +/-   ##
==========================================
+ Coverage   90.93%   90.96%   +0.02%     
==========================================
  Files         136      136              
  Lines        5428     5432       +4     
  Branches      946      948       +2     
==========================================
+ Hits         4936     4941       +5     
+ Misses        492      491       -1
Impacted Files Coverage Δ
src/sidebar/components/annotation.js 88.63% <100%> (+0.05%) ⬆️
src/sidebar/components/annotation-header.js 85.18% <100%> (+6.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ad4237...e1ff4b8. Read the comment docs.

@sheetaluk sheetaluk merged commit ac34082 into master Sep 15, 2017
@sheetaluk sheetaluk deleted the use-profile-display-name-for-new-anns branch September 15, 2017 01:52
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.

2 participants