Skip to content

fix: download responses button label#5324

Merged
Dhruwang merged 2 commits intomainfrom
fix/download-responses
Apr 14, 2025
Merged

fix: download responses button label#5324
Dhruwang merged 2 commits intomainfrom
fix/download-responses

Conversation

@gupta-piyush19
Copy link
Copy Markdown
Contributor

@gupta-piyush19 gupta-piyush19 commented Apr 11, 2025

What does this PR do?

download responses button label and made responses selected lowercase

image

Fixes #(issue)

How should this be tested?

  • Test A
  • Test B

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
    • Updated labels for CSV and Excel download options to clearly indicate filtered responses.
    • Added localized translations for filtered response labels across multiple languages for a consistent user experience.
  • Style
    • Enforced lowercase styling on selected row display for a uniform appearance.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
formbricks-cloud ⬜️ Ignored (Inspect) Visit Preview Apr 14, 2025 6:53am

@gupta-piyush19 gupta-piyush19 requested a review from Dhruwang April 11, 2025 13:32
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 11, 2025

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 11, 2025

Walkthrough

The changes update the text labels and styling in survey response download interfaces and add corresponding localization entries. The CustomFilter component now displays labels indicating “filtered responses” for CSV and Excel downloads instead of the previous “current selection” terminology. A minor adjustment in class attributes in the same component reorders attributes without affecting functionality. Additionally, the SelectedRowSettings component’s <div> element has its class name changed to apply lowercase styling to its text content. To support these UI label updates, new localization keys for filtered responses in CSV and Excel formats have been added to multiple language JSON files, including German, English, French, Portuguese (Brazil and Portugal), and Chinese (Traditional). No changes were made to the declarations of exported or public entities.


🪧 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

Copy link
Copy Markdown
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: 0

🧹 Nitpick comments (5)
packages/lib/messages/fr-FR.json (1)

1749-1750: Ensure Consistency with Case Requirements for Button Labels

The new localization keys "filtered_responses_csv" and "filtered_responses_excel" have been added with translations:

  • "Réponses filtrées (CSV)"
  • "Réponses filtrées (Excel)"

Per the PR objective—to have the word "responses" rendered in lowercase for the download responses button—please confirm whether this case requirement applies to the French translations as well. If so, consider changing the translation to use a lowercase initial letter (e.g., "réponses filtrées (CSV)" and "réponses filtrées (Excel)") unless there’s a specific design guideline for French that favors capitalization.

packages/lib/messages/de-DE.json (1)

1749-1750: Localization Keys for Filtered Downloads Added

The new entries for "filtered_responses_csv" and "filtered_responses_excel" have been added to support the updated button label for downloading filtered responses. In the English UI, the fix ensures the word "responses" appears in lowercase. In the German localization, the noun “Antworten” is naturally capitalized; please verify that this capitalization is acceptable per German UI standards, or if consistency demands a stylistic adjustment for this button label.

packages/lib/messages/pt-BR.json (1)

1749-1750: New Localization Entries for Filtered Responses

The two new keys ("filtered_responses_csv" and "filtered_responses_excel") have been added to support the updated UI for downloading filtered responses. The texts appear consistent with similar entries in other localization files.

Consider verifying that the casing in the Portuguese translation meets the design requirements. If the PR objective is to have the word “responses” in lowercase, you might want to review whether "Respostas" (with an initial uppercase letter) is acceptable for the target audience or if it should be “respostas” instead.

apps/web/modules/ui/components/data-table/components/selected-row-settings.tsx (1)

79-81: Enforce Lowercase Styling for Selected Row Information

The <div> now explicitly includes the Tailwind CSS lowercase utility class which ensures that the selected row count and type are displayed entirely in lowercase. This update directly supports the UI fix by enforcing the intended button label style.

packages/lib/messages/pt-PT.json (1)

1749-1750: Ensure Consistent Lowercase for "responses" in Button Labels

The new translation keys for filtered responses use the value "Respostas filtradas (CSV)" and "Respostas filtradas (Excel)". Per the PR objective to display the word "responses" in lowercase on the download button, please verify that the Portuguese translation should follow this convention. If the design requires the term to be in lowercase (e.g. "respostas filtradas (CSV)" and "respostas filtradas (Excel)"), kindly update the values accordingly.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3eb9aa7 and 30b4aec.

📒 Files selected for processing (8)
  • apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/components/CustomFilter.tsx (2 hunks)
  • apps/web/modules/ui/components/data-table/components/selected-row-settings.tsx (1 hunks)
  • packages/lib/messages/de-DE.json (1 hunks)
  • packages/lib/messages/en-US.json (1 hunks)
  • packages/lib/messages/fr-FR.json (1 hunks)
  • packages/lib/messages/pt-BR.json (1 hunks)
  • packages/lib/messages/pt-PT.json (1 hunks)
  • packages/lib/messages/zh-Hant-TW.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Run E2E Tests / Run E2E Tests
  • GitHub Check: Run Unit Tests / Unit Tests
  • GitHub Check: Build Formbricks-web / Build Formbricks-web
  • GitHub Check: Validate Docker Build
  • GitHub Check: SonarQube
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Tusk Tester
🔇 Additional comments (5)
packages/lib/messages/zh-Hant-TW.json (1)

1749-1750: New Localization Keys for Filtered Responses

The localization file now includes two new keys, "filtered_responses_csv" and "filtered_responses_excel", with values "篩選回應 (CSV)" and "篩選回應 (Excel)" respectively. These entries are consistent with similar additions in other language files and help ensure that the “download responses” button label uses the correct (lowercase) terminology. Even though Chinese characters do not have upper- or lowercase forms, the added keys mirror the change made in the other locales.

Please verify that these new keys are used in the UI and that they match the design requirements outlined in the PR.

packages/lib/messages/en-US.json (1)

1749-1750: Updated Localization Keys for Download Responses Button

The new entries "filtered_responses_csv": "Filtered responses (CSV)" and "filtered_responses_excel": "Filtered responses (Excel)" correctly implement the change to display the word “responses” in lowercase. This aligns with the PR’s objective to update the button label. Please ensure that the corresponding UI components (e.g., in the CustomFilter component) are referencing these new keys instead of the old ones (like "current_selection_csv"/"current_selection_excel") so that the changes are visible in the interface.

apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/components/CustomFilter.tsx (3)

393-393: Code styling change looks good.

The class attributes reordering doesn't affect functionality while maintaining proper styling for the download button.


419-419: Terminology improvement looks good.

Changing from "current selection" to "filtered responses" provides clearer context to users about what they're downloading, aligning with the PR objective of modifying the button label.


426-427: Consistent terminology update looks good.

This change ensures consistency with the CSV option, using "filtered responses" rather than "current selection" for the Excel download option as well.

Copy link
Copy Markdown
Member

@Dhruwang Dhruwang left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@use-tusk
Copy link
Copy Markdown
Contributor

use-tusk bot commented Apr 14, 2025

✅ Generated 3 tests - 3 passed (a8f8ef3) View tests ↗

View output in GitHub ↗

Test Summary

  • SelectedRowSettings - 3 ✅
View check history

Commit Status Output Tests Passed Failed Error
30b4aec ✅ Generated 3 tests - 3 passed Tests 3 3 0 0
a8f8ef3 ✅ Generated 3 tests - 3 passed Tests 3 3 0 0

@Dhruwang Dhruwang enabled auto-merge April 14, 2025 06:54
Copy link
Copy Markdown
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: 0

🧹 Nitpick comments (1)
packages/lib/messages/fr-FR.json (1)

1748-1750: Verify Casing for Filtered Responses Labels

The new entries

  • "filtered_responses_csv": "Réponses filtrées (CSV)"
  • "filtered_responses_excel": "Réponses filtrées (Excel)"

replace the previous "current_selection_csv" and "current_selection_excel" keys. Since the PR objective specifically mentions that the word "responses" in the download responses button label should be displayed in lowercase, please verify whether the French version should use a lowercase initial letter (e.g. "réponses filtrées (CSV)") or if the current capitalization conforms to the French style guidelines for UI labels.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 30b4aec and a8f8ef3.

📒 Files selected for processing (6)
  • packages/lib/messages/de-DE.json (2 hunks)
  • packages/lib/messages/en-US.json (2 hunks)
  • packages/lib/messages/fr-FR.json (2 hunks)
  • packages/lib/messages/pt-BR.json (2 hunks)
  • packages/lib/messages/pt-PT.json (2 hunks)
  • packages/lib/messages/zh-Hant-TW.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/lib/messages/pt-PT.json
  • packages/lib/messages/en-US.json
  • packages/lib/messages/pt-BR.json
  • packages/lib/messages/zh-Hant-TW.json
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Run E2E Tests / Run E2E Tests
  • GitHub Check: Run Linters / Linters
  • GitHub Check: Build Formbricks-web / Build Formbricks-web
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Run Unit Tests / Unit Tests
  • GitHub Check: Validate Docker Build
  • GitHub Check: SonarQube
🔇 Additional comments (3)
packages/lib/messages/de-DE.json (2)

780-787: Addition of API Key Access Control translation.
The new "access_control": "Zugriffskontrolle" key has been added under the "api_keys" section in the project object. This update aligns with similar changes across other localization files, ensuring consistency in the API key management interface.


1748-1750: Updated download button labels for filtered responses.
The new localization keys "filtered_responses_csv": "Gefilterte Antworten (CSV)" and "filtered_responses_excel": "Gefilterte Antworten (Excel)" correctly replace the legacy labels by providing an updated, unified text that meets the PR objective. Although the word “responses” is required to be lowercase in the English UI, please note that German nouns are customarily capitalized. Verify that this is acceptable for the German UI design or if an exception is needed.

packages/lib/messages/fr-FR.json (1)

780-788: Added Localization Key for API Keys

The new key "access_control": "Contrôle d'accès" has been introduced in the API keys section. The addition is consistent with similar changes in other locale files. Please confirm that this translation follows the overall style and terminology guidelines for your project.

@sonarqubecloud
Copy link
Copy Markdown

@Dhruwang Dhruwang added this pull request to the merge queue Apr 14, 2025
Merged via the queue into main with commit 016289c Apr 14, 2025
22 checks passed
@Dhruwang Dhruwang deleted the fix/download-responses branch April 14, 2025 07:26
@coderabbitai coderabbitai bot mentioned this pull request May 28, 2025
12 tasks
glade-at-gigwell pushed a commit to gigwell/formbricks that referenced this pull request Aug 11, 2025
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
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