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

Emoji Reaction Full Feature Implementation #30

Open
wants to merge 20 commits into
base: f24
Choose a base branch
from
Open

Conversation

fdounis
Copy link

@fdounis fdounis commented Oct 20, 2024

Overview

The Emoji Reaction feature enhances user interaction within our NodeBB forum by allowing users to express their sentiments through emojis on posts. This functionality aims to foster a more engaging and expressive community environment. As part of this pull request, we:

  1. Finalised the front-end, introducing stylistic and positional changes relating to the appearance of the emoji buttons,
  2. Worked on the back-end, focusing on creating custom API routes and our own custom Emoji plugin (did not manage to make fully operational),
  3. Worked on back-end testing, creating a comprehensive testing framework, which unfortunately cannot be fully implemented until we fix the routing error.

Implemented Changes

Front-End Enhancements:

  • Revamped Design Placement: The emoji reaction buttons have been repositioned to a more accessible and intuitive location beneath each post. Previously, the three reaction buttons were scattered in arbitrary locations, which hindered user accessibility.

  • Styling Consistency: The buttons' styling has been overhauled to align seamlessly with the forum's overall design aesthetic. This includes color schemes, sizing, and hover effects to ensure a cohesive look and feel across the platform.

Back-End Development Attempts:

  • Route Configuration: Multiple attempts were made to establish custom routes to handle emoji reactions. This included creating dedicated JavaScript files and integrating custom routes within the NodeBB framework.

  • Plugin Development: A bespoke plugin was developed to manage the backend logic of emoji reactions. This plugin was then installed via the NodeBB administrative dashboard to facilitate seamless integration with the existing system.

Comprehensive Testing Suite:

  • Test Case Development: A thorough suite of back-end tests was crafted using Mocha, Chai, Supertest, and Sinon. These tests cover various scenarios, including successful reaction additions, handling of invalid reactions, authentication checks, and server error responses.

Back-End Integration Issues:

  • API Routing Conflicts: Despite extensive efforts, integrating the back-end logic with the front-end proved challenging due to persistent routing issues. These conflicts prevented the API endpoints from functioning correctly, rendering the emoji reactions non-operational.

Resource Constraints: Initially, both Talal and Filippos collaborated on the front-end components. However, resource reallocation occurred when Talal transitioned to focus on the "Marked as Solved" feature, leaving the back-end development of the emoji reactions solely to Filippos. This shift introduced delays and limited collaborative troubleshooting opportunities.

  • Underestimation of Complexity: The time required to locate and modify the correct files for both front-end and back-end implementations was significantly underestimated. The initial week was largely consumed by file discovery and setup, which impacted the subsequent development timeline.

  • Inability to Verify Tests: Due to the unresolved API routing issues, the back-end tests, while thoroughly written, could not be executed effectively. This gap prevented us from validating the robustness and reliability of the emoji reaction functionality through our test suites.

Current Status

  • Front-End: Successfully redesigned and implemented the emoji reaction buttons with enhanced accessibility and styling.
  • Back-End: Partial development completed, but API routing issues persist, preventing full integration and functionality of the emoji reactions.
  • Testing: Comprehensive back-end tests have been written but remain unverified due to the unresolved routing problems.

Next Steps

Resolve API Routing Conflicts:

  • Deep Dive into Routing Configurations: Conduct a thorough review of the custom routes implemented for emoji reactions to identify and rectify conflicts within the NodeBB framework.
  • Collaborative Troubleshooting: Reallocate team resources to facilitate joint problem-solving sessions.
  • Plugin Refinement: Refine the custom plugin to ensure compatibility with NodeBB's core functionalities and eliminate any residual integration issues.
  • Enhance Testing Suites: Complete Verification: With a functional back-end, run all existing tests to ensure they pass and accurately reflect the feature's behavior.
    Expand Test Coverage: Develop additional tests to cover edge cases and ensure the feature's robustness under various scenarios.

Connects to #11, #12 and #13.

…reaction instead of /post/3/reaction when button is clicked
…folder, with the server-side logic for handling reactions
…est/back-end directory. This file will house all tests related to the emoji reactions API endpoints.
…ccessfully added to a post. This ensures that the POST /api/post/:postId/reaction endpoint functions correctly under normal conditions
…actions. Attempting to add a reaction that is not among the predefined valid emojis (👍, ❤️, 😂) should result in a 400 Bad Request response with an appropriate error message.
…actions. The API should respond with a 403 Forbidden status and an appropriate error message when a user who is not logged in attempts to add a reaction.
… errors during reaction addition. Simulate a database error and verify that the API responds with a 500 Internal Server Error and an appropriate error message.
@fdounis fdounis added this to the Sprint2 milestone Oct 20, 2024
@fdounis fdounis self-assigned this Oct 20, 2024
Copy link

@T7alabdullah T7alabdullah left a comment

Choose a reason for hiding this comment

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

The files seem to be correct, it could perhaps be a simple syntax or formatting issue that is causing the routing issues?

Copy link

@mthani2 mthani2 left a comment

Choose a reason for hiding this comment

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

The progress on this looks great! the dum.rb conflict shouldn't be too hard to resolve but the routing issue still needs work it seems.

@mthani2 mthani2 linked an issue Oct 20, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User Story #3: Test Emoji Reactions on Answers
3 participants