Skip to content

Conversation

@yjose
Copy link
Member

@yjose yjose commented Nov 26, 2025

Summary

Add conditional logic to survey questions and make many questions optional to reduce survey length and improve UX.

Conditional Logic

  • Work section: Show only if user has professional coding experience (profile-q-5 ≠ 0)
  • Salary questions: Show Morocco questions (work-q-4, work-q-5) if NOT abroad, show abroad questions (work-q-6, work-q-7) if working abroad (profile-q-7)

Optional Fields

Made 12 questions optional (required: false):

  • Work: overtime, job satisfaction, unemployment, all 4 salary questions
  • Tech: 6 questions (frontend/backend frameworks, cloud, database)
  • AI: company investment

Multiple Choice

  • Learning: challenges question now multiple choice
  • Community: 2 questions changed from single to multiple ("pick 3 max")

Impact

Users without professional experience: Skip Work section (14 questions)
Users in Morocco: See 2/4 salary questions
Users abroad: See 2/4 salary questions

Changes by File

survey/1-profile.yml

  • Formatting only (remove quotes)

survey/2-learning-and-education.yml

  • learning-and-education-q-7: Added multiple: true

survey/3-work.yml

  • Section conditional: showIf: { question: profile-q-5, notEquals: 0 }
  • work-q-1, work-q-2, work-q-3: Added required: false
  • work-q-4, work-q-5: Added conditional profile-q-7 notEquals 3 + required: false
  • work-q-6, work-q-7: Added conditional profile-q-7 equals 3 + required: false
  • Formatting changes

survey/4-ai.yml

  • ai-q-4: Added required: false
  • Formatting changes

survey/5-tech.yml

  • tech-q-3, tech-q-5, tech-q-6, tech-q-7, tech-q-13, tech-q-14: Added required: false
  • Formatting changes

survey/6-community.yml

  • community-q-4, community-q-5: Changed to multiple: true, updated labels

- Move employment status back to Work section (work-q-0)
- Show Work section only for users with professional experience (profile-q-5 ≠ 0)
- Add location-based conditionals to 4 salary questions (profile-q-7)
- Reduce Profile from 10 to 9 questions

Impact:
- Users without professional experience skip Work section entirely
- Users in Morocco see 2 salary questions (MAD currency)
- Users abroad see 2 salary questions (USD currency)
- Students coding professionally still see Work section

Question IDs:
- Profile: profile-q-9 removed, now 9 questions
- Work: Employment status added as work-q-0, all questions shifted +1
- Salary conditionals on work-q-4 to work-q-7
@netlify
Copy link

netlify bot commented Nov 26, 2025

Deploy Preview for stateofdev ready!

Name Link
🔨 Latest commit 50d98a9
🔍 Latest deploy log https://app.netlify.com/projects/stateofdev/deploys/692d7bdfc39aba00083d2364
😎 Deploy Preview https://deploy-preview-148--stateofdev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Nov 26, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 31.28% 1300 / 4155
🔵 Statements 31.28% 1300 / 4155
🔵 Functions 61.7% 87 / 141
🔵 Branches 78.4% 276 / 352
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
astro.config.mjs 0% 0% 0% 0% 1-33
src/components/header.astro 0% 0% 0% 0% 1-115
src/components/home/hero.astro 0% 0% 0% 0% 1-106
src/pages/index.astro 0% 0% 0% 0% 1-5
Generated in workflow #9 for commit 50d98a9 by the Vitest Coverage Report Action

@yjose yjose merged commit 9ae1850 into master Dec 1, 2025
1 check passed
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.

2 participants