Skip to content

feat: add Employee Well-Being template#3981

Merged
jobenjada merged 3 commits intoformbricks:mainfrom
jonas-hoebenreich:templates
Oct 23, 2024
Merged

feat: add Employee Well-Being template#3981
jobenjada merged 3 commits intoformbricks:mainfrom
jonas-hoebenreich:templates

Conversation

@jonas-hoebenreich
Copy link
Contributor

@jonas-hoebenreich jonas-hoebenreich commented Oct 22, 2024

What does this PR do?

This PR template adds an "Employee Well-Being" survey template. The questions in this template have been inspired by Peakon Employee Voice

Fixes # (issue)

How should this be tested?

  • Test Template

image

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read How we Code at Formbricks
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand bits
  • Ran pnpm build
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues
  • First PR at Formbricks? Please sign the CLA! Without it we wont be able to merge it 🙏

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Formbricks Docs if changes were necessary

Summary by CodeRabbit

  • New Features

    • Introduced a new "Employee Well-Being" survey template to assess various dimensions of employee well-being, including work-life balance and workload management.
    • The survey includes four questions: three rating questions (1-10 scale) and one open-text feedback question.
  • Integration

    • The new survey template is now available alongside existing templates, enhancing the survey options for users.

@vercel
Copy link

vercel bot commented Oct 22, 2024

@jonas-hoebenreich is attempting to deploy a commit to the formbricks Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 22, 2024

Walkthrough

The changes introduce a new "Employee Well-Being" survey template in the packages/lib/templates.ts file. This template includes a function that generates a survey assessing various aspects of employee well-being, featuring three rating questions and one open-text question. The new template is integrated into the existing array of templates, maintaining the overall structure and logic of the current system.

Changes

File Change Summary
packages/lib/templates.ts - Added employeeWellBeing function returning a TTemplate object.
- Integrated new survey template into existing templates with three rating questions and an open-text question.

Possibly related PRs

  • feat: [🕹️] Add Template to Library (150 points) #3947: The changes in this PR introduce a new employeeSatisfaction template in the same packages/lib/templates.ts file, which is closely related to the new employeeWellBeing template added in the main PR, both focusing on employee-related surveys.

Suggested labels

🕹️ oss.gg, 🕹️ 150 points

Suggested reviewers

  • jobenjada

🐇 In the meadow, bright and free,
A survey blooms for you and me.
With questions fair, and answers true,
Well-being shines in all we do!
Let's hop along, and share our thoughts,
For happier days, this template's sought! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 22, 2024

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 98c16eb and fd00957.

📒 Files selected for processing (1)
  • packages/lib/templates.ts (2 hunks)
🧰 Additional context used
🔇 Additional comments (2)
packages/lib/templates.ts (2)

5266-5321: LGTM! Well-structured questions with consistent design.

The questions are well-implemented with:

  • Consistent rating scales (1-10)
  • Clear and descriptive labels
  • Good mix of quantitative (ratings) and qualitative (open text) questions
  • Proper required/optional settings

5367-5367: LGTM! Proper integration into templates array.

The new template is correctly added to the templates array, maintaining consistency with other template integrations.

Comment on lines +5257 to +5261
name: "Employee Well-Being",
role: "productManager",
industries: ["eCommerce"],
channels: ["link"],
description: "Assess your employee well-being through work-life balance, workload, and environment.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Adjust template configuration to better match its purpose.

The current configuration could be improved to better reflect the template's HR focus and broader applicability:

  1. The role should be "customerSuccess" or a similar HR-focused role instead of "productManager"
  2. The industries array should include "saas" and "other" as this survey is applicable across all industries
  3. The channels array should include "app" as this survey could be useful in both web and mobile applications

Apply this diff to improve the configuration:

    name: "Employee Well-Being",
-   role: "productManager",
+   role: "customerSuccess",
-   industries: ["eCommerce"],
+   industries: ["saas", "eCommerce", "other"],
-   channels: ["link"],
+   channels: ["link", "app"],
    description: "Assess your employee well-being through work-life balance, workload, and environment.",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
name: "Employee Well-Being",
role: "productManager",
industries: ["eCommerce"],
channels: ["link"],
description: "Assess your employee well-being through work-life balance, workload, and environment.",
name: "Employee Well-Being",
role: "customerSuccess",
industries: ["saas", "eCommerce", "other"],
channels: ["link", "app"],
description: "Assess your employee well-being through work-life balance, workload, and environment.",

@jobenjada jobenjada added hacktoberfest complete these issues to gather points for Hacktoberfest 🕹️ oss.gg Community issue via oss.gg 🕹️ 150 points labels Oct 23, 2024
Copy link
Member

@jobenjada jobenjada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very cool, thanks!

@jobenjada jobenjada enabled auto-merge October 23, 2024 23:05
@jobenjada jobenjada added this pull request to the merge queue Oct 23, 2024
Merged via the queue into formbricks:main with commit 2bab855 Oct 23, 2024
@oss-gg
Copy link

oss-gg bot commented Oct 23, 2024

Awarding jonas-hoebenreich: 150 points 🕹️ Well done! Check out your new contribution on oss.gg/jonas-hoebenreich

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest complete these issues to gather points for Hacktoberfest 🕹️ oss.gg Community issue via oss.gg 🕹️ 150 points

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants