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

React to reactions #347

Open
petermasking opened this issue Nov 8, 2024 · 0 comments
Open

React to reactions #347

petermasking opened this issue Nov 8, 2024 · 0 comments
Assignees
Labels
domain All issues related to the business domain feature New feature or request web-ui All issues related to the web user interface

Comments

@petermasking
Copy link
Member

Currently, we can react to posts. Next, we want to enable reactions to reactions as well. For the visualization, we've considered common options like nesting and expanding, but we've decided to go with a different approach. Since reactions can take up a lot of space (especially comic reactions), we want to treat reactions the same way as posts. This means you can click on a reaction to view its responses on a separate page. From there, you can navigate back to its parent (either a post or another reaction).

Implementation

In the domain we need to modify the reaction data model. Currently, it can only be coupled to a post. In the new situation it can be coupled to either a post or a reaction.

type DataModel = BaseDataModel &
{
    readonly postId?: string; // Make optional
    readonly reactionId?: string; // Added
    /* the rest*/
};

In the web-ui we need to add some routes and components.

<Route path="/post/:postId/highlight/:highlightId" element={protect(<PostHighlight />)} />
<Route path="/reaction/:reactionId" element={protect(<ReactionDetails />)} />
<Route path="/reaction/:reactionId/highlight/:highlightId" element={protect(<ReactionHighlight />)} />

The highlight components opens a post/reaction and load the highlighted reaction similar to the current ReactionDetails implementation. Note that the first route replaces the current /post/:postId/reaction/:reactionId route. This means that the current ReactionDetails component needs to be renamed to PostHighlight. The new ReactionDetails implementation will be similar to the PostDetails component.

@petermasking petermasking added feature New feature or request domain All issues related to the business domain web-ui All issues related to the web user interface labels Nov 8, 2024
@johnmasking johnmasking self-assigned this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain All issues related to the business domain feature New feature or request web-ui All issues related to the web user interface
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants