Skip to content

Commit

Permalink
Merge pull request #285 from AppQuality/add-date-comments
Browse files Browse the repository at this point in the history
Add date comments
  • Loading branch information
cannarocks authored Dec 28, 2023
2 parents 68bf7db + 4e0a0fe commit 794106c
Show file tree
Hide file tree
Showing 6 changed files with 253 additions and 9 deletions.
213 changes: 213 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,216 @@
# v3.1.57 (Thu Dec 28 2023)

#### 🐛 Bug Fix

- Add refactored chat component [#284](https://github.com/AppQuality/unguess-design-system/pull/284) ([@cannarocks](https://github.com/cannarocks))
- Improve-chat-component [#283](https://github.com/AppQuality/unguess-design-system/pull/283) ([@cannarocks](https://github.com/cannarocks))

#### ⚠️ Pushed to `master`

- ci(release): trigger action ([@cannarocks](https://github.com/cannarocks))

#### Authors: 1

- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))

---

# v3.1.57 (Thu Dec 28 2023)

#### 🐛 Bug Fix

- Add refactored chat component [#284](https://github.com/AppQuality/unguess-design-system/pull/284) ([@cannarocks](https://github.com/cannarocks))
- Improve-chat-component [#283](https://github.com/AppQuality/unguess-design-system/pull/283) ([@cannarocks](https://github.com/cannarocks))

#### ⚠️ Pushed to `master`

- ci(release): trigger action ([@cannarocks](https://github.com/cannarocks))

#### Authors: 1

- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))

---

# v3.1.57 (Thu Dec 28 2023)

#### 🐛 Bug Fix

- Add refactored chat component [#284](https://github.com/AppQuality/unguess-design-system/pull/284) ([@cannarocks](https://github.com/cannarocks))
- Improve-chat-component [#283](https://github.com/AppQuality/unguess-design-system/pull/283) ([@cannarocks](https://github.com/cannarocks))

#### ⚠️ Pushed to `master`

- ci(release): trigger action ([@cannarocks](https://github.com/cannarocks))

#### Authors: 1

- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))

---

# v3.1.56 (Fri Dec 22 2023)

#### 🐛 Bug Fix

- Added missing export comments [#282](https://github.com/AppQuality/unguess-design-system/pull/282) ([@iDome89](https://github.com/iDome89) [@marcbon](https://github.com/marcbon))
- fix:added export [#281](https://github.com/AppQuality/unguess-design-system/pull/281) ([@iDome89](https://github.com/iDome89))

#### Authors: 2

- [@iDome89](https://github.com/iDome89)
- Marco Bonomo ([@marcbon](https://github.com/marcbon))

---

# v3.1.55 (Fri Dec 22 2023)

#### 🐛 Bug Fix

- add-bug-comments-components [#280](https://github.com/AppQuality/unguess-design-system/pull/280) ([@cannarocks](https://github.com/cannarocks) [@iDome89](https://github.com/iDome89))
- Bugcomments components [#279](https://github.com/AppQuality/unguess-design-system/pull/279) ([@cannarocks](https://github.com/cannarocks) [@marcbon](https://github.com/marcbon))

#### Authors: 3

- [@iDome89](https://github.com/iDome89)
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
- Marco Bonomo ([@marcbon](https://github.com/marcbon))

---

# v3.1.54 (Tue Nov 14 2023)

#### 🐛 Bug Fix

- chore(styled-components): update to 6.1.1 [#278](https://github.com/AppQuality/unguess-design-system/pull/278) ([@cannarocks](https://github.com/cannarocks))

#### Authors: 1

- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))

---

# v3.1.53 (Thu Nov 09 2023)

#### 🐛 Bug Fix

- Fix color swatch [#277](https://github.com/AppQuality/unguess-design-system/pull/277) ([@cannarocks](https://github.com/cannarocks) [@marcbon](https://github.com/marcbon) [@iDome89](https://github.com/iDome89))
- 🐛 fix(color-swatch): fix color selection bug in handleSelect function [#276](https://github.com/AppQuality/unguess-design-system/pull/276) ([@marcbon](https://github.com/marcbon))

#### Authors: 3

- [@iDome89](https://github.com/iDome89)
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
- Marco Bonomo ([@marcbon](https://github.com/marcbon))

---

# v3.1.52 (Wed Nov 08 2023)

#### 🐛 Bug Fix

- 🔀 chore(color-swatch): update import statement for ColorSwatch component [#275](https://github.com/AppQuality/unguess-design-system/pull/275) ([@marcbon](https://github.com/marcbon))

#### Authors: 1

- Marco Bonomo ([@marcbon](https://github.com/marcbon))

---

# v3.1.51 (Wed Nov 08 2023)

#### 🐛 Bug Fix

- Color swatch [#274](https://github.com/AppQuality/unguess-design-system/pull/274) ([@iDome89](https://github.com/iDome89) [@marcbon](https://github.com/marcbon))
- Color swatch [#273](https://github.com/AppQuality/unguess-design-system/pull/273) ([@iDome89](https://github.com/iDome89) [@marcbon](https://github.com/marcbon))

#### Authors: 2

- [@iDome89](https://github.com/iDome89)
- Marco Bonomo ([@marcbon](https://github.com/marcbon))

---

# v3.1.50 (Mon Oct 09 2023)

#### 🐛 Bug Fix

- release 20231009 [#272](https://github.com/AppQuality/unguess-design-system/pull/272) ([@marcbon](https://github.com/marcbon))
- Update-styled-components [#271](https://github.com/AppQuality/unguess-design-system/pull/271) ([@marcbon](https://github.com/marcbon))

#### Authors: 1

- Marco Bonomo ([@marcbon](https://github.com/marcbon))

---

# v3.1.49 (Wed Sep 13 2023)

#### 🐛 Bug Fix

- Modal responsive improvements [#270](https://github.com/AppQuality/unguess-design-system/pull/270) ([@marcbon](https://github.com/marcbon) [@cannarocks](https://github.com/cannarocks))
- 🐛 fix(modals/index.tsx): adjust styles for isExtraLarge prop in UgModal component [#269](https://github.com/AppQuality/unguess-design-system/pull/269) ([@marcbon](https://github.com/marcbon))

#### Authors: 2

- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
- Marco Bonomo ([@marcbon](https://github.com/marcbon))

---

# v3.1.48 (Mon Sep 11 2023)

#### 🐛 Bug Fix

- Responsive improvements on sentiment charts and modals [#268](https://github.com/AppQuality/unguess-design-system/pull/268) ([@marcbon](https://github.com/marcbon) [@cannarocks](https://github.com/cannarocks))
- Fixes-post-release [#267](https://github.com/AppQuality/unguess-design-system/pull/267) ([@marcbon](https://github.com/marcbon))

#### Authors: 2

- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
- Marco Bonomo ([@marcbon](https://github.com/marcbon))

---

# v3.1.47 (Mon Sep 04 2023)

#### 🐛 Bug Fix

- Sentiment chart [#266](https://github.com/AppQuality/unguess-design-system/pull/266) ([@cannarocks](https://github.com/cannarocks) [@marcbon](https://github.com/marcbon))
- Sentiment chart [#265](https://github.com/AppQuality/unguess-design-system/pull/265) ([@cannarocks](https://github.com/cannarocks) [@marcbon](https://github.com/marcbon))

#### Authors: 2

- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
- Marco Bonomo ([@marcbon](https://github.com/marcbon))

---

# v3.1.46 (Tue Aug 29 2023)

#### 🐛 Bug Fix

- Develop [#264](https://github.com/AppQuality/unguess-design-system/pull/264) ([@cannarocks](https://github.com/cannarocks))

#### Authors: 1

- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))

---

# v3.1.42 (Thu Aug 24 2023)

#### 🐛 Bug Fix

- Improve fullscreen experience of player [#263](https://github.com/AppQuality/unguess-design-system/pull/263) ([@cannarocks](https://github.com/cannarocks))
- New-player-with-old-skin [#262](https://github.com/AppQuality/unguess-design-system/pull/262) ([@cannarocks](https://github.com/cannarocks))

#### Authors: 1

- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))

---

# v3.1.4 (Wed Aug 23 2023)

#### 🐛 Bug Fix
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@appquality/unguess-design-system",
"version": "3.1.44",
"version": "3.1.59",
"description": "",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
34 changes: 29 additions & 5 deletions src/stories/chat/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Meta, StoryFn } from "@storybook/react";
import { PlaceholderOptions } from "@tiptap/extension-placeholder";
import { Editor as TipTapEditor } from "@tiptap/react";
import { Chat, ChatProvider, useChatContext } from ".";
import { Button } from "../buttons/button";
import { Col } from "../grid/col";
import { Grid } from "../grid/grid";
import { Row } from "../grid/row";
import { ChatArgs, ChatEditorArgs } from "./_types";
import { Button } from "../buttons/button";
import { ChatEditorArgs } from "./_types";
import { Comment } from "./parts/comment";
import { PlaceholderOptions } from "@tiptap/extension-placeholder";

interface EditorStoryArgs extends ChatEditorArgs {
children?: any;
Expand Down Expand Up @@ -78,15 +78,39 @@ const defaultArgs: EditorStoryArgs = {
comments: [
{
message: "Hi, I'm a comment",
date: "2021-04-20T11:00:00.000Z",
date: " | 27 dic. 2023 | 12:00",
author: {
name: "Luca C.",
avatar: "LC",
},
},
{
message: "Hi, I'm a comment too but with <strong>bold</strong>",
date: "2021-04-20T11:02:00.000Z",
date: " | 27 dic. 2023 | 12:00",
author: {
name: "Marco B.",
avatar: "MB",
},
},
{
message: "Hi, I'm a comment too but with <strong>bold</strong>",
date: " | 27 dic. 2023 | 12:00",
author: {
name: "Marco B.",
avatar: "MB",
},
},
{
message: "Hi, I'm a comment too but with <strong>bold</strong>",
date: " | 27 dic. 2023 | 12:00",
author: {
name: "Marco B.",
avatar: "MB",
},
},
{
message: "Hi, I'm a comment too but with <strong>bold</strong>",
date: " | 27 dic. 2023 | 12:00",
author: {
name: "Marco B.",
avatar: "MB",
Expand Down
10 changes: 8 additions & 2 deletions src/stories/chat/parts/comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ const AuthorContainer = styled.div`
gap: ${({ theme }) => theme.space.sm};
`;

const CommentDate = styled.span`
color: ${({ theme }) => theme.palette.grey[500]};
font-weight: ${({ theme }) => theme.fontWeights.thin};
`

const Footer = styled.div`
display: flex;
flex-direction: row;
Expand All @@ -42,15 +47,16 @@ export const Comment = ({
author,
message,
children,
}: PropsWithChildren<{ author: Author; message: string }>) => {
date,
}: PropsWithChildren<{ author: Author; message: string, date:string }>) => {
return (
<CommentCard>
<AuthorContainer>
<Avatar avatarType={author.avatarType ?? "text"}>
{author.avatar}
</Avatar>
<div>
<Title>{author.name ?? "User"}</Title>
<Title>{author.name ?? "User"}<CommentDate>{date}</CommentDate></Title>
<ReadOnly>
<Editor editable={false}>{message}</Editor>
</ReadOnly>
Expand Down
1 change: 1 addition & 0 deletions src/stories/chat/parts/containers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ export const MessagesContainer = styled.div<ChatArgs>`
flex-direction: column;
gap: ${({ theme }) => theme.space.sm};
background: ${({ chatBkg }) => chatBkg ?? `#fff`};
overflow-y: auto;
`;
2 changes: 1 addition & 1 deletion src/stories/intro.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta } from '@storybook/addon-docs';

<Meta title="Overview/Intro" />

# Welcome to the amazing Unguess Design System
# Welcome to the amazing Unguess Design System

[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

Expand Down

0 comments on commit 794106c

Please sign in to comment.