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

refactor: [M3-9157] - TanStack Router Migration for Images Feature #11578

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

abailly-akamai
Copy link
Contributor

@abailly-akamai abailly-akamai commented Jan 28, 2025

TanStack Router Migration for Images Feature

Overview 📝

  1. Router Migration
  • Removed old React Router routes and components
  • Added new TanStack Router routes in routes/images/
  • Implemented route validation and type safety
  • Added support for search params and URL parameters
  1. Component Updates
  • Updated ImagesLanding to use TanStack Router hooks
  • Refactored dialog/drawer state management to use URL parameters
  • Updated tests to use new router utilities
  • Improved error handling and loading states
  1. Key Features
  • Added type-safe route definitions
  • Implemented URL-based state management for modals/drawers
  • Added validation for route parameters and search queries
  • Maintained existing functionality while improving type safety
  1. Notable Changes
  • Moved from URL query params to TanStack Router search params
  • Replaced React Router hooks with TanStack equivalents
  • Added proper loading states for async operations
  • Improved error handling and user feedback
  1. Code Organization
  • Added new constants file for preferences and defaults
  • Separated route definitions into dedicated files
  • Improved component structure and prop types
  • Updated ESLint configuration for new router patterns

The changes maintain existing functionality while providing better type safety and state management through the URL.

Preview 📷

No visual difference/regression should be experioenced as a result of this PR

How to test 🧪

Prerequisites

Verification steps

  • Test all flows for the /images feature
    • actions (edit, delete etc)
  • Test search, sorting and pagination for the Images landing page (you can use prod-test-019 to test pagination since it has a large amount of images
  • Confirm params and prefilled fields for Deploy and Rebuild actions
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@abailly-akamai abailly-akamai self-assigned this Jan 28, 2025
@abailly-akamai abailly-akamai changed the title refactor: [M3-9157] - Tanstack Router for Images refactor: [M3-9157] - TanStack Router Migration for Images Feature Jan 30, 2025
@abailly-akamai abailly-akamai marked this pull request as ready for review January 30, 2025 22:20
@abailly-akamai abailly-akamai requested a review from a team as a code owner January 30, 2025 22:20
@abailly-akamai abailly-akamai requested review from bnussman-akamai and coliu-akamai and removed request for a team January 30, 2025 22:20
@abailly-akamai abailly-akamai requested a review from a team as a code owner January 30, 2025 22:32
@abailly-akamai abailly-akamai requested review from dmcintyr-akamai and removed request for a team January 30, 2025 22:32
Copy link

github-actions bot commented Jan 30, 2025

Coverage Report:
Base Coverage: 79.3%
Current Coverage: 79.3%

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 494 passing tests on test run #9 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing494 Passing2 Skipped101m 9s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants