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

IsAnswered checkbox frontend attempt #30

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

Conversation

VeronicaPim
Copy link

@VeronicaPim VeronicaPim commented Oct 10, 2024

Pull Request: Composer UI Updates & Frontend Testing for NodeBB

Summary
This PR attempts to solve issue #13 and includes a significant update to the composer.tpl file within NodeBB’s frontend, aimed at improving the layout and functionality of the composer section where users create and edit posts. Additionally, this PR includes initial work on frontend testing for the composer component. However, after making these changes, NodeBB encountered severe issues during startup, which are currently being troubleshooted. Despite multiple attempts to resolve the issue, including consulting with a TA during office hours, the problem persists.


Key Changes:

  1. Composer.tpl File Edits:

    • File: src/views/partials/chats/composer.tpl
    • Purpose: Updated the structure of the composer UI to provide better usability for users creating or editing posts. Changes include:
      • Textarea: Adjustments to the input area where users type their posts, ensuring it is more user-friendly and has appropriate spacing.
      • Buttons and Icons: Updated the layout for upload and send buttons to make them more accessible and intuitive.
      • Action Buttons: Streamlined the actions for replying, canceling, and uploading to better fit within the UI and improve interaction flow.
    • Result: The changes were intended to enhance the overall user experience when composing messages within the NodeBB interface. However, after implementing these changes, NodeBB failed to start.
  2. Frontend Testing for Composer Component:

    • Frontend Tests Added: I added frontend testing to ensure the functionality of the updated composer UI. These tests were meant to verify:
      • That the layout renders correctly with the new changes.
      • That all buttons (upload, send, etc.) trigger the appropriate actions.
      • That the textarea behaves as expected for various input scenarios.
    • Challenges: After adding the tests, NodeBB encountered significant errors during startup, which led to the system crashing.

Challenges Encountered:

  1. NodeBB Failing to Start:

    • After implementing changes to the composer template and adding tests, NodeBB failed to start, showing the message “Your NodeBB is being installed” indefinitely.
    • Console logs in the browser displayed repeated Failed to fetch errors related to the service-worker.js file, as well as multiple network request failures for service_worker.js and installer.min.js.
    • Attempts to resolve the issue during an hour-long office hour session with the TA were unsuccessful. The cause of the issue remains undetermined.
  2. Redis-Server Potential Issue:

    • There is some indication that the Redis server or database configuration may be contributing to the failure, as suggested by error logs and the office hours session.
    • Further investigation into Redis configurations and logs is needed to rule out any issues on that front.

Current Status:

  • Build Status: NodeBB is currently unable to start successfully, remaining stuck at the installation screen. Multiple fetch and service worker errors appear in the console logs.
  • Feature Status:
    • The composer.tpl changes are complete but need further testing and troubleshooting due to the current crash.
    • Frontend tests for the composer component have been written but may need revisions once the main issue is resolved.
  • Next Steps: Work will continue on debugging the issue with the help of more detailed logs and further consultation with TAs.

Steps Taken for Troubleshooting (Ongoing):

  1. Reviewed composer.tpl: Verified that no syntax errors or unclosed tags were causing the issue.
  2. Reverted Changes: Temporarily reverted changes to see if the crash persists without the updates. NodeBB remains stuck in the "installing" phase.
  3. Cleared Browser Cache and Service Workers:
    • Cleared the cache and unregistered the service worker to ensure that cached resources were not causing the issue.
  4. Checked Redis/Database: Investigated the Redis server and backend configurations to identify if the error is related to the database (further investigation is ongoing).
  5. Checked NodeBB Logs:
    • Used ./nodebb log and ./nodebb dev to examine logs, revealing service worker and fetch errors.
  6. Reset NodeBB Configurations:
    • Attempted to reset NodeBB’s configuration (./nodebb reset -p), but this did not resolve the issue.
  7. Reinstalled Node Modules: Attempted to remove and reinstall node_modules to rule out corrupted dependencies, with no success.
Screenshot 2024-10-10 at 11 12 17 PM

Next Steps for Debugging:

  • Continue troubleshooting the fetch and service worker errors.
  • Investigate Redis-server logs and configurations in more depth.
  • Seek additional assistance if needed after reviewing NodeBB logs and configurations.

To Reviewers:

  • The core of this PR involves updates to the composer.tpl file and the addition of frontend testing for the composer UI.
  • The PR is currently in a broken state due to NodeBB failing to start. Please review the changes to the composer component, as resolving the issues with NodeBB startup will require additional debugging efforts.
  • Any guidance on resolving the fetch and service worker errors would be greatly appreciated.

Testing Instructions (When NodeBB is Running):

  1. Checkout the failing-frontend branch.
  2. Run npm install and then start NodeBB (./nodebb start or ./nodebb dev).
  3. Review the composer interface by navigating to a post and attempting to create or edit content.
  4. Test the buttons (upload, send, cancel) and the textarea functionality.

Copy link

@eunseokk eunseokk left a comment

Choose a reason for hiding this comment

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

It says there are some issues with the redis-server? If you want to check on that!

@VeronicaPim VeronicaPim changed the title Failing frontend **EDIT THIS** IsAnswered checkbox frontend attempt Oct 11, 2024
@VeronicaPim VeronicaPim self-assigned this Oct 11, 2024
@ericlin2 ericlin2 added this to the Sprint 2 milestone Oct 11, 2024
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.

3 participants