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

Migrating the Project to Astro + tweaking #118

Merged
merged 58 commits into from
Sep 20, 2024
Merged

Migrating the Project to Astro + tweaking #118

merged 58 commits into from
Sep 20, 2024

Conversation

yjose
Copy link
Member

@yjose yjose commented Sep 11, 2024

What does this do?

Migrate the project to Astro instead of Gatsby.js. This is primarily because the dependencies are outdated, and the project was using JavaScript, which is challenging to refactor. Additionally, Gatsby.js is no longer actively maintained.

Road Map

  • Migrate report rendering
  • Migrate chart logic and calculations to TypeScript with tests
  • Work on the Playground and fix issues with the old implementation
  • Make the Playground mobile-friendly
  • Tweak the home screen
  • Switch hosting to Cloudflare instead of Netlify, as Cloudflare allows the team to manage the website ( apprently we can't as cloudflare does not support some node api required by firebase admin)
  • Migrate survey form submissions
  • Add tests to survey from
  • Add captcha validation while creating session for new submissions
  • Allow user to add custom value for question that accept others as option
  • Add test running to the CI

Result

Here is the link to follow the migration : https://deploy-preview-118--stateofdev.netlify.app/

@geeksblabla geeksblabla deleted a comment from netlify bot Sep 11, 2024
Copy link

github-actions bot commented Sep 16, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 31.05% 468 / 1507
🔵 Statements 31.05% 468 / 1507
🔵 Functions 44.44% 20 / 45
🔵 Branches 79.28% 111 / 140
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
astro.config.mjs 0% 0% 0% 0% 1-20
tailwind.config.mjs 0% 0% 0% 0% 1-50
src/website.ts 0% 0% 0% 0% 1-2, 4-17, 20-21, 24-32
src/actions/index.ts 0% 0% 0% 0% 1-3, 5-9
src/actions/init-session.ts 0% 0% 0% 0% 1-6, 8-15, 17-26, 29-36, 39-54, 56, 58-61, 64-77
src/actions/remove-session.ts 0% 0% 0% 0% 1, 3-8, 10-14
src/actions/submit-answers.ts 0% 0% 0% 0% 1-5, 7-16, 18-23, 25-33, 35-44
src/components/chart/bar-chart.tsx 0% 0% 0% 0% 1, 4-15, 28-29, 31-51, 53-59, 61-73, 75-79, 81-88, 90, 92-93, 95-118, 120-133, 136-138, 140, 142-143, 145-147, 150-155, 157-169, 171-183, 185
src/components/chart/chart-actions.tsx 0% 0% 0% 0% 1-2, 4, 10-18, 20, 22-25, 28-38, 40-46, 48-55, 57-58, 60
src/components/chart/chart.tsx 0% 0% 0% 0% 1-5, 17-25, 27, 29-32, 34-37, 39-41, 43
src/components/chart/data.ts 93.1% 100% 0% 93.1% 44-45
src/components/chart/pie-chart.tsx 0% 0% 0% 0% 1, 4-15, 21-27, 33-38, 40-42, 44, 46-61, 63-64, 66-67, 69, 71-72, 74-76, 78, 80-94, 96-114, 116
src/components/chart/share-buttons.tsx 0% 0% 0% 0% 1, 8-9, 11-15, 17-22, 24-31, 33-38, 40-47, 49-54, 56-63, 65-70, 72-78, 80-89, 91-95, 97, 99-101, 103
src/components/chart/utils.ts 95.91% 90% 80% 95.91% 89-90, 164-165
src/components/playground/filters-options.tsx 0% 0% 0% 0% 1-2, 4, 12-13, 15-21, 23-25, 27-42, 44-54, 56-62, 64-78, 80-99, 101-102, 104, 106-112, 114-118, 120-125, 127-129, 131-132
src/components/playground/index.tsx 0% 0% 0% 0% 1-2, 7-10, 12-14, 16-33, 35-53, 55, 57, 59-61, 63, 65-69
src/components/playground/playground-form.tsx 0% 0% 0% 0% 1-2, 4-6, 8, 22-41, 43-44, 51-56, 58-61, 63-77, 79-81, 83-87, 89-97, 99-104, 106-107, 110-114, 116-124, 126-132, 134-135, 138, 141-145, 147-155, 157-163, 165-168, 170-171
src/components/survey/question.tsx 100% 81.25% 100% 100%
src/components/survey/section.tsx 98.75% 97.5% 100% 98.75% 168-169
src/components/survey/survey-form.tsx 100% 100% 100% 100%
src/components/survey/utils.ts 42.85% 100% 0% 42.85% 4-5, 8-9
src/lib/captcha.ts 0% 0% 0% 0% 1-2, 4-17, 19-25
src/lib/utils.ts 0% 0% 0% 0% 1-2, 4-6
src/lib/firebase/client.ts 0% 0% 0% 0% 1-3, 5-12, 14-15
src/lib/firebase/database.ts 0% 0% 0% 0% 1-2, 5, 7, 13-15, 17-23
src/lib/firebase/server.ts 0% 0% 0% 0% 1-2, 4, 6-17, 19-23, 25
src/pages/api/init-session.ts 0% 0% 0% 0% 1-3, 5, 7-8, 11-14, 16, 18-22, 25-28, 30-32, 34-35
src/pages/api/remove-session.ts 0% 100% 100% 0% 3-8
Generated in workflow #26

@yjose
Copy link
Member Author

yjose commented Sep 20, 2024

We will merge this PR since most of the work is already completed. Additionally, we will receive a new PR, and I need to ensure that everyone starts with the new version.

@yjose yjose merged commit 70fe4f7 into master Sep 20, 2024
2 checks passed
@yjose yjose deleted the next-astro branch January 17, 2025 14:08
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.

1 participant