Skip to content

Cli#375

Closed
Stivenjs wants to merge 34 commits into
mainfrom
cli
Closed

Cli#375
Stivenjs wants to merge 34 commits into
mainfrom
cli

Conversation

@Stivenjs
Copy link
Copy Markdown
Contributor

@Stivenjs Stivenjs commented Nov 2, 2025

Note

Introduces Theme Studio with SSE-driven hot-reload and bidirectional selection, adds preview flow and dev APIs, refactors Liquid compiler, updates themes/engine/cache, and adds tests/docs.

  • Theme Studio (new package):
    • Visual editor UI (sidebar, settings, preview), hooks, DevServer adapter, preview renderer.
    • Bidirectional selection via fasttify_attributes + injected iframe script.
    • Integrates image selector; new Studio page at app/store/[slug]/studio.
  • Backend/APIs:
    • SSE dev endpoints: GET /stores/[storeId]/dev/ws, POST /stores/[storeId]/dev/update.
    • Theme endpoints: list templates, layout structure, template structure.
    • Store page supports /preview?domain=... via PreviewPageController.
  • Liquid engine/refactor:
    • New compiler module (LiquidCompiler, shared instance, factory) and exports.
    • fasttify_attributes filter + builder; render tag loads snippet schema/blocks.
    • Section renderer passes sectionId/pageType; template loader uses compiler.
  • Caching/dev sync:
    • Smarter cache invalidation (include page_, layout/sections invalidate all pages).
    • Dev synchronizer improves invalidation; logs and type detection.
  • Themes/Rendering:
    • Example theme updates: add blocks, schemas, and section.fasttify_attributes; tweak hero and header.
    • Rendering from JSON passes sectionId/pageType.
  • Platform/config:
    • Domain decoding in DomainService; allowedDevOrigins in Next config; add workspace packages/theme-studio.
    • Bump pnpm to 10.20.0; Amplify build uses same.
  • Docs/Tests/Legal:
    • Add Theme Studio selection doc and docs index entry.
    • Unit tests for compiler, filters, attributes builder; Jest polyfills.
    • Add Shopify Polaris notice to LICENSE and new NOTICE.md.

Written by Cursor Bugbot for commit a112034. This will update automatically on new commits. Configure here.

This commit replaces the usage of the Thumbnail component with the new ContentThumbnail component across multiple content-related components, including ContentDetailsModal, ContentCardMobile, ContentTableRow, and ImageCard. This change enhances consistency in image rendering and improves maintainability by centralizing image display logic.
…ckage and upgrade pnpm version

This commit adds the new theme-studio package to the workspace in package.json, pnpm-lock.yaml, and pnpm-workspace.yaml. It also updates the pnpm version from 10.18.0 to 10.20.0. Additionally, it modifies tsconfig.base.json to include path mappings for the theme-studio package and updates StoreLayoutClient.tsx to account for new routing requirements.
This commit introduces a preview feature in the StorePage component, allowing for theme previews via the /preview route. It adds a new PreviewPageController to handle preview logic and updates the generateMetadata function to return default values for previews. Additionally, the DomainService is modified to decode store parameters, ensuring proper domain resolution. The ThemeStudio and PreviewPane components are updated to accept and utilize the domain prop, improving the overall preview experience.
…orHeader component for improved accessibility and localization

This commit adds attribution for Shopify Polaris to the LICENSE file, ensuring proper credit for the derived components. In the EditorHeader component, the tooltip content for the exit button is updated to Spanish ("Salir"), and the button's loading state is enhanced to display a message when saving. Unused imports for the SearchIcon and SaveIcon are removed to streamline the code.
…d localization

This commit updates the tooltip content for the exit button in the EditorHeader component to Spanish ("Salir") and enhances the loading state to display a message during saving. Additionally, it removes unused imports for SearchIcon and SaveIcon, streamlining the code.
…on and preview functionality

This commit introduces several updates to the ThemeStudio component, including the integration of a page selector in the EditorHeader for better navigation between pages. It also updates the PreviewPane to accept a currentPath prop, allowing for dynamic iframe updates based on the selected page. Additionally, the usePreviewUrl hook is modified to handle path parameters, improving the overall preview experience. These changes enhance user interaction and streamline the theme editing process.
…tion and functionality

This commit modifies the hero section in the fasttify theme to use English collection handles and updates the alt text for images to enhance accessibility. Additionally, it refines the template configuration by consolidating settings for collections per page and ensuring proper localization for button texts. These changes improve the overall user experience and maintainability of the theme.
This commit enhances the PreviewPane and useIframeNavigation hook by implementing a mechanism to prevent unnecessary iframe reloads when the preview URL remains unchanged. Additionally, it introduces a helper function to extract the real path from the iframe's URL, ensuring that path changes are only processed when they differ from the current path and are not navigations to the /preview route. These improvements streamline the user experience and reduce redundant updates during navigation.
…anagement

This commit updates the Sidebar component to accept a currentPageId prop, allowing it to display the title of the current page dynamically. It also integrates loading state management for template and layout structures, improving user experience during data fetching. The Sidebar now shows a loading indicator while fetching necessary data, ensuring a smoother interaction within the ThemeStudio.
This commit enhances the Sidebar component by introducing the SectionGroup component for rendering header, template, and footer sections. It incorporates state management for expanded sections and selected items, improving the organization and interactivity of the sidebar. Additionally, it refines the layout structure and ensures a more cohesive user experience during theme editing.
…and interaction

This commit updates the SectionGroup component to enhance the layout by adjusting the gap between items and streamlining the rendering of sorted sections. It also modifies the SectionItem component to improve the hover effect, allowing for a smoother transition between icons. These changes enhance the user experience and maintainability of the sidebar components in the ThemeStudio.
…eparation

This commit updates the Sidebar component by adding Divider elements to visually separate the sections within the sidebar. The changes include adjustments to the layout to ensure proper spacing and alignment, enhancing the overall user experience and organization of the sidebar content in the ThemeStudio.
…mization

This commit introduces new block configurations to the cart, featured products, footer, hero, home collections, and newsletter popup sections in the fasttify theme. Each section now includes customizable blocks with settings for labels and links, allowing for greater flexibility in theme design. Additionally, the header snippet is updated to include a schema for menu items, enhancing the overall structure and usability of the theme components.
…e button display logic

This commit modifies the hero section in the fasttify theme to allow for customizable action buttons through block configurations. It introduces logic to display buttons based on the presence of custom blocks, ensuring a more flexible and dynamic user experience. Additionally, the template configuration is updated to include predefined button blocks, improving the overall functionality and customization options for the hero section.
…ompileTemplate

This commit adds a polyfill for structuredClone in jest.setup.ts to ensure compatibility with Node versions below 17. Additionally, it refactors the LiquidEngine class to utilize the compileTemplate function for parsing templates, enhancing the template compilation process. The TemplateLoader and LiquidSyntaxRules classes are also updated to reflect this change, improving overall code consistency and functionality.
@Stivenjs Stivenjs self-assigned this Nov 2, 2025
@github-actions github-actions Bot added documentation Improvements or additions to documentation frontend backend themes tests config labels Nov 2, 2025
This commit cleans up the LiquidEngine class by removing the export of the singleton instance and the class itself for testing purposes. This change simplifies the module's interface and focuses on the core functionality of the LiquidEngine, improving code clarity and maintainability.
…tion

This commit updates the pnpm version from 10.18.0 to 10.20.0 in the amplify.yml and various GitHub workflow files (build.yml, prettier.yml, unit_test.yml). This change ensures consistency in package management and leverages improvements in the newer pnpm version.
… statistics tracking

This commit introduces additional functionality to the CacheInvalidationService, including the tracking of invalidation counts and timestamps. It refines the cache invalidation process by adding specific handling for layout, section, and snippet template changes, ensuring that all relevant pages are invalidated appropriately. The TemplateDevSynchronizer is also updated to detect template types for more targeted cache invalidation, improving overall cache management and performance.
…e management

This commit introduces the fasttify_attributes filter to generate data attributes for sections and blocks, improving integration with the Theme Studio. It also updates the Sidebar and PreviewPane components to utilize a centralized sidebar state, allowing for better selection management of sections and blocks. Additionally, the ThemeStudio component is enhanced to handle element clicks, improving user interaction and overall functionality.
…tegration

This commit introduces an image selector component to the ThemeStudio and SettingsPane, allowing users to select images more effectively. The ThemeStudio component now accepts an imageSelectorComponent prop, which is utilized in the SettingsPane for improved image management. Additionally, the SettingsPane has been refactored to handle grouped settings and local state synchronization, enhancing the overall user experience and functionality.
This commit updates the CSS styles for selected and hovered elements in the iframe selection script. The previous outline styles have been replaced with box-shadow properties for improved visual clarity and consistency. This change enhances the user experience by providing a more modern and subtle indication of selection and hover states.
… hover label functionality

This commit introduces the selectedElementName prop to the ThemeStudio and PreviewPane components, allowing for better identification of selected elements. It also enhances the iframe selection script to manage hover labels more effectively, providing a clearer visual indication of element selection. Additionally, the ColorSetting component is simplified by removing unnecessary styling, improving code clarity and maintainability.
…me Studio

This commit updates the CSS styles for the hover label in the iframe selection script, changing its position to fixed and adjusting the background color and padding for better visibility. Additionally, it simplifies the label positioning logic by removing unnecessary scroll calculations, enhancing performance and clarity in the selection process.
…tudio

This commit removes unused button settings from the hero section and updates the block name to "Botón de la colección". It also enhances the integration of block schemas within the Theme Studio, allowing for better identification of blocks through data attributes. The changes improve the overall clarity and maintainability of the code, ensuring a more streamlined user experience.
…Studio

This commit introduces custom block names in the JSON configuration for hero items, improving clarity in the Theme Studio. It also refines the logic for displaying block names by prioritizing custom names over schema names, enhancing the overall user experience and maintainability of the code.
This commit adds new header settings for button text and navigation in the hero section, improving the clarity of the configuration. It also includes informational fields for the button label and link, providing users with better context for their settings. These changes enhance the overall usability and maintainability of the theme configuration.
…unctionality

This commit updates the SectionItem component by separating the click handling for the section and the chevron icon. The onClick event for the section now triggers the onSelect function, while the chevron click event is managed separately to allow for expansion. This change enhances user interaction and clarity in the component's behavior, improving the overall usability of the sidebar.
…lock structure

This commit introduces support for sub-blocks in the sidebar, allowing users to select and manage nested blocks within sections. The BlockItem and SectionGroup components have been updated to handle sub-blocks, enhancing the overall structure and usability of the sidebar. Additionally, the useSelectedSection and useSidebarState hooks have been modified to accommodate the new sub-block selection logic, improving state management and user interaction within the Theme Studio.
… for sub-block support

This commit introduces the fasttifyAttributesFilter to the main filters export, enhancing the filtering capabilities. It also updates the ThemeStudio and related components to support sub-block selection, allowing for improved management of nested elements. Changes include modifications to the event handlers and selection logic to accommodate the new sub-block structure, enhancing user interaction and overall functionality in the Theme Studio.
…and integrate into htmlFilters

This commit enhances the fasttifyAttributesFilter by refining the logic for detecting parent blocks, ensuring more robust handling of nested structures. Additionally, the filter is now included in the main htmlFilters export, expanding its availability for use in the application. These changes improve the overall functionality and maintainability of the filtering system.
…me Studio with new use cases and settings management

This commit updates the pnpm-lock.yaml to ensure consistent versions of AWS SDK dependencies. Additionally, it introduces new use cases in the Theme Studio for updating section, block, and sub-block settings, as well as saving changes. The template entity is also enhanced with optional name and blocks properties, and the template repository interface is updated to include template type in the saveTemplate method. Furthermore, the SettingsPane component is refactored to utilize a new useSettingsPane hook for improved state management and hot reload functionality.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 27

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread packages/theme-studio/src/presentation/hooks/useIframeNavigation.ts
@Stivenjs Stivenjs closed this Nov 4, 2025
activeConnections.delete(connectionKey);
}
}
clearInterval(pingInterval);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Memory leak from SSE pingInterval handling

The SSE pingInterval has a memory leak. If controller.enqueue() fails during a ping, the interval clears, but the ReadableStreamDefaultController isn't removed from activeConnections, causing stale connections to accumulate in memory.

Fix in Cursor Fix in Web

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