Skip to content

Feat/translator UI#157

Closed
PDFour4 wants to merge 107 commits intomainfrom
feat/translator-ui
Closed

Feat/translator UI#157
PDFour4 wants to merge 107 commits intomainfrom
feat/translator-ui

Conversation

@PDFour4
Copy link
Copy Markdown

@PDFour4 PDFour4 commented Mar 26, 2026

Objective

This PR completes the Project 4 translation integration by wiring our NodeBB frontend UI directly to our deployed Python Flask microservice.

Changes Made

  • API Routing: Updated the TRANSLATOR_API constant in src/posts/summary.js (and related client scripts) to point away from localhost and route traffic to our live Linux VM at http://17313-team09.s3d.cmu.edu:5000.
  • JSON Parsing Fix: Refactored the translatorApi.translate function to properly await and extract the actual JSON variables (data.is_english and data.translated_content) returned by our Flask service, rather than returning the hardcoded placeholder strings from the starter code.
  • Code Cleanup: Removed the duplicate function declaration in the starter code that was silently overwriting the translation logic.

How to Test

Once this PR is merged and our GitHub Actions pipeline redeploys the NodeBB instance to the VM, reviewers can test the full pipeline:

  1. Navigate to our live NodeBB forum http://17313-team09.s3d.cmu.edu:4567/
  2. Create a new post containing the exact text: Dies ist eine Nachricht auf Deutsch
  3. Click the newly integrated Translate button.
  4. The post should successfully update to display: This is a German message.

Note to Reviewers

Since this relies on our Python microservice, please ensure the tmux session running the Flask app on port 5000 of our VM is active if you encounter any network timeout errors!

brendayyu and others added 30 commits February 7, 2026 21:16
- Add resolve button to post actions in topic template
- Implement client-side toggle functionality in resolve.js
- Button displays green checkmark when resolved, gray circle when unresolved
- Text shows 'Resolved' or 'Unresolved' state (hidden on mobile)
- Position button to the left of reply button in post toolbar
Attaching the backend feature for the unresolved/resolved buttons done in the frontend.
…it testing for general testing and edge casing
…when post is approved by TA/admin, done by fixing theme post list views and caching
…spring-26-yc26 into check-branch

Merging user story 2 testing coverage branch into user story 3 implementation branch, to have single final version to build off of.
US 3 Working: Supported by Instructor feature + US2 Testing
… not updating after backend change. Added timestamp and identifier of who approved a post to database. Also added more error catching to prevent page getting stuck reloading.
Need to update my branch with the main branch.
- Add viewers button to post actions for admins/TAs only
- Display eye icon with view count next to reply button
- Only visible on main post (index 0) in announcements category
- Dropdown shows list of students who viewed the announcement
- Create viewers.js module to handle viewer dropdown
- Load and display student viewers when dropdown is opened
- Generate mock viewer data for testing (backend TBD)
- Track student views in console (frontend-only)
- Only admins/TAs can see viewers, students cannot
- Import and initialize viewers module in topic.js
- Enables viewers dropdown functionality on topic pages
- Style viewer list items with hover effects
- Add dropdown shadow for better visual hierarchy
PDFour4 and others added 29 commits February 27, 2026 22:59
…4-frontend

Deleted make-anon file since it is no longer needed.
US4 frontend + backend + permissions (for post-replies & topic-replies)
Updating my main with the remote repo's main
Add Docker config for application settings
Begin build for environment since nodebb isn't starting the build
Correct spelling of env
Corrected URL for access
Removed env section so docker doesn't manually run build
Merging my main with the remote main
Adding the translation UI components
@PDFour4 PDFour4 closed this Mar 26, 2026
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

Successfully merging this pull request may close these issues.

6 participants