Giter VIP home page Giter VIP logo

3box-comments-react's Introduction

3Box Logo

Welcome to 3Box Labs!

Twitter Follow Discord

3Box Labs is a Web3 product studio that creates software to advance a more open, safe, and collaborative web. We are the inventors and a core maintainer of Ceramic, a decentralized network for composable data. Permissionless data composability will inevitably network all of the information on the web, transform the way we build applications, and connect users to their data, and each other, in new and exciting ways. To learn more about 3Box Labs, visit https://3boxlabs.com/.

Getting Started

๐Ÿ‘ค Visit Ceramic Network to build applications with composable data.

๐Ÿ’ฌ Join Ceramic Community Discord to chat with the core team and developer community

๐Ÿ‘ฉโ€๐Ÿ’ป Explore our blog to learn more about Ceramic, comopsable data and Web3 - and sign up for our newsletter.

3box-comments-react's People

Contributors

flexdinesh avatar michaelsena avatar oed avatar paullecam avatar sadarshannaiynar avatar think-in-universe avatar tibetsprague avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

3box-comments-react's Issues

"Failed to compile" error with node-sass

Steps to reproduce

  1. Create a react application with create-react-app
  2. Install 3box-comments-react
  3. Import it in some file

Result:

./node_modules/3box-comments-react/lib/index.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-5-3!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-5-4!./node_modules/3box-comments-react/lib/index.scss)
To import Sass files, you first need to install node-sass.
Run `npm install node-sass` or `yarn add node-sass` inside your workspace.

Looking into node_modules/3box-comments-react/lib/index.js I noticed a require("./index.scss") so I guess the problem is webpack not properly creating the build. Weird, since the sass-loader seems to be used correctly in Webpack's config.

I guess (but didn't try it) that this can be solved by configuring sass in the app that uses this component, but I think this should be fixed in the library.

[900 DAI] Improve 3Box Comments Plugin ๐Ÿ’ฌ: Make 3Box Comments more social with Replies, Reactions, and Upvotes

Comments Plugin Upgrade / Make 3Box Comments more social with Replies, Reactions, and Upvotes

Prize Bounty

900 DAI

Challenge Description

Enhance the 3Box Comments react plugin by adding social features including replies, reaction emojis and upvotes/downvotes. These features will bring improved socailbility, not just to 3Box, but instead to every dapp that uses the plugin. We are looking for a submission that only makes changes to the plugin. There is no need to alter the 3Box Threads API used by the plugin.

Guidance:
It is not possible to alter another persons comment in a thread. To complete this bounty, it will be necessary to create the response (comment, reaction emoji or upvote/downvote) and append it as a new item to the thread. The response should include a reference to the original comment or post. We would only like to allow 2 levels of nested replies - i.e. you can reply to a comment, and reply to a reply. The react component can then filter the thread to display the response in relation to its origin comment.

Resources

Discord Chat for support: https://discord.gg/VSG5NnY

Documentation: https://docs.3box.io/build/plugins/comments

Demo: https://3box.github.io/3box-comments-react/examples/dist/

Submission Requirements

  • Open source code in the form a PR forked from our [Comments Plugin repo](https://github.com/3box/3box-comments-react](https://github.com/3box/3box-comments-react)
  • PR should include a description of your solution and the schemas you implemented for the various response types
  • A hosted, working demo of the plugin, similar to the demo linked above
  • Support for all major web3 enabled browsers
  • Share your submission in our Discord in the Comments channel
  • Add the label Gitcoin Global Communities Hackathon to your PR
  • Comments plugin currently works in both Javascript and Typescript projects, this improvement should maintain compatibility

Submission Deadline

December 17th 2019

Judging Criteria

Once the hackathon has finished, we will judge the submission on the following criteria:

Working Demo: We will be looking for a working and performant demo. This can be hosted on github pages, netifly or any location that we can access.

Intuitive User Experience: We are looking for submissions that most mirror the experience users are familiar with, and the experience that already exists in the component. Delighting the users is also important, but only after functionality is achieved.

Code Review: Submissions which meet our requirements in terms of UX, design and performance will be code reviewed by the 3Box team. We are looking for clean, easy to read code.

Winner Announcement Date

20th December at the latest

Typescript support

Doesn't seem to support Typescript, no index.d.ts file present...
Also tried via npm i @types/3box-comments-react ... but got 404
Please add this ASAP!
Should be quick :)

how to abort loginFunction?

When the user declines to login, or there occurs any kind of error, in the loginFunction callback, we need to behave gracefully. However, what happens is that you show a neverending spinny icon:

image

And there is a console error:

image

How can we abort more gracefully?

crashes when currentUser3BoxProfile is cleared

Using "3box-comments-react": "^3.0.1"

This line:

const updatedProfilePicture = currentUser3BoxProfile.image ? `https://ipfs.infura.io/ipfs/${currentUser3BoxProfile.image[0].contentUrl['/']}`

is triggering this exception:

TypeError: Cannot read property 'image' of null
instrument.ts:129
message:"Cannot read property 'image' of null"
stack:"TypeError: Cannot read property 'image' of null
at Input.render (webpack-internal:///./node_modules/3box-comments-react/lib/components/Input.js:331:58)

STEPS:
I'm not sure if I have narrowed this down to the smallest possible conditions.

<ThreeBoxComments
            [irrelevant attributes]
            box={a 3Box instance}
            currentUserAddr={a valid account address}
            currentUser3BoxProfile={a valid 3Box user profile}
          />
<ThreeBoxComments
            [irrelevant attributes]
            box={undefined}
            currentUserAddr={undefined}
            currentUser3BoxProfile={undefined}
          />

RESULT: crash
EXPECT: no crash

Trouble updating to latest version

I've been stuck for quite a while trying to update from v0.0.8 to v3.0.5. The general behaviour I receive is the number of comments loading, but the comments themselves failing to load and comment submission hangs forever.

After trying to submit a comment I receive the following error in the console: Uncaught (in promise) TypeError: Cannot read property 'hash' of undefined. Additionally, I've also received the following error on load: InitalizationError: Must provide a location for the database

I am running [email protected], and I've tried clearing all dependencies and reinstalling them to no avail.

For more info, and code, please see: protofire/omen-exchange#1064

loginFunction never getting called

I am unable to get loginFunction to fire, no matter what set of props I pass in to the ThreeBoxComments component.

This means I will need to hide the comments until users click some kind of login to 3box button which is not ideal.

Build fails with Parcel

Hi, I'm currently having a problem using this package with parcel.

Since I'm not sure what's the real issue, I also opened an issue in parcel repo as well.

I created a repo with a minimum reproducible example of the problem:
https://github.com/hbarcelos/3box-comments-issue

Could you just use webpack, since it already works there?
Yes, I could, however I am already too invested in parcel for this particular app. I would rather avoid the webpack configuration hell if possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.