-
Notifications
You must be signed in to change notification settings - Fork 0
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
[READY FOR REVIEW] Frontend for Unanswered Question Filter #19
Open
SubtoFelix
wants to merge
24
commits into
main
Choose a base branch
from
unanswered-filter-UI
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ew css class, and wrote down some tests to identify the correct template files
…ere's a reply, and create a new file for redis to show all unanswered questions
… and to categoryTopicSort in settings.tpl. Modified language file to include the unanswered questions key
…ser preference not the dropdown menu
…nd make sure the frontend work
…theme-harmony/templates/partials/category/sort.tpl, remove commented-out code from src/categories/index.js, and remove unanswered question option in validSorts in src/controllers/category.js
…et unanswered questions api completely working
…trollers and installed new jest framework reflected in package.json
…ed test/controllers/topics.js to modify formatting of output to adhere to schema expectations. changed public/openapi/read.yaml to add definition of unanswered api
…/controllers.js and deleted the created directory of test/controllers/ because it was not synced properly with other tests; also fixed all lint issues. added chai to devDependencies in package.json
…es/partials/topic-list-bar.tpl and copy nodebb-theme-harmony folder and change its name to custom-theme and link it to nodebb to get the frontend changes to work
…tpl and add route to src/routes/index.js to fetch api and render topic_list.tpl with unanswered topics
…ording to Sophia's code in src/controllers/topics.js and src/routes/api.js. And add unanswered question button functionaly in javascript in nodebb-theme-harmony/templates/partials/topic-list-bar.tpl and custom-theme/templates/partials/topic-list-bar.tpl
…ed.js since it's not needed for testing anymore
…rc/posts/create.js, and src/topics/create.js. Modified test version in package.json
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📝 Context
This PR introduces the unanswered question feature in the UI of NodeBB.
With the unanswered questions button added to the database, the users can filter questions to only unanswered ones. With this feature added, the TA/instructor will have an easier time prioritizing which students' questions still need to be answered.
✅ Changes in Codebase
Modified: nodebb-theme-harmony/templates/partials/topic-list-bar.tpl
Modified: custom-theme/templates/partials/topic-list-bar.tpl
Modified: package.json
Create: custom-theme folder (all content same as nodebb-theme-harmony)
Modified: nodebb-theme-harmony/templates/partials/topic-list-bar.tpl
Modified: custom-theme/templates/partials/topic-list-bar.tpl
🧠 Summary of Changes
The unanswered button UI is created next to the Recently Replied Sort Dropdown Menu alongside other filter options in the filter bar. Added a script that implements client-side functionality to filter and display only questions that are unanswered when a user clicks the button. This script essentially replaces a full page load with an AJAX-based update that only refreshes the topics list.