ONEARMY / community-platform

A platform to build useful communities that aim to tackle global problems
https://platform.onearmy.earth
MIT License
1.14k stars 388 forks source link

badge component #410

Closed BenGamma closed 5 years ago

BenGamma commented 5 years ago

Component infos

Description

A badge component to display multiple informations. Can be the status of a post or of a comment, later may for other usage.

Page related

Will be used in :

Mockup

Capture d’écran 2019-03-20 à 18 01 30

Example

An example of badge component here. from priceline design system.

Build suggestion

It contain an Icon and some text. It is displayed only when the Q&A post is marked as solved by the creator. The color will be set with the bg props and like the Button component, the glyph props could be used to define an icon.

We'll need to add a field on the discussion object is_solved.

martisj commented 5 years ago

I'll have a crack at this. @chrismclarke @BenGamma @mattia-io

PLAN

BenGamma commented 5 years ago

Hey ! If you have a crack just go for it :)

Figure out what exists in terms of differentiating between statuses? Implement a simple typescript type like tx4x suggests.

For now we can consider 3 status : OPEN | SOLVED | LOCKED.

Display the badge on the discussion post

Yes, only for Q&A type post.

Allow Post creator to mark as resolved. Only allow resolving (i.e. cannot unresolve a discussion) for now, to stay within the scope of the issue.

Yes, still need some clarification with design team thought. It is also linked to autenthication to only allow author to mark as resolve.

(optional) inform the user that this action is not undoable.

Yes make sense but I would wait for the design to be ready

Thanks @martisj :v: