Skip to content

Conversation

@abp6318
Copy link
Contributor

@abp6318 abp6318 commented Oct 31, 2025

  1. Description:
    I realized there was a much nicer way to do this vs what I thought was needed previously. All we need to do is pass in a default thumbnail image string if the item is of type Image. The arcgis-hub-image-picker does all the work that I thought we'd need to add around the default image

  2. Instructions for testing: see https://github.com/ArcGIS/opendata-ui/pull/15367

  3. Closes Issues: https://devtopia.esri.com/dc/hub/issues/14191

  4. Updated meaningful TSDoc to methods including Parameters and Returns, see Documentation Guide

  5. Either ran npm run changeset or this change does not require a release.

  6. These changes have been verified by QA using a ?uiVersion that includes a PR-Preview of this branch and the v_req label has been applied to the issue.

  7. OD-UI E2E tests pass against these changes using a ?uiVersion that includes a PR-Preview of this branch

@abp6318 abp6318 self-assigned this Oct 31, 2025
@abp6318 abp6318 added the bug Something isn't working label Oct 31, 2025
@changeset-bot
Copy link

changeset-bot bot commented Oct 31, 2025

🦋 Changeset detected

Latest commit: 1e2e10b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@esri/hub-common Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@abp6318 abp6318 requested a review from Copilot October 31, 2025 20:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the default thumbnail image display for Image-type items in workspaces by passing the item's data URL as the default thumbnail. The solution leverages the existing arcgis-hub-image-picker component rather than adding new custom logic.

Key Changes:

  • Added getDefaultImageEntityThumbnail helper function to determine if content is an Image type and return its data URL
  • Modified getThumbnailUiSchemaElement to accept an optional defaultThumbnailUrl parameter
  • Updated buildUiSchema in ContentUiSchemaEdit to pass the Image entity's data URL as the default thumbnail

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

File Description
packages/common/src/core/schemas/internal/getThumbnailUiSchemaElement.ts Added getDefaultImageEntityThumbnail helper and updated function signature to accept optional default thumbnail URL
packages/common/src/content/_internal/ContentUiSchemaEdit.ts Updated thumbnail UI schema call to include default image for Image-type content
packages/common/test/core/schemas/internal/getThumbnailUiSchemaElement.spec.ts Added tests for new getDefaultImageEntityThumbnail function
.changeset/giant-poets-fall.md Added changeset documenting the fix

Copy link
Contributor

@knbhagat knbhagat left a comment

Choose a reason for hiding this comment

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

LGTM - Great job Aaron

@abp6318 abp6318 merged commit 84d5135 into master Nov 7, 2025
3 checks passed
@abp6318 abp6318 deleted the b/14191-default-image-in-workspaces branch November 7, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants