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

Reuse comment component #68

Open
Ron537 opened this issue Mar 28, 2019 · 0 comments
Open

Reuse comment component #68

Ron537 opened this issue Mar 28, 2019 · 0 comments

Comments

@Ron537
Copy link
Contributor

Ron537 commented Mar 28, 2019

The current layout of the comments component is:

<bs-comment-list>
    <bs-comment (with ngFor)>
        <!-- comment content -->
        <bs-comment-replies>
            <bs-comment-reply (with ngFor)>
                <!-- comment content -->
            </bs-comment-reply>
        </bs-comment-replies>
    </bs-comment>
</bs-comment-list>

This structure indeed fixes the circular imports problem, but there is no components reuse.

I would suggest changing the layout to:

<bs-comment-list>
    <div (with ngFor over comments)>
        <bs-comment isReply=false></bs-comment>
        <div (with ngFor over reactions)>
            <bs-comment isReply=true></bs-comment>
        </div>
    </div>
</bs-comment-list>

This way you both reuse the bs-comment component and fix the circular imports problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant