Functional description
Main feature
The profile entry web component allows users to declare and update their household characteristics and equipment in order to personalize energy insights and calculations. The profile entry is organized into 5 main categories, each grouping a set of related questions :- General information : Number of occupants, Surface …
- Housing : residence type (Apartement or house), construction period,
- Main equipment : Heating, cooling, …
- Other equipment : cooking, appliances (washing machine, …), …
- Lifestyle : Absence from home, hot water usage, …
- A structured stepper guiding users through the input process by structuring their journey across the five profile categories
- A progress indicator showing completion status through the input process
- Pre-filled data if already known (from previous declarations or contracts)
Detailed features
Step 1 — General information Collects the main characteristics of the user’s household:
Step 2 — Housing
Collects structural characteristics of the dwelling:
Step 3 — Main equipment
Collects information about the main energy-consuming equipment:
Step 4 — Other equipment
Collects the household appliances inventory:
Step 5 — Lifestyle
Collects the occupants’ daily habits:
Profile completion indicator
A progress indicator is displayed to encourage users to complete all sections.
The completion percentage is computed server-side and reflects the proportion of answered fields.
Navigation to a specific step via
active-step-section
The tenant can open the form directly on a specific step by passing the active-step-section attribute. This is especially useful when used alongside dtn-profile-read and its profile-goto event, enabling a seamless navigation flow between the read view and the edit form.
Valid values: general | housing | equipment | otherEquipment | lifestyle
If the value is absent or invalid, the form opens on the first step.
Navigation within the stepper
Once the form is opened, users can navigate through the different steps using the Previous and Next buttons.
- Previous navigates to the preceding step.
- Next validates the current step, saves any valid changes and navigates to the following step.
- Save and exit, available on all steps except the last one.
- Finish, available only on the last step.
dtn:profile-saved event is emitted. This event allows the host application to react accordingly, for example by navigating away from the form or redirecting the user after completing the profile journey.
Note:
dtn:profile-saved is emitted only when users click Save and exit or Finish. No event is emitted if the save operation fails. Navigating between steps using Previous and Next does not emit this event.disable-heating-fields input, which allows all heating-related questions to be hidden. When this input is set to true, all questions associated with heating are removed from the data entry flow.
Error and information messages handling
The form may display messages in the following cases: Use case 1: GET profile API error (400/500) An error component is displayed in place of the form, indicating that the profile could not be loaded. Use case 2: PUT profile save error (400/500) An error toaster notification is displayed at the top of the component, informing the user that their profile could not be saved and inviting them to retry. Use case 3: Successful save A success toaster notification is displayed:- Generic success message after saving any step except the last
- Specific completion message after saving the last step (Lifestyle), indicating that the profile entry is complete
These messages are projected into the Étincelle
<etc-form-field> slot via <etc-error>, so they inherit the design system’s error styling (red text below the field).
Use case 5: Form-level alert above the navigation buttons
If the user attempts to navigate to the next step while the current step’s form group is invalid, a danger alert banner (<etc-alert type="danger">) is displayed above the Next / Finish button with the message:
This alert is visible on every step (General, Housing, Equipment, Other equipment, Lifestyle) and disappears as soon as the form group becomes valid.
State handling
Loading state handling
When the profile data takes time to load (slow network or API response > 300 ms), a skeleton screen is displayed to:- Indicate that data is loading
- Preview the stepper layout before content appears
Saving state handling
When the user clicks Save & Exit or Finish, the clicked button displays a loading indicator while the profile changes are being saved. All stepper actions are temporarily disabled until the save request completes, preventing duplicate submissions and unintended interactions.A loading indicator is only displayed for Save & Exit and Finish actions. Although clicking Next also triggers a save operation, it is handled asynchronously while navigating to the next step. It allows the navigation flow to continue seamlessly.
Responsiveness
Thedtn-profile web component is fully responsive.
Provider customization
The component inherits the provider’s design system via the Étincelle Design System and supports the following customization:- Brand colors applied via CSS custom properties from the provider’s stylesheet
- Radius overrides for card and button shapes
Language management
The web component supports multiple languages.fr-FRen-US
Accessibility
The component is developed following the RGAA (French General Accessibility Improvement Framework) requirements and accessibility best practices. Examples of RGAA accessibility requirements implemented in thedtn-profile web component include :
- Each form step is navigable by keyboard
- Form validation errors are announced to screen readers via a screen reader notifier service
- Success and error notifications (save result) are announced to assistive technologies
- The stepper navigation respects focus management when switching steps
The accessibility of this web component does not imply that the entire page where it is integrated is accessible. Accessibility compliance must be assessed at page level, including any surrounding content, custom code, and third-party components provided by the integrating application.
API used to display and save profile data
Profile data is provided by the Profile API:- GET /profile — fetches the current user profile to pre-fill the form
- PUT /profile — saves the profile section after each step validation
Integration of the web component ‘Profil completion’