Skip to content

Conversation

@rfontanarosa
Copy link
Collaborator

@rfontanarosa rfontanarosa commented Feb 10, 2026

closes #1949

Registrazione.schermo.2026-02-10.alle.13.50.08.mov

@rfontanarosa rfontanarosa self-assigned this Feb 10, 2026
@rfontanarosa rfontanarosa requested a review from gino-m February 10, 2026 12:49
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @rfontanarosa, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience during the creation of new surveys or tasks by intelligently suppressing unnecessary data loss confirmation dialogs. By introducing an isCreationMode flag, the application now avoids prompting users with warnings about losing unsaved data when they are still in the initial creation phase, streamlining the workflow. Additionally, several dialog messages and labels have been updated for internationalization.

Highlights

  • Conditional Dialog Suppression: Implemented logic to suppress data loss confirmation dialogs for task and option deletions when the application is in 'creation mode', streamlining the user experience during initial setup.
  • New Input Property: Introduced an isCreationMode input property in TaskEditorComponent and TaskFormComponent to control behavior based on whether a new item is being created or an existing one is being edited.
  • Internationalization Updates: Applied internationalization ($localize) to various dialog titles, messages, and button labels across TaskEditorComponent, TaskFormComponent, and DialogService for improved localization support.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • web/src/app/components/create-survey/task-details/task-details.component.html
    • Added [isCreationMode]="true" to the task-editor component.
  • web/src/app/components/shared/task-editor/task-editor.component.html
    • Added [isCreationMode]="isCreationMode()" to the task-form component.
  • web/src/app/components/shared/task-editor/task-editor.component.ts
    • Imported input from @angular/core.
    • Added isCreationMode = input<boolean>(false); as a new input.
    • Modified onTaskDelete to conditionally suppress the confirmation dialog based on isCreationMode.
    • Updated onTaskDuplicate dialog messages to use $localize.
  • web/src/app/components/shared/task-editor/task-form/task-form.component.ts
    • Imported input from @angular/core.
    • Added isCreationMode = input<boolean>(false); as a new input.
    • Updated onAddOtherOption label to use $localize.
    • Modified openDeleteOptionDialog to conditionally suppress the confirmation dialog based on isCreationMode.
  • web/src/app/services/dialog/dialog.service.ts
    • Added i18n attributes to 'No' and 'Yes' buttons in the confirmation dialog template.
Activity
  • No specific activity (comments, reviews, etc.) was provided for this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a isCreationMode flag to suppress data loss confirmation dialogs during the survey creation flow. The implementation correctly passes this flag down through the component hierarchy and uses it to conditionally show dialogs. The changes also include welcome additions of internationalization strings for various dialogs and buttons.

My review focuses on improving code maintainability and consistency. I've suggested refactoring two methods to use a more declarative RxJS approach, which reduces code duplication. I also pointed out a minor inconsistency in the template for one of the dialogs.

@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 7.14286% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.01%. Comparing base (870e5c7) to head (7b8f7f0).

Files with missing lines Patch % Lines
...hared/task-editor/task-form/task-form.component.ts 0.00% 8 Missing ⚠️
...onents/shared/task-editor/task-editor.component.ts 16.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2428      +/-   ##
==========================================
- Coverage   59.12%   59.01%   -0.12%     
==========================================
  Files         110      110              
  Lines        2733     2740       +7     
  Branches      397      400       +3     
==========================================
+ Hits         1616     1617       +1     
- Misses       1060     1066       +6     
  Partials       57       57              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

[Create survey] Data loss warnings should not be shown in creation flow when deleting tasks or options

2 participants