-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #7 🎫: AddVehicleForm
and AddVehiclePage
components
#16
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ed imports and names. - Rename folder 'vehiclesList' to 'vehicles'. - Update vehicles slice name. - Update all vehicles-related imports. - Update vehicles reducer name in 'store.js'. - Update vehicles access in dispatches.
…cThunk' on vehicles slice
- Use try/catch to properly handle errors. - Use rejectWithValue to pass error message to the component. - Export 'fetchVehicles' thunk as no default.
- Import 'postNewVehicle' thunk and add it to the extraReducers. - Add 'addNewVehicle' reducer to update the state with the new vehicle.
- Declare 'success-color' variable. - Add textarea to the inputs group styles. - Give textarea its own styles. - Add transition to '.btn' class. - Add '.btn.form__error' and '.btn.form__success' classes.
- This is to ensure that the background color is visible on older browsers that don't support the background image or the image fails to load.
ITurres
added
enhancement
New feature or request
UI/UX
User interface / User experience
labels
Jan 30, 2024
2 tasks
mahammad-mostafa
approved these changes
Jan 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏆 Approved 🏆
Well done @ITurres 👏🏻 Your branch have been approved and you can merge 📦
🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇 🥇
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Summary for Issue #7 Completion
Added:
/src/features/vehicles/AddVehicleForm.jsx
/src/helpers/createAsyncThunk.js
pending
,fulfilled
, andrejected
actions for a given async action./src/pages/AddVehiclePage.jsx
AddVehicleForm
component./src/styles/features/vehicles/AddVehicleForm.scss
AddVehicleForm
component./src/styles/pages/AddVehiclePage.scss
AddVehiclePage
component./src/helpers/setPageTitle.js
Modified:
/src/app/App.jsx
AddVehiclePage
component.ReservationPage
andAddVehiclePage
components in a fragment./src/app/store.js
vehiclesList
reducer tovehicles
and its imports accordingly./src/features/reservations/ReservationForm.jsx
vehicles
reducer has been renamed, I have updated theuseSelector
hook to reflect the change./src/features/vehicles/VehiclesList.jsx
fetchVehicles
has been named imported instead of default imported.useSelector
hook has been updated to reflect the change in thevehicles
reducer name./src/features/vehicles/VehiclesThunk.jsx
postNewVehicle
has been added to thevehicles
thunk file to handle the POST request to the API./src/pages/VehiclesPage.jsx
vehicles
folder name./src/styles/index.scss
$success-color
has been added for any success messages or style related to success.textarea
selector to the group of inputs and select styles..btn.form__error
selector has been moved from theReservationForm.scss
file to this file..btn.form__success
selector has been added to style success messages.Renamed:
/src/features/vehiclesList/
to/src/features/vehicles/
vehiclesList
folder has been renamed tovehicles
to better reflect the purpose of the feature and the variety of components it contains.vehiclesList
folder has been renamed, the following files within will appear as deleted and as new files in the PR. However, the files have not been deleted, they have only been renamed./src/features/vehiclesList/VehiclesSlice.jsx
to/src/features/vehicles/VehiclesSlice.jsx
./src/features/vehiclesList/VehiclesThunk.jsx
to/src/features/vehicles/VehiclesThunk.jsx
./src/features/vehiclesList/SplideCarousel.jsx
to `/src/features/vehicles/SplideCarousel.jsx/src/features/vehiclesList/VehiclesList.jsx
to/src/features/vehicles/VehiclesList.jsx
.Deleted:
/src/styles/features/reservations/ReservationForm.scss
.btn.form__error
selector from this file since it will be moved to theindex.scss
file.Thank you for reviewing this PR. Feel free to reach out on Slack as Arturo (Arthur) Emanuel Guerra Iturres for any queries or further assistance. 🌟