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

Added custom 'Resources' button to CMU Quickstart theme (testing) and implemented API route #41

Merged
merged 5 commits into from
Oct 20, 2024

Conversation

rmmahmou
Copy link

@rmmahmou rmmahmou commented Oct 7, 2024

note: this is the final pull request but please refer back to the previous 'failed' pull requests of better commit messages that meet the guidelines. This pull request generally used all previous attempts that why there are less commit messages in it.

this pull request resolves issue #58

This pull request includes the following changes:
Cloned the CMU Quickstart theme into the node_modules directory and renamed it as "testing."
Updated the NodeBB admin panel to use the "testing" theme.
Added a partial in the theme to display the "Resources" button.
Created and pushed the modified theme to the GitHub repository: rmmahmou/nodebb-theme-testing.
Updated install/package.json to use the modified theme from the GitHub repository.
Modified the OpenAPI schema by adding the /api/resources-button route:
public/openapi/read.yaml
public/openapi/read/resources-button.yaml
Updated the API controller to handle the /api/resources-button endpoint in src/controllers/resources-button.js to return a JSON response.
Modified the index routes in src/routes/index.js to include the new /resources-button route.
Created a template to render the "Resources" button in src/views/resources-button.tpl.

Files Changed:
install/package.json: Added the new theme as a dependency.
public/openapi/read.yaml: Registered the new API route /api/resources-button.
public/openapi/read/resources-button.yaml: Documented the new route with response details.
src/controllers/resources-button.js: Created a new controller to handle the route and return a JSON response.
src/routes/index.js: Added the new route for /resources-button.
src/views/resources-button.tpl: Created the view for rendering the "Resources" button page.

Testing:
Verified that the "Resources" button renders properly in the theme.
Ensured that the /api/resources-button endpoint returns the expected JSON response ({ message: 'Resources button data retrieved successfully' }).

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11308638728

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 82.759%

Totals Coverage Status
Change from base Build 11059941294: 0.01%
Covered Lines: 22363
Relevant Lines: 25607

💛 - Coveralls

@rmmahmou rmmahmou merged commit c104c9a into f24 Oct 20, 2024
1 check passed
@rmmahmou rmmahmou changed the title Made changes to a duplicated theme Added custom 'Resources' button to CMU Quickstart theme and implemented API route Oct 20, 2024
@rmmahmou rmmahmou self-assigned this Oct 20, 2024
@Hakaabi Hakaabi self-requested a review October 20, 2024 18:53
@Hakaabi Hakaabi added this to the Sprint 2 milestone Oct 20, 2024
@rmmahmou rmmahmou changed the title Added custom 'Resources' button to CMU Quickstart theme and implemented API route Added custom 'Resources' button to CMU Quickstart theme (testing) and implemented API route Oct 20, 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