Allow for emoji reactions to user posts in frontend access dev #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes, Pull Request: Add Emoji Reactions to User Posts
This pull request attempts to implement emoji reactions for user posts in the NodeBB Bluesleep project. The goal is to allow users to select and react to posts using a predefined set of emojis, displayed in an intuitive and responsive UI. Despite passing tests, several challenges and significant issues were encountered during the implementation, which are detailed below.
Context
As part of the feature request outlined in Issue #18, the task was to make emoji reactions available for posts. The acceptance criteria specified that emojis should be presented in an intuitive, functional, and responsive manner within the NodeBB user interface (UI).
Commits Overview
Initial Attempts - Adding Emoji Reactions:
.tpl
files, attempting to integrate emoji reactions within the post interface.node_modules
. Most of these changes were unintended, affecting dependencies rather than feature logic, which indicated that something was fundamentally wrong with this approach.Fixes - Reverting and Troubleshooting:
.tpl
files and attempted to fix the system. This involved restoring theadd-reaction.tpl
to its original state, which is controlled by NodeBB’s plugin system.Subsequent Fixes and Adjustments:
add-reaction.tpl
.Challenges Encountered
Editing .tpl Files:
reactions.tpl
andadd-reaction.tpl
files led to significant failures (44,000+ errors), primarily because these files were tightly coupled with NodeBB’s plugin system. After reviewing the system, it became clear that the emoji reactions implementation was more complex than anticipated, possibly requiring plugin customization rather than direct.tpl
file changes.Unintended Dependency Changes:
node_modules
during the process. This led to thousands of file changes that were unrelated to the feature implementation and bloated the PR. I reverted these changes, but they caused delays in understanding the root issue.Test Suite Passing Without Full Functionality:
Current Status
Next Steps
Manual Testing and Further Debugging:
Although the tests are passing, I recommend performing manual testing to confirm that the emoji reactions feature is indeed functional (as I encountered failures that the tests didn’t catch).
Investigate Plugin-Based Implementation:
Since NodeBB heavily relies on its plugin architecture, it may be more appropriate to implement emoji reactions through a plugin rather than modifying core
.tpl
files. This will ensure that changes are correctly integrated and avoid the unintended consequences of directly editing template files.Expand Test Coverage:
The current test suite does not appear to cover this specific functionality comprehensively. I propose adding integration tests that specifically target emoji reactions, ensuring that the feature works as expected and that any future regressions can be caught.
Conclusion
This PR reflects significant effort to implement emoji reactions for posts. Despite encountering numerous setbacks (particularly involving template edits and dependency issues), I have reverted the unintended changes and stabilized the build. The emoji feature is not yet functional, and I welcome feedback on potential directions for resolving the remaining issues. Specifically, I am considering a plugin-based solution and would appreciate guidance on whether this is the recommended path.
To Reviewers
Testing Instructions
To reproduce the current state:
emoji-reactions-feature
branch.npm run test
), which should pass.