Skip to content

Rfontanarosa/minor fixes#2439

Draft
rfontanarosa wants to merge 7 commits intomasterfrom
rfontanarosa/minor-fixes
Draft

Rfontanarosa/minor fixes#2439
rfontanarosa wants to merge 7 commits intomasterfrom
rfontanarosa/minor-fixes

Conversation

@rfontanarosa
Copy link
Collaborator

closes #2422

@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 consolidates a collection of minor fixes and improvements aimed at enhancing the overall quality and maintainability of the codebase. The changes primarily focus on standardizing code patterns, improving the visual structure of HTML templates, and refining internationalization efforts for the Thai language.

Highlights

  • Code Consistency: Updated the instantiation of immutable.js List from List.of(...properties) to List([...properties]) in export-csv.ts for improved consistency and modern syntax.
  • HTML Formatting and Readability: Applied extensive HTML reformatting across multiple Angular component templates to enhance code readability and adhere to style guidelines, including attribute wrapping and newline adjustments.
  • Styling Refactor: Refactored the background image styling for the sign-in page, moving the background-image property from the SCSS file directly into the HTML template's div element.
  • Localization Updates: Corrected and updated several Thai localization strings in messages.th.json to improve accuracy and user experience for Thai-speaking users.

🧠 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
  • functions/src/export-csv.ts
    • Updated immutable.js List instantiation from List.of() to List().
  • web/src/app/components/about/about.component.html
    • Removed a trailing newline character at the end of the file.
  • web/src/app/components/create-survey/data-sharing-terms/data-sharing-terms.component.html
    • Reformated HTML attributes for mat-radio-group, mat-card, and textarea elements to improve readability.
  • web/src/app/components/main-page-container/main-page/side-panel/job-list/job-list.component.html
    • Reformated the ngClass attribute for the mat-list element.
  • web/src/app/components/shared/copy-survey-controls/copy-survey-controls.component.html
    • Reformated the style attribute for a div element.
  • web/src/app/components/shared/header/current-user-widget/current-user-widget.component.html
    • Added a new line after the license comment block.
    • Reformated the user-avatar component attributes.
  • web/src/app/components/shared/sign-in-page/sign-in-page.component.html
    • Moved the background-image style attribute from the SCSS file to the body-container div.
    • Updated the *ngIf condition for the sign-in message from !(isAuthenticated$() | async) to (isAuthenticated$() | async) === false for explicit comparison.
  • web/src/app/components/shared/sign-in-page/sign-in-page.component.scss
    • Removed the background-image property from the .body-container style.
  • web/src/app/components/shared/survey-list/survey-list.component.html
    • Reformated ng-container elements wrapping filter chips for better readability.
    • Reformated mat-card-title and mat-card-subtitle elements.
    • Reformated mat-icon and ng-container elements within the survey list.
    • Reformated span elements for filter labels.
  • web/src/app/components/terms/terms.component.html
    • Removed a trailing newline character at the end of the file.
  • web/src/locale/messages.th.json
    • Updated the translation for app.labels.editJobSectionAria.
    • Updated translations for app.loiPanel.noDataForThisSite and app.submissionPanel.skipped.
    • Updated translations for various geographical labels (lngEast, lngWest, latNorth, latSouth, altitude, accuracy).
    • Updated translations for app.dialogs.deleteTask.title, app.dialogs.deleteTask.content, app.dialogs.duplicateTask.title, and app.dialogs.duplicateTask.content.
    • Updated translations for app.labels.other, app.labels.no, and app.labels.yes.
Activity
  • No specific activity (comments, reviews, or progress updates) was provided in the pull request context.
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 series of minor fixes, primarily focused on improving code formatting and readability across several Angular templates. It also includes updates to Thai language translations. While most changes are stylistic, I found a bug in web/src/app/components/shared/survey-list/survey-list.component.html involving a duplicate ngSwitchCase that results in unreachable code. My review provides a suggestion to remove this.

Comment on lines +98 to +100
<ng-container *ngSwitchCase="SurveyGeneralAccess.RESTRICTED"
>pending</ng-container
>
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This ngSwitchCase for SurveyGeneralAccess.RESTRICTED is a duplicate of the one on lines 92-94. As a result, this block is unreachable code and will never be executed. This should be removed to prevent confusion and potential future bugs.

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.13%. Comparing base (1c0ebd3) to head (95cb79a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2439   +/-   ##
=======================================
  Coverage   59.13%   59.13%           
=======================================
  Files         111      111           
  Lines        2748     2748           
  Branches      408      408           
=======================================
  Hits         1625     1625           
  Misses       1065     1065           
  Partials       58       58           

☔ 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.

[Feature] Add support for Thai and Lao

2 participants