Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Render saved comments in Browse mode - #1102

Merged
kumar303 merged 1 commit into
mozilla:masterfrom
kumar303:render-comments-713
Oct 8, 2019
Merged

Render saved comments in Browse mode#1102
kumar303 merged 1 commit into
mozilla:masterfrom
kumar303:render-comments-713

Conversation

@kumar303

@kumar303 kumar303 commented Oct 3, 2019

Copy link
Copy Markdown
Contributor

Fixes #713

The CommentList component gets rendered for every single line in a file. If that line doesn't have comments, it renders null. CommentList will lazily dispatch a loader (a thunk) once. I think performance-wise it's fine because nothing gets dispatched until the thunk starts running and the thunk returns early in case a load is in progress.

I chose to put the loader here only because this is the component that depends on comments. In the future, more components might depend on loaded comments so we could move it to a shared <WithLoadedComments> provider or something.

@codecov-io

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@431190a). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1102   +/-   ##
=========================================
  Coverage          ?   98.02%           
=========================================
  Files             ?       59           
  Lines             ?     2030           
  Branches          ?      519           
=========================================
  Hits              ?     1990           
  Misses            ?       30           
  Partials          ?       10
Impacted Files Coverage Δ
src/components/CommentList/index.tsx 100% <100%> (ø)

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 431190a...fb7fc13. Read the comment docs.

@willdurand willdurand self-assigned this Oct 7, 2019
@kumar303

kumar303 commented Oct 7, 2019

Copy link
Copy Markdown
Contributor Author

@willdurand not a rush but if you have some time to look, I'd like to get this in the tag tomorrow.

@willdurand willdurand left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

r+, thanks

@kumar303
kumar303 merged commit ed6a4a2 into mozilla:master Oct 8, 2019
@kumar303
kumar303 deleted the render-comments-713 branch October 8, 2019 14:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Render saved draft comments for files, inline

3 participants