upcoming: [UIE-9398] - Private Image Sharing Tabs New Layout (v2)#13407
upcoming: [UIE-9398] - Private Image Sharing Tabs New Layout (v2)#13407pmakode-akamai wants to merge 15 commits intolinode:developfrom
Conversation
dwiley-akamai
left a comment
There was a problem hiding this comment.
Verification steps ✅
Code review ✅
@harsh-akamai If a user enters an invalid value, it won't match any valid |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new tabbed layout for the Images landing page as part of the Private Image Sharing feature, controlled by a feature flag. The implementation adds v2 routes for the Image Library (with sub-tabs for owned, shared, and recovery images) and Share Groups tabs, while maintaining the existing legacy layout for when the feature flag is disabled.
Changes:
- Added
isPrivateImageSharingEnabledto router context and integrated feature flag throughout routing logic - Created new v2 routes (
/images/image-libraryand/images/share-groups) with redirect logic based on feature flag state - Implemented new tabbed UI components (
ImagesLandingV2andImageLibraryTabs) with placeholder content for future implementation - Added utility functions and tests for managing image library sub-tab state
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/manager/src/routes/types.ts | Added isPrivateImageSharingEnabled property to RouterContext for feature flag integration |
| packages/manager/src/routes/index.tsx | Initialized isPrivateImageSharingEnabled to false in default router context |
| packages/manager/src/routes/images/index.ts | Created v2 routes for Image Library and Share Groups with feature flag-based redirects |
| packages/manager/src/routes/images/ImagesRoute.tsx | Added useEffect-based navigation logic to handle feature flag toggling at runtime |
| packages/manager/src/features/Images/utils.ts | Added ImageLibraryType, ImageLibrarySubTab types and getImageLibrarySubTabIndex helper function |
| packages/manager/src/features/Images/utils.test.tsx | Added comprehensive test coverage for getImageLibrarySubTabIndex utility function |
| packages/manager/src/features/Images/ImagesLanding/v2/imagesLandingV2LazyRoute.tsx | Created lazy route for v2 Images landing page |
| packages/manager/src/features/Images/ImagesLanding/v2/ImagesLandingV2.tsx | Implemented main v2 landing page with Image Library and Share Groups tabs |
| packages/manager/src/features/Images/ImagesLanding/v2/ImageLibraryTabs.tsx | Implemented sub-tabs for owned, shared, and recovery images within Image Library |
| packages/manager/src/features/Images/ImagesLanding/imagesLandingLazyRoute.ts | Updated import path to be relative |
| packages/manager/src/features/Images/ImagesLanding/ImagesLanding.tsx | Removed default export in favor of named export |
| packages/manager/src/features/Images/ImagesLanding/ImagesLanding.test.tsx | Updated import to use named export |
| packages/manager/src/Router.tsx | Integrated isPrivateImageSharingEnabled hook into router context |
| packages/manager/.changeset/pr-13407-upcoming-features-1771317211182.md | Added changeset documenting the feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/manager/src/features/Images/ImagesLanding/v2/ImageLibraryTabs.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
When I just change query param manually to switch to another sub tab, entire page is reloads which is weird. Is that an expected behavior? It should behave similar to how we switch by clicking on tabs.
There was a problem hiding this comment.
That's the expected behavior -- It's actually just native standard browser behavior. TanStack handles the silent updates (client-side) when we click tabs in the UI, but the second you change url or query params and hit enter in the address bar, the browser takes over and triggers a hard reload to fetch the page from server again. Every SPA works this way -- we can control the navigation inside the app, but we can't stop the browser from refreshing when the URL is manually submitted.
There was a problem hiding this comment.
If TanStack handles this way, its ok. But that's not the definition of SPA. Single page applications are meant to refresh the page within the app not browser level refresh.
There was a problem hiding this comment.
I mean when a URL is manually entered and submitted in the address bar, neither an SPA nor any web application has control at that moment. The browser initiates a new request to the server, which results in a full page reload.
For eg., you can try manually changing the query parameters in the address bar on Create Linode -> StackScripts (/linodes/create/stackscripts?subtype=Community) -- it behaves the same way.
There was a problem hiding this comment.
Ok. But SPA shouldn't work this way ideally. You can take a look at any apps we have in ACC (ex: https://control.akamai.com/apps/edge-diagnostics). Manually updating path params within SPA should reload just the app not entire browser unless user is logged out of session.
There was a problem hiding this comment.
I think the difference could be due to the routing strategy used. That app uses hash-based routing (/#/…), so manual URL changes (or query params) in the address bar are handled client-side. Our React app uses TanStack Router with browser history, so manually editing query params triggers a full page reload. Tab clicks still work SPA style because TanStack handles them internally. cc @abailly-akamai
Cloud Manager UI test results🔺 3 failing tests on test run #12 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/vpc/vpc-details-page.spec.ts,cypress/e2e/core/linodes/linode-storage.spec.ts,cypress/e2e/core/firewalls/firewall-landing-page.spec.ts" |
|||||||||||||||||||||||
| <SafeTabPanel index={1}> | ||
| <Notice variant="info">Share Groups is coming soon...</Notice> | ||
| </SafeTabPanel> | ||
| </TabPanels> |
There was a problem hiding this comment.
Why are we not using routed tabs?? this is the legacy way of doing things. You need lazy routes and an Outlet


Description 📝
This PR adds a new tabs layout on the Images Landing Page and introduces the relevant v2 routes for private image sharing. It also includes feature flag logic so we can roll out the new layout gradually while keeping the old layout working as before
Note
This work is part of breaking down PR #13010 [CLOSED] into smaller, more reviewable chunks. The split PRs will include additional improvements based on updated mockups. We are gradually moving to the v2 implementation, and once it is fully GA, the legacy v1 Images layout can be cleaned up from the codebase.
Changes 🔄
Scope 🚢
Target release date 🗓️
N/A
Preview 📷
How to test 🧪
Prerequisites
Private Image Sharingfeature flagVerification steps
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
As an Author, before moving this PR from Draft to Open, I confirmed ✅