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

feat: discussions comments and user/discussions api #91

Merged
merged 8 commits into from
Mar 16, 2022

Conversation

mabdh
Copy link
Member

@mabdh mabdh commented Mar 11, 2022

No description provided.

@mabdh mabdh self-assigned this Mar 11, 2022
@mabdh mabdh linked an issue Mar 11, 2022 that may be closed by this pull request
@mabdh mabdh force-pushed the discussions-comments branch 2 times, most recently from 64e4082 to f650802 Compare March 11, 2022 08:42
@mabdh mabdh changed the title feat: discussions comments feat: discussions comments and user/discussions api Mar 11, 2022
@mabdh mabdh linked an issue Mar 11, 2022 that may be closed by this pull request
@mabdh mabdh requested a review from StewartJingga March 11, 2022 08:53
@mabdh mabdh added the enhancement New feature or request label Mar 11, 2022
@mabdh mabdh marked this pull request as ready for review March 11, 2022 10:30
@mabdh mabdh force-pushed the discussions-comments branch 2 times, most recently from 37f3952 to d777014 Compare March 14, 2022 10:12
@mabdh mabdh force-pushed the discussions-comments branch from d777014 to 8626392 Compare March 14, 2022 11:17
Copy link
Contributor

@StewartJingga StewartJingga left a comment

Choose a reason for hiding this comment

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

Should we put comment in discussion package as it fully depends on discussion. We can also refer is as discussion.Comment.

Wdyt?

@mabdh
Copy link
Member Author

mabdh commented Mar 15, 2022

@StewartJingga I think better to keep it in its own package. Even if it is fully dependent, would that be a problem?

My concern is, we need to have discussion.DiscussionRepository and discussion.CommentRepository instead of discussion.Repository alone.

@mabdh mabdh requested a review from StewartJingga March 15, 2022 07:57
@StewartJingga
Copy link
Contributor

@StewartJingga I think better to keep it in its own package. Even if it is fully dependent, would that be a problem?

My concern is, we need to have discussion.DiscussionRepository and discussion.CommentRepository instead of discussion.Repository alone.

We can still keep discussion.Repository since the package name is discussion. Also we might not even need discussion.CommentRepository, we could have AddComment() method on discussion.Repository.

My concerns are:

  1. Having comment as its own package could give a wrong impression that it is a standalone feature while it is not.
  2. Having it under a discussion makes sense because they are the same domain and the hard dependency proves that.
  3. Lastly (this is personal preference, can be ignored), discussion and comment are one feature and it feels good to know that we can port discussion feature to other codebase/module with just moving one folder (package/module).

@mabdh
Copy link
Member Author

mabdh commented Mar 15, 2022

Having comment as its own package could give a wrong impression that it is a standalone feature while it is not.

It wouldn't really matter whether it is standalone feature or not right? We better keep the domain as granular as possible. I don't think combining comment inside discussion would matter that much.

Having it under a discussion makes sense because they are the same domain and the hard dependency proves that.

Yes it does make sense but again I don't think having hard dependency would really matter here

Lastly (this is personal preference, can be ignored), discussion and comment are one feature and it feels good to know that we can port discussion feature to other codebase/module with just moving one folder (package/module).

I agree on this. But it is also would make it easier to copy comment package if we need comments feature only in other use cases.

Anyway, let me try updating it according to your sugggestion.

@mabdh mabdh force-pushed the discussions-comments branch from 88b3bca to 2bc8a0f Compare March 15, 2022 11:09
@mabdh
Copy link
Member Author

mabdh commented Mar 15, 2022

@StewartJingga comments moved to the discussion package, please review it again stew 🙏

@mabdh mabdh requested a review from StewartJingga March 16, 2022 02:57
Copy link
Contributor

@StewartJingga StewartJingga left a comment

Choose a reason for hiding this comment

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

Small issue on swagger file

@mabdh mabdh force-pushed the discussions-comments branch from 7a7e397 to 83185bb Compare March 16, 2022 06:26
@mabdh mabdh requested a review from StewartJingga March 16, 2022 06:27
Copy link
Contributor

@StewartJingga StewartJingga left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for also removing old lineage api from swagger

@StewartJingga StewartJingga merged commit 1aaa0ed into main Mar 16, 2022
@StewartJingga StewartJingga deleted the discussions-comments branch March 16, 2022 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: user/discussions API feat: comments of a discussion
2 participants