Skip to content
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 #19 🎫: Refactor to migrate es6 FC to es5 FC - and - Fix 'LikeButton' UI FC non-persistend liked style #20

Merged
merged 5 commits into from
Apr 13, 2024

Conversation

ITurres
Copy link
Owner

@ITurres ITurres commented Apr 12, 2024

arthur iturres logo

Pull Request Summary for Issue #19 Completion


Overview:

As described in the issue overview, the changes made in this branch are related to refactoring all functional components from ES6 fat arrow functions to ES5 functions. This was done to ensure that the codebase is consistent and to make it easier for other developers to understand the code. Aditionally and more importantly, this changes was made to ensure a better debugging experience with the React DevTools, since all the components written in ES5 functions are named and can be easily identified in the DevTools.

Changes Made:

Added:

  • n/a.

Modified:

  • /package.json

  • /package-lock.json

    • Updated gh-pages version from 5.0.0 to 6.1.1.

The following components were refactored from ES6 fat arrow functions to ES5 functions:

  • /src/components/UI/*

    • ContactForm.tsx.

    • ExpertiseLinks.tsx.

    • FileTabsNavbar.tsx.

    • LineCount.tsx.

    • Navbar.tsx.

    • SplideCarousel.tsx.

    • SplideCarouselSlide.tsx.

    • LikeButton.tsx.

      • Additionally, I have address the issue with the like button not showing its liked style class when the user clicks on it.
  • /src/components/animations/*

    • AccessPageVideo.tsx.
    • Drone.tsx.
    • FloatingAstronaut.tsx.
  • /src/components/pages/*

    • AboutPage.tsx.
    • AccessPage.tsx.
    • ContactPage.tsx.
    • HomePage.tsx.
    • ExpertiseSummaryPage.tsx.
    • NotFoundPage.tsx.
    • ProjectsPage.tsx.

Deleted/Renamed

  • n/a.

Impact:

The changes made in this branch are not expected to have any impact on the functionality of the application. The changes are purely cosmetic and are meant to improve the readability of the codebase.
These changes will impact all UI, animations, and pages components in the application.

Testing:

  • n/a.

Related Issues:

Dependencies:

  • n/a.

Additional Notes:

  • The changes made in this branch have just been deployed, check the new SemVer v2.3.1.

ITurres added 4 commits April 9, 2024 22:21
- 'AccessPageVideo.tsx'.
- 'Drone.tsx'.
- 'FloatingAstronaut.tsx'.
- 'AboutPage.tsx'.
- 'AccessPage.tsx'.
- 'ContactPage.tsx'.
- 'ExpertiseSummaryPage.tsx'.
- 'HomePage.tsx'.
- 'NotFoundPage.tsx'.
- 'ProjectsPage.tsx'.
- 'ContactForm.tsx'.
- 'ExpertiseLinks.tsx'.
- 'FileTabsNavbar.tsx'.
- 'LikeButton.tsx'.
- 'LineCount.tsx'.
- 'Navbar.tsx'.
- 'SplideCarousel.tsx'.
- 'SplideCarouselSlide.tsx'.
- Fixed by swapping the 'toggle' method for 'add' method
at 'styleButton' function to always persist the liked style
on the 'LikeButton' component when user keep liking the same
project.
- Simplify all the 'setWasLiked' method logic to just
toggle the 'wasLiked' state value, without the need to
check the previous value.
@ITurres ITurres added enhancement New feature or request UI/UX redeploy gh-pages deployment Optimize Optimization: Efficiency & Performance refactor Code refactoring labels Apr 12, 2024
@ITurres ITurres self-assigned this Apr 12, 2024
@ITurres
Copy link
Owner Author

ITurres commented Apr 13, 2024

Commit fe85f13 message is wrong, the correct one is:

Chore: Update 'gh-pages' version from 5.0.0 to 6.1.1

@ITurres
Copy link
Owner Author

ITurres commented Apr 13, 2024

✅ Good for merge.

@ITurres ITurres merged commit c2ef6c2 into development Apr 13, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Optimize Optimization: Efficiency & Performance redeploy gh-pages deployment refactor Code refactoring UI/UX
Development

Successfully merging this pull request may close these issues.

[2pt] Migration Plan for Converting ES6 Arrow Function Components to ES5 Function Components
1 participant