[PR #5] [MERGED] Feat/search #5

Closed
opened 2026-05-06 16:09:06 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/BreizhHardware/projet-web-cipa4/pull/5
Author: @BreizhHardware
Created: 2/3/2026
Status: Merged
Merged: 2/3/2026
Merged by: @BreizhHardware

Base: mainHead: feat/search


📝 Commits (4)

  • f1ebaf4 feat(search): Create the search using the figma
  • 6cf87d4 refactor(js): Refactor js from search to separate file
  • 9640201 fix(tripCard): Correct driver name formatting to include last name initial
  • 8af81e6 feat(result-list): Add width to trip results for better layout

📊 Changes

13 files changed (+715 additions, -99 deletions)

View changed files

MIGRATIONS_README.md (+45 -0)
css/components.css (+197 -0)
css/result-list.css (+28 -0)
📝 css/style.css (+15 -5)
js/components/TripCard.js (+100 -0)
js/trip-list.js (+120 -0)
📝 php/classes/Security.php (+1 -1)
📝 php/models/Trip.php (+6 -2)
php/utils/MigrationManager.php (+96 -0)
php/utils/create_migration.php (+16 -0)
📝 php/utils/init_db.php (+9 -3)
php/utils/migrations/2026_02_03_13_05_00_add_trip_options.php (+46 -0)
📝 views/trip/list.html (+36 -88)

📄 Description

This pull request introduces a comprehensive migration system for managing database schema changes, enhances the trip card UI and trip listing/filtering experience, and improves the trip creation process with new trip attributes. Key updates include the implementation of an automatic migration manager, new UI components and CSS for trip cards, and expanded trip model/database support for additional trip options.

Database Migration System:

  • Introduced a new automatic migration system, including a MigrationManager class (php/utils/MigrationManager.php), a CLI tool for creating migrations (php/utils/create_migration.php), and documentation in MIGRATIONS_README.md. Migrations are now run automatically during database initialization (php/utils/init_db.php). [1] [2] [3] [4] [5]
  • Updated the trips table schema to include a comment field and a constraint on luggage_allowed, and ensured new columns are compatible with the migration system (php/utils/init_db.php).

Trip Model and Creation Enhancements:

  • Expanded the Trip model and trip creation logic to support smoking_allowed, pets_allowed, luggage_allowed, and comment fields, ensuring these are included in new trips (php/models/Trip.php). [1] [2]

Frontend Trip Listing and Card UI:

  • Added a new TripCard component for rendering trips with enhanced visuals, including driver avatar, rating, timeline, and seat info (js/components/TripCard.js).
  • Implemented a new trip list page logic with local filtering (by time of day, smoking, pets, luggage), dynamic rendering, and booking integration (js/trip-list.js).
  • Added and updated CSS for trip cards, trip results layout, and responsive design (css/components.css, css/result-list.css, css/style.css). [1] [2] [3] [4]

Security and Miscellaneous:

  • Updated the Content Security Policy to allow scripts from cdnjs.cloudflare.com for compatibility with new frontend dependencies (php/classes/Security.php).

These changes collectively improve database maintainability, user experience for trip browsing and booking, and codebase scalability.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BreizhHardware/projet-web-cipa4/pull/5 **Author:** [@BreizhHardware](https://github.com/BreizhHardware) **Created:** 2/3/2026 **Status:** ✅ Merged **Merged:** 2/3/2026 **Merged by:** [@BreizhHardware](https://github.com/BreizhHardware) **Base:** `main` ← **Head:** `feat/search` --- ### 📝 Commits (4) - [`f1ebaf4`](https://github.com/BreizhHardware/projet-web-cipa4/commit/f1ebaf460102a026b19c19e3ba0b77ba1a9d444a) feat(search): Create the search using the figma - [`6cf87d4`](https://github.com/BreizhHardware/projet-web-cipa4/commit/6cf87d4777977c6fd992bccd9b3487b86278bf7c) refactor(js): Refactor js from search to separate file - [`9640201`](https://github.com/BreizhHardware/projet-web-cipa4/commit/96402019347c32640ce164e29a1c41c9561d9c0b) fix(tripCard): Correct driver name formatting to include last name initial - [`8af81e6`](https://github.com/BreizhHardware/projet-web-cipa4/commit/8af81e64b7c995fa2b56903858cabbeacb732a01) feat(result-list): Add width to trip results for better layout ### 📊 Changes **13 files changed** (+715 additions, -99 deletions) <details> <summary>View changed files</summary> ➕ `MIGRATIONS_README.md` (+45 -0) ➕ `css/components.css` (+197 -0) ➕ `css/result-list.css` (+28 -0) 📝 `css/style.css` (+15 -5) ➕ `js/components/TripCard.js` (+100 -0) ➕ `js/trip-list.js` (+120 -0) 📝 `php/classes/Security.php` (+1 -1) 📝 `php/models/Trip.php` (+6 -2) ➕ `php/utils/MigrationManager.php` (+96 -0) ➕ `php/utils/create_migration.php` (+16 -0) 📝 `php/utils/init_db.php` (+9 -3) ➕ `php/utils/migrations/2026_02_03_13_05_00_add_trip_options.php` (+46 -0) 📝 `views/trip/list.html` (+36 -88) </details> ### 📄 Description This pull request introduces a comprehensive migration system for managing database schema changes, enhances the trip card UI and trip listing/filtering experience, and improves the trip creation process with new trip attributes. Key updates include the implementation of an automatic migration manager, new UI components and CSS for trip cards, and expanded trip model/database support for additional trip options. **Database Migration System:** * Introduced a new automatic migration system, including a `MigrationManager` class (`php/utils/MigrationManager.php`), a CLI tool for creating migrations (`php/utils/create_migration.php`), and documentation in `MIGRATIONS_README.md`. Migrations are now run automatically during database initialization (`php/utils/init_db.php`). [[1]](diffhunk://#diff-581b22835ab16027d20b93674b45bd5959a254bcb815f53fea3edd56d5917cfcR1-R96) [[2]](diffhunk://#diff-b56ed55f4364979b06533ec2479b24c934a7a75f86c5c9a414fafd7a1a41b352R1-R16) [[3]](diffhunk://#diff-1c71f84c9122f9bb4ba66108b7c98312a960024f258cb9c64177d0550149fd2fR1-R45) [[4]](diffhunk://#diff-2baef8e34f3d3c0682126ceb14c63aec1801e35934fc7de3466cbaa1c55cf13cR5) [[5]](diffhunk://#diff-2baef8e34f3d3c0682126ceb14c63aec1801e35934fc7de3466cbaa1c55cf13cL75-R81) * Updated the trips table schema to include a `comment` field and a constraint on `luggage_allowed`, and ensured new columns are compatible with the migration system (`php/utils/init_db.php`). **Trip Model and Creation Enhancements:** * Expanded the `Trip` model and trip creation logic to support `smoking_allowed`, `pets_allowed`, `luggage_allowed`, and `comment` fields, ensuring these are included in new trips (`php/models/Trip.php`). [[1]](diffhunk://#diff-51f6bbfd7bb703838f881ed5fa67902dff71b63c4a344826672160245c5c7bd6L16-R17) [[2]](diffhunk://#diff-51f6bbfd7bb703838f881ed5fa67902dff71b63c4a344826672160245c5c7bd6R26-R29) **Frontend Trip Listing and Card UI:** * Added a new `TripCard` component for rendering trips with enhanced visuals, including driver avatar, rating, timeline, and seat info (`js/components/TripCard.js`). * Implemented a new trip list page logic with local filtering (by time of day, smoking, pets, luggage), dynamic rendering, and booking integration (`js/trip-list.js`). * Added and updated CSS for trip cards, trip results layout, and responsive design (`css/components.css`, `css/result-list.css`, `css/style.css`). [[1]](diffhunk://#diff-aa135853245fcf82210ae6415ee9711c0cf4c57179f47a828c54270e29d7765dR1-R197) [[2]](diffhunk://#diff-bf695a5023c7c5f36737d58c6171a016c57a855306c32c7072ccd97fcbfd41cbR1-R27) [[3]](diffhunk://#diff-1fc556f95754ee7e33d91044125c44bb9f750c99be4406756ffb27413adfcaf5R181-R189) [[4]](diffhunk://#diff-1fc556f95754ee7e33d91044125c44bb9f750c99be4406756ffb27413adfcaf5L216-R230) **Security and Miscellaneous:** * Updated the Content Security Policy to allow scripts from `cdnjs.cloudflare.com` for compatibility with new frontend dependencies (`php/classes/Security.php`). These changes collectively improve database maintainability, user experience for trip browsing and booking, and codebase scalability. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 16:09:06 +02:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BreizhHardware/projet-web-cipa4#5
No description provided.