fix: revert index page component changes#1903
Merged
Conversation
dcshzj
approved these changes
Mar 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Reverts a set of recent Index page-related component refactors/features to restore prior rendering and styling behavior, including moving ImageClient back to complex/Image and undoing ChildrenPages contain/maxColumns support.
Changes:
- Reverted
ImageClientURL prefixing centralization; callers again construct prefixedsrcvalues usingisExternalUrl+assetsBaseUrl. - Reverted
ChildrenPagesback to its previous implementation and styling; removedmaxColumnsandimageFitsupport and related Studio controls/stories. - Removed the shared
imageFitSchema/IMAGE_FITconstants introduced for the contain variant.
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/components/src/templates/next/layouts/IndexPage/IndexPage.stories.tsx | Removes IndexPage stories that exercised imageFit="contain" for ChildrenPages. |
| packages/components/src/templates/next/layouts/Collection/utils/processCollectionItems.ts | Reintroduces per-caller image URL prefixing for collection card images. |
| packages/components/src/templates/next/components/internal/Navbar/NavbarClient.tsx | Switches ImageClient import back to complex/Image. |
| packages/components/src/templates/next/components/internal/Navbar/Navbar.tsx | Reintroduces logo URL prefixing logic in the caller. |
| packages/components/src/templates/next/components/internal/ImageClient/index.ts | Removes internal ImageClient re-export (revert). |
| packages/components/src/templates/next/components/internal/ContentPageHeader/ContentPageHeader.tsx | Switches ImageClient import back to complex/Image. |
| packages/components/src/templates/next/components/internal/CollectionCard/CollectionCard.tsx | Switches ImageClient import back to complex/Image. |
| packages/components/src/templates/next/components/internal/BlogCard/BlogCard.tsx | Switches ImageClient import back to complex/Image. |
| packages/components/src/templates/next/components/complex/Video/LiteYouTubeEmbed.tsx | Switches ImageClient import path back to complex Image implementation. |
| packages/components/src/templates/next/components/complex/Video/LiteVimeoEmbed.tsx | Switches ImageClient import path back to complex Image implementation. |
| packages/components/src/templates/next/components/complex/LogoCloud/LogoCloud.tsx | Reintroduces caller-side logo URL transformation and adjusts mapping. |
| packages/components/src/templates/next/components/complex/Infopic/components/BlockInfopic.tsx | Switches ImageClient import back to complex Image implementation. |
| packages/components/src/templates/next/components/complex/InfoCards/components/InfoCardWithImage.tsx | Removes isFallback prop usage (revert of contain/fallback styling work). |
| packages/components/src/templates/next/components/complex/InfoCards/components/InfoCardWithFullImage.tsx | Removes isFallback prop usage (revert). |
| packages/components/src/templates/next/components/complex/InfoCards/components/InfoCardImage.tsx | Moves URL prefixing back into InfoCards image rendering and removes isFallback handling. |
| packages/components/src/templates/next/components/complex/InfoCards/common.ts | Reverts InfoCards shared styling (incl. title arrow styles and fallback variants). |
| packages/components/src/templates/next/components/complex/ImageGallery/ImageGalleryClient.tsx | Switches ImageClient import back to complex Image implementation. |
| packages/components/src/templates/next/components/complex/Image/index.ts | Re-exports ImageClient from complex Image module. |
| packages/components/src/templates/next/components/complex/Image/ImageClient.tsx | Reverts ImageClient to render src directly (no prefixing). |
| packages/components/src/templates/next/components/complex/Image/Image.tsx | Reintroduces caller-side URL prefixing for the Image component. |
| packages/components/src/templates/next/components/complex/Hero/HeroSearchbar/HeroSearchbar.tsx | Reintroduces caller-side background image URL prefixing. |
| packages/components/src/templates/next/components/complex/Hero/HeroLargeImage/ImageContainer.tsx | Removes passing assetsBaseUrl down; uses already-prefixed imageSrc. |
| packages/components/src/templates/next/components/complex/Hero/HeroLargeImage/HeroLargeImage.tsx | Reintroduces caller-side background image URL prefixing. |
| packages/components/src/templates/next/components/complex/Hero/HeroGradient.tsx | Reintroduces caller-side background image URL prefixing. |
| packages/components/src/templates/next/components/complex/Hero/HeroFloating.tsx | Reintroduces caller-side background image URL prefixing. |
| packages/components/src/templates/next/components/complex/Hero/HeroBlock.tsx | Reintroduces caller-side background image URL prefixing. |
| packages/components/src/templates/next/components/complex/Contentpic/Contentpic.tsx | Reintroduces caller-side content image URL prefixing. |
| packages/components/src/templates/next/components/complex/CollectionBlock/CollectionBlock.tsx | Reintroduces caller-side card image URL prefixing. |
| packages/components/src/templates/next/components/complex/ChildrenPages/ChildrenPages.tsx | Reverts ChildrenPages implementation/styling; removes maxColumns/imageFit support and restores local image handling. |
| packages/components/src/templates/next/components/complex/ChildrenPages/ChildrenPages.stories.tsx | Removes Stories that exercised imageFit="contain". |
| packages/components/src/templates/next/components/complex/Blockquote/Blockquote.tsx | Reintroduces caller-side blockquote image URL prefixing. |
| packages/components/src/schemas/internal/index.ts | Stops exporting imageFitSchema. |
| packages/components/src/schemas/internal/imageFitSchema.ts | Removes internal ImageFit schema definitions (revert). |
| packages/components/src/interfaces/constants.ts | Removes IMAGE_FIT constant (revert). |
| packages/components/src/interfaces/complex/InfoCards.ts | Inlines ImageFit schema/constants and removes isFallback from props. |
| packages/components/src/interfaces/complex/ChildrenPages/ChildrenPages.ts | Removes maxColumns and imageFit fields from ChildrenPages schema. |
| apps/studio/tests/msw/handlers/page.ts | Updates MSW page fixture content for childrenpages block. |
| apps/studio/tests/msw/handlers/folder.ts | Removes MSW listChildPages handler. |
| apps/studio/src/stories/Page/EditPage/EditIndexPage.stories.tsx | Removes use of folderHandlers.listChildPages in the story. |
| apps/studio/src/features/editing-experience/components/form-builder/renderers/controls/index.ts | Removes export for JsonFormsMaxColumnsControl. |
| apps/studio/src/features/editing-experience/components/form-builder/renderers/controls/JsonFormsMaxColumnsControl.tsx | Deletes max-columns JSONForms control (revert). |
| apps/studio/src/features/editing-experience/components/form-builder/FormBuilder.tsx | Removes renderer registration for max-columns control. |
| apps/studio/src/constants/formBuilder.ts | Removes ranking constant for ChildrenPages columns control. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+885
to
+886
| summary: false, | ||
| thumbnail: false, |
| @@ -23,16 +23,4 @@ export const folderHandlers = { | |||
| }) | |||
| }, | |||
| }, | |||
Comment on lines
+24
to
+29
| const images = baseImages.map(({ src, alt }) => { | ||
| const transformedSrc = | ||
| isExternalUrl(src) || (assetsBaseUrl === undefined && !!src) | ||
| ? src | ||
| : `${assetsBaseUrl}${src}` | ||
|
|
seaerchin
added a commit
that referenced
this pull request
Mar 23, 2026
This reverts commit 54a2e25.
2 tasks
seaerchin
added a commit
that referenced
this pull request
Mar 25, 2026
This reverts commit 54a2e25.
seaerchin
added a commit
that referenced
this pull request
Mar 25, 2026
This file contains hidden or 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
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.
Problem
Recent changes to the index page components introduced issues that need to be reverted:
isExternalUrlcheck into ImageClientThese changes caused regressions that require reverting to restore stable functionality.
Solution
This PR reverts three commits:
56229e26- Revert "refactor: centralize isExternalUrl check into ImageClient (refactor: centralize isExternalUrl check into ImageClient #1865)"3e003a35- Revert "feat(components): support contain image variant for child pages (feat(components): support contain image variant for child pages #1889)"30209a17- Revert "refactor: update RowLayout styling to match InfoCards design (refactor: update RowLayout styling to match InfoCards design #1891)"Breaking Changes
Bug Fixes:
ChildpageImagecomponent and original stylingmaxColumnsandimageFitprops that were added to ChildrenPagesImageClientback frominternal/ImageClienttocomplex/ImageisExternalUrlusage directly in components rather than centralized in ImageClientBefore & After Screenshots
N/A - This is a revert to restore previous behavior
Tests
Existing tests should pass. Manual verification that index pages render correctly with:
New scripts:
New dependencies:
New dev dependencies: