Skip to content

T3022 survey#293

Open
Danielgergely wants to merge 10 commits into14.0from
T3022-survey
Open

T3022 survey#293
Danielgergely wants to merge 10 commits into14.0from
T3022-survey

Conversation

@Danielgergely
Copy link
Member

@Danielgergely Danielgergely commented Feb 26, 2026

This PR includes changes which enable the 2025 theme to override the style of the default survey page from odoo. It dynamically hides & replaces components while keeping the content untouched.

  • REFACTOR: added /my2 route intercepts
  • FEAT: survey_template now overrides default survey with 2025 theme components
  • CHORE: added theme_compassion_2025 to my_compassion_segmentation dependencies
  • REFACTOR: overriding default odoo survey styling
  • FEAT: added optional type and value to themed button
  • REFACTOR: hide branding, override continue button, progress bar
  • FEAT: added css rules for odoo progress bar override
  • STYLE: commented custom survey scss selectors

Here is how the survey now looks like:
Start page
survey-start

First page:
survey-questions-table

Second page:
survey-select-3

Third page:
survey-question-3

Thank you page:
survey-finished

Progress bar:
survey-progress

The footer with the dynamic links:
footer-with-links

on mobile:
footer-with-links-mobile

- REFACTOR: changed survey route intercept from my to my2
- FEAT: survey_template now overrides default survey with 2025 theme components
- CHORE: added theme_compassion_2025 to my_compassion_segmentation dependencies
- REFACTOR: overriding default odoo survey styling
- FEAT: added optional type and value to themed button
- REFACTOR: hide branding, override continue button, progress bar
- FEAT: added css rules for odoo progress bar override
- STYLE: commented custom survey scss selectors
- FIX: removed default 'button' type from themed button
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Danielgergely, 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 significantly enhances the user experience of Odoo survey pages by applying the "2025 theme" styling. It involves integrating the new theme module, refactoring existing routes to support themed pages, and extensively overriding default Odoo survey templates and CSS to align with the desired visual design. The changes ensure a consistent look and feel across the application, dynamically hiding and replacing standard Odoo components with custom-themed equivalents while preserving survey functionality.

Highlights

  • Dependency Added: Added theme_compassion_2025 as a dependency to the my_compassion_segmentation module.
  • New Routes: Introduced new /my2 and /my2/home routes to the MyAccountControllerSurvey for themed pages.
  • Survey Styling Overhaul: Extensively overrode default Odoo survey styling, including hiding branding, replacing buttons with themed components, and applying custom CSS to various survey elements.
  • Themed Button Enhancement: Extended the ThemedButtonComponent to support type and value attributes for improved form integration.
  • Custom Progress Bar Styling: Implemented specific CSS rules for the Odoo progress bar to align with the 2025 theme's visual design.
  • Centralized Survey SCSS: Created a new SCSS file (_survey_form.scss) to centralize all survey-specific styling overrides, covering input fields, choice buttons, and matrix questions.

🧠 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
  • my_compassion_segmentation/manifest.py
    • Added theme_compassion_2025 to the list of module dependencies.
  • my_compassion_segmentation/controllers/my_account.py
    • Extended the @route decorator for the home method to include /my2 and /my2/home paths.
  • my_compassion_segmentation/templates/survey_templates.xml
    • Hid Odoo branding messages on the survey layout.
    • Added padding to the survey fill page wrapper.
    • Replaced the default survey title with a themed TitleComponent and hid the timer.
    • Replaced default start survey buttons with themed buttons, including an "Ask me again later" option for specific surveys.
    • Hid the "or press Enter" message on the start page.
    • Replaced the default "Continue" button with a themed button on in-progress survey forms.
    • Customized the "Thank you" page to use a themed TitleComponent and a styled continue button, extracting href and label from the survey description.
    • Overwrote the Odoo progress bar styling to use custom classes for theming.
  • theme_compassion_2025/static/src/scss/components/_progress_bar.scss
    • Added new SCSS rules to style native-width Odoo progress bars, including min-width, height, and flowing gradient effects.
  • theme_compassion_2025/static/src/scss/components/_survey_form.scss
    • Added a new SCSS file to define comprehensive styling overrides for Odoo survey forms.
    • Styled input fields to have a minimal "bottom-border only" appearance.
    • Set default text color for survey choice options.
    • Applied primary theme color to matrix question headers and cells.
    • Overrode matrix cell hover effects and styled active radio icons.
    • Transformed standard choice buttons into pill-shaped options, hiding default icons and key letters.
    • Added hover and selected states for choice buttons.
    • Hid the default "done" button on the thank you page.
  • theme_compassion_2025/templates/components/buttons/ThemedButton.xml
    • Added type and value attributes to the ThemedButtonComponent for better integration with form submissions.
  • theme_compassion_2025/views/assets.xml
    • Included the newly created _survey_form.scss file in the asset bundle.
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 significant styling overrides for Odoo's survey module, integrating it with the 2025 theme. Key changes include hiding Odoo branding, restyling survey elements like titles, buttons, and progress bars, and adding new routes for /my2 access. The changes effectively transform the default survey appearance to align with the new theme. However, there are a few areas where the implementation could be made more robust and maintainable, particularly concerning the parsing of HTML content and the use of CSS specificity.

- FEAT: new override template for dynamic inserting of the useful links of a partner
- FEAT: added new footer_links template to manifest
- FEAT: added footer hook to provide the ability to insert dynamic content into the footer
- FIX: this fix should make sure that buttons in close proximity don't touch each other. a lot cleaner and better solution.
@Danielgergely Danielgergely marked this pull request as ready for review February 26, 2026 15:09
- REFACTOR: the footer_links.xml it now located in the templates folder
@Danielgergely
Copy link
Member Author

Related PR: CompassionCH/compassion-modules#2081 (partner_segmentation module changes)

- This should enable us to merge until the partner links and segmentation topics are decided
Copy link
Contributor

@NoeBerdoz NoeBerdoz left a comment

Choose a reason for hiding this comment

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

Thank you very much for your work! Here is a few things to take in account before we can merge your work 👍

@NoeBerdoz
Copy link
Contributor

Also, while taking in account my review, please fix the git conflict for a smooth merge afterward 😎

# Conflicts:
#	theme_compassion_2025/templates/components/buttons/ThemedButton.xml
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