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

Discussion tab and page #39

Merged
merged 76 commits into from
Oct 3, 2019
Merged

Discussion tab and page #39

merged 76 commits into from
Oct 3, 2019

Conversation

v-stickykeys
Copy link
Contributor

@v-stickykeys v-stickykeys commented Oct 3, 2019

Closes #10
Closes #11

Notes

This is rebased on top of the text-editor branch (https://github.com/quantfive/researchhub-web/tree/text-editor) and master branch.

Testing

  1. See # of discussion threads on the thread tab
  2. See top 20 discussion threads when you click the discussion tab
  3. Go to discussion page when you click the read button on a thread
  4. See thread and top 20 comments when the discussion page loads
  5. Submit a comment
  6. See recently added comment when you refresh the discussion page
  7. Go back to the page page on the discussion tab when you click the go back button

What code is changing?

  • DiscussionThreadCard.js is rendering smaller components
  • Paper/Tabs/DiscussionTab.js includes the url path for each thread
  • PaperTabBar.js has ui to include discussion thread count, and removes the prefetch attribute which is not required because prefetch happens by default
  • Reordered urls in config/api.js
  • Reordered icons in config/themes/icons.js
  • pages/paper/[paperId]/[tabName]/index.js gets threads and thread count from paper prop
  • Renamed shim to shims in redux/paper.js
  • tests/cypress/integration/utils/general.spec.js has more unit tests for utils

Screenshots

image

image

image

To do

  • Reply to comments
  • Share thread
  • Upvote/downvote/flag
  • Styling
  • Load more comments when clicking show more button
  • Lazy load more threads on infinite scroll

username = createUsername(discussion);
}

function renderComments(comments) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use es6 functions?

@lightninglu10
Copy link
Contributor

Brief glance at the screenshots, the spacing between elements looks off. Like the upvote bubble needs some width to it, and needs to be 19px away from the avatar image.


const DiscussionTab = () => {
const threads = [{}];
return <div>{renderThreads(threads)}</div>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have an infinite scroll here?

};

const MoreButton = () => {
// TODO: Fetch more comments
Copy link
Contributor

Choose a reason for hiding this comment

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

I think instead of having this it'd be easier to have infinite scrolling

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.

Discussion view Create discussions tab
2 participants