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

Refactor Comment #4874

Merged
merged 28 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
93d13b6
Refactored
Tishasoumya-02 Jun 14, 2023
2af7020
prettier
Tishasoumya-02 Jun 14, 2023
831313c
/news
Tishasoumya-02 Jun 15, 2023
c094953
Merge branch 'master' of https://github.com/plone/volto into comment-…
Tishasoumya-02 Jun 15, 2023
08537e7
Prettier & propTypes
Tishasoumya-02 Jun 15, 2023
76136a5
Merge branch 'master' of https://github.com/plone/volto into comment-…
Tishasoumya-02 Jun 20, 2023
3e2ad3f
Restore test,add doca to hook,remove unecessary proptypes
Tishasoumya-02 Jun 20, 2023
e36548b
Remove Proptypes
Tishasoumya-02 Jun 20, 2023
30286c5
Merge branch 'master' of https://github.com/plone/volto into comment-…
Tishasoumya-02 Jul 5, 2023
23d3b12
useSelector in the component
Tishasoumya-02 Jul 5, 2023
ed7c30e
dependency array update
Tishasoumya-02 Jul 5, 2023
b25e25e
Merge branch 'master' into comment-refactor
nileshgulia1 Jul 10, 2023
22db975
hide reply
Tishasoumya-02 Jul 11, 2023
c880531
Prettier
Tishasoumya-02 Jul 11, 2023
7f03cf3
Merge branch 'master' of https://github.com/plone/volto into comment-…
Tishasoumya-02 Jul 11, 2023
2627036
Merge branch 'comment-refactor' of https://github.com/plone/volto int…
Tishasoumya-02 Jul 11, 2023
53a6e13
Merge branch 'master' of https://github.com/plone/volto into comment-…
Tishasoumya-02 Jul 13, 2023
3c7207d
Merge branch 'master' into comment-refactor
Tishasoumya-02 Jul 31, 2023
f455a94
Merge branch 'master' of https://github.com/plone/volto into comment-…
Tishasoumya-02 Aug 1, 2023
2fd761a
Storybook test
Tishasoumya-02 Aug 1, 2023
5d90585
Merge branch 'comment-refactor' of https://github.com/plone/volto int…
Tishasoumya-02 Aug 1, 2023
0f19a18
Prettier storybook:
Tishasoumya-02 Aug 1, 2023
b8f71b7
Merge branch 'master' of https://github.com/plone/volto into comment-…
Tishasoumya-02 Aug 9, 2023
01f3e29
story updated
Tishasoumya-02 Aug 9, 2023
ec9bab9
prettier
Tishasoumya-02 Aug 9, 2023
54e0bb6
story update
Tishasoumya-02 Aug 10, 2023
da1fbfa
Merge branch 'master' into comment-refactor
nileshgulia1 Aug 14, 2023
5306c5e
fix: hideReply state on nested comments
nileshgulia1 Aug 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/4074.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Refactor Comment -@Tishasoumya-02
84 changes: 84 additions & 0 deletions src/components/theme/Comments/Comment.stories.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { injectIntl } from 'react-intl';
import React from 'react';
import CommentsComponent from './Comments';
import { RealStoreWrapper as Wrapper } from '@plone/volto/storybook';

const IntlCommentsComponent = injectIntl(CommentsComponent);

function StoryComponent(args) {
return (
<Wrapper
customStore={{
comments: {
items: [
{
'@id': 'someurl',
comment_id: '1614094601171408',
...args,
is_deletable: true,
is_editable: true,
can_reply: true,
},
],
permissions: {
view_comments: true,
can_reply: true,
},
add: {
loading: false,
loaded: true,
},
delete: {
loading: false,
loaded: true,
},
update: {
loading: false,
loaded: true,
},
},
intl: {
locale: 'en',
messages: {},
},
}}
>
<div id="toolbar" style={{ display: 'none' }} />
<IntlCommentsComponent {...args} />
</Wrapper>
);
}

export const CommentsModal = StoryComponent.bind({});
CommentsModal.args = {
author_name: 'admin',
creation_date: '2017-11-06T19:36:01',
text: { data: 'Plone 6' },
};
export default {
title: 'Public components/Comments/Comments Modal',
component: CommentsComponent,
decorators: [
(Story) => (
<div className="ui segment form attached" style={{ width: '400px' }}>
<Story />
</div>
),
],
argTypes: {
creation_date: {
control: 'date',
description: 'Date comment was created',
},
author_name: {
control: 'text',
description: 'Comment author name',
},
text: {
data: {
control: 'date',
},
description: 'Comment text',
},
},
};
Loading