Skip to content

Feature/cleaning#7

Merged
jeanbfly merged 10 commits into
developfrom
feature/cleaning
May 4, 2026
Merged

Feature/cleaning#7
jeanbfly merged 10 commits into
developfrom
feature/cleaning

Conversation

@jeanbfly
Copy link
Copy Markdown
Collaborator

Description
This PR focuses on frontend cleanup, test/lint fixes, and introduces a first version of a dynamic common-ui layer with validation schemas. It also improves CV preview updates.

Scope
This PR aims to stabilize the codebase (lint/tests), clean frontend structure, and lay the groundwork for reusable UI components.

Changes

Backend

  • fix duplicate route

Frontend

  • Cleaned up components structure
  • Cleaned CSS
  • Improved CV preview update behavior
  • Introduced dynamic common-ui layer
  • Added changeset configuration
  • Added validation schemas

How to test

Start the containers
Run the frontend and backend (front:with-back)

Notes

The common-ui layer is an initial iteration and will evolve
Additional refactoring and adoption across the app should follow

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on frontend cleanup and stabilization while introducing an initial “dynamic common-ui” approach for curriculum section item editing (schema-driven fields + validation/changesets), and includes a backend tweak to curriculum duplication file handling.

Changes:

  • Introduces schema-driven dynamic section item form rendering (prefab mapping + zod schema + immer-changeset builder).
  • Refactors curriculum edit flows and curriculum list/item components (UI behavior + data-test attributes + actions cleanup).
  • Adjusts backend curriculum duplication file path handling and updates seed/test data and translations.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
@libs/users-front/tests/integration/login-form-test.gts Removes the login form integration test.
@libs/users-front/tests/integration/components/curriculums/curriculum-item-test.gts Updates test selectors/behavior to match curriculum-item changes.
@libs/users-front/src/services/schema-to-changeset.ts Adds dynamic zod schema builder + changeset initializer for schema-driven forms.
@libs/users-front/src/services/schema-field-map.ts Adds mapping from schema field types to prefab component types.
@libs/users-front/src/components/curriculums/edit/dynamic-section-item-form.gts New dynamic section item form component using ember-input-validation prefabs.
@libs/users-front/src/components/curriculums/edit/curriculum-edit-view.gts Changes edit-view updates to call onUpdate() instead of reloading sections in several flows.
@libs/users-front/src/components/curriculums/edit/curriculum-edit-section-item.gts Replaces inline field rendering with DynamicSectionForm and adds submit handler.
@libs/users-front/src/components/curriculums/curriculum-validation.ts Removes unused create schema/type; keeps edit schema/type.
@libs/users-front/src/components/curriculums/curriculum-list.gts Minor control-flow cleanup; attempts to add a data-test attr to CurriculumItem usage.
@libs/users-front/src/components/curriculums/curriculum-item.gts Simplifies actions menu, updates validation schema usage, and renames data-test hooks/page object selectors.
@libs/users-front/src/assets/icons/rename.gts Removes rename icon asset (no longer used).
@libs/users-front/package.json Exposes new component/services via app-js export map.
@libs/users-backend/src/routes/curriculums/duplicate.route.ts Adjusts duplicated profile picture path/filename logic.
@apps/front/translations/curriculums/fr-fr.yaml Adds select-model validation strings and a save label.
@apps/front/translations/curriculums/en-us.yaml Adds select-model validation strings and a save label.
@apps/backend/src/templates/template2/style.css Removes screen-preview-specific CSS section.
@apps/backend/src/templates/template1/style.css Removes screen-preview-specific CSS section and trims comments.
@apps/backend/src/seeders/curriculumInjector.seeder.ts Updates seeded dates/phones and reformats date strings in seeded jsonData.
Comments suppressed due to low confidence (2)

@libs/users-front/src/components/curriculums/edit/curriculum-edit-section-item.gts:60

  • After switching to DynamicSectionForm, the uploadFile and getFileName actions are no longer referenced anywhere in this component (they were tied to the removed inline inputs). Please remove these unused methods (and related state like firstFieldKey if it’s no longer needed) to avoid dead code and future confusion.
  @action
  async uploadFile(key: string, event: Event) {
    if (key !== 'profilePicture') return;
    const input = event.target as HTMLInputElement;
    if (input.files && input.files.length > 0) {
      const file = input.files[0];
      await this.curriculum.uploadFile(
        this.args.curriculumId,
        this.args.sectionId!,
        this.args.itemId,
        file!
      );
      this.args.onUpdate();
    }
  }

  @action
  getFileName(key: string | undefined) {
    return (
      key?.split('/').pop() || this.intl.t('curriculums.edit.noFileChosen')
    );
  }

@libs/users-front/src/components/curriculums/curriculum-item.gts:118

  • The data-test-curriculum-item-more-action-button is on a button whose click handler navigates directly to edit (gotToEdit). The name suggests it opens the actions menu, which is a different UI element (<TpkActionsMenu>). Renaming the data-test id (and the CurriculumItemPageObject.moreActionsButton field) to reflect the actual behavior would make tests and DOM more self-explanatory.
        <button
          data-test-curriculum-item-more-action-button
          type="button"
          class="cursor-pointer hover:shadow-lg transition-shadow duration-200"
          {{on "click" this.gotToEdit}}
        >

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread @libs/users-front/src/components/curriculums/edit/dynamic-section-item-form.gts Outdated
Comment thread @apps/backend/src/seeders/curriculumInjector.seeder.ts
Comment thread @apps/backend/src/seeders/curriculumInjector.seeder.ts
Comment thread @libs/users-front/src/components/curriculums/curriculum-list.gts
Comment thread @libs/users-front/src/services/schema-to-changeset.ts
Comment thread @apps/backend/src/seeders/curriculumInjector.seeder.ts
@jeanbfly jeanbfly merged commit 0fc1cb3 into develop May 4, 2026
1 check passed
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.

3 participants