Changelog

The latest changes to the App Components.
  • Exported Thumbnail type that's used for thumbnail field of Image, Video, Embed, Audio and Container.
  • Remove dependency on @radix-ui/react-tabs, use Tabs component from @canva/app-ui-kit instead.
  • Hide tabs that contain no results.
  • Fixed not continuing to call findResourcesCallback if the previous page has a non-empty continuation but contains only "UNKNOWN" resources.
  • Excluded "application/json" option from accepted VideoMimeType, as it's only accepted by @canva/assets for Lottie files and DAM template does not support Lottie files yet.
  • Removed visibility field from Container.
  • Added access field to Container, if it's set to "read-only", user will not be able to click the "Save to ..." button from this container, or choose this container in the export page.
  • Added support to select from the hierarchy of sub-containers when saving an exported Canva design.
  • Allow saveExportedDesign callback to include an optional errorMessage field in the returned object. If and errorMessage is provided when export failed, the message will be displayed in the alert message.
  • Added export.requireContainerSelected field (default true) for Config to control whether user has to select a container before exporting their design.
  • Use @canva/app-ui-kit components DateInput and Flyout in the filter form.
  • Use ImageMimeType VideoMimeType and AudioMimeType from @canva/asset package, instead of defining them locally.
  • When user is browsing on a tab (e.g. Assets) and starts a search, when showing search results, keep user on the tab they were originally at.
  • Upgraded @canva/design from 2.0.0 to 2.1.0.
  • acceptedFileTypes for config.export has changed from Array<"PNG" | "JPG" | "PDF_STANDARD" | "VIDEO" | "GIF" | "PPTX" | "SVG"> to Array<"png" | "jpg" | "pdf_standard" | "video" | "gif" | "pptx" | "svg"> to adapt to @canva/asset v2 ExportFileType type.
  • Upgraded @canva/asset, @canva/design @canva/platform and canva/error to version 2.0.0.
  • Updated @canva/app-ui-kit version to 4.0.0 (changelog)
  • The thumbnail of image, video and embed assets would normally be used as preview images for when:

    • user is dragging the asset into their design, and
    • the asset is being uploaded.

    If the thumbnail image is blocked by CORS, the preview will look broken. In this version, we added a check on whether the thumbnail image can be displayed. If not, we will provide a fallback preview image.

  • Fixed container name position not centralized vertically.
  • Remove unnecessary invocations of getUrl.
  • Fixed container thumbnail image squeezed narrow when the container's name is long.
  • Allow the Image, Audio and Video listed in FindResourcesResponse to not provide a url. When the resource does not have a url, it has to provide a getUrl: () => Promise<string> callback that when invoked, resolves to the URL. This is useful if you need to take extra steps to decide the URL of asset you are trying to upload, for example, if you need to make an additional HTTPS request to fetch the URL.
  • If the durationMs for Audio is 0 or unspecified, the template will try to detect the actual duration of the audio by inspecting the audio metadata in DOM.
  • Add an additional parameter, designTitle?: string to saveExportedDesign. The designTitle will be the title of exported design, if it has been set by user.
  • Fixed attachment badge being stretched on Firefox and Safari.
  • If enableAppStatePersistence is turned on and user last navigated to the export design page, do not take user back to export page when they open the app again. Instead take user to the page before export.
  • Added dragAndDropPreview to Image, Video and Embed resource types. It can be used to specify a fall-back image for preview when user is dragging an asset to the design, when the image at thumbnail.url does not allow canva.com as an origin.
  • Trigger a refetch of resources when user has successfully exported their Canva design, so that the newly exported design will be reflected.
  • Allow user to click the tags on the item details page to trigger a search:
    • if the app supports filtering by tag and the current tag is available as an option, start a search by filtering with this tag;
    • if the app does not support filtering by tag or the current tag is not an available option, start a keyword search with the tag's text label.
  • Ensure the page has a bottom padding of 16px when there are no more resources to be loaded.
  • Ensure user can still navigate to the asset details page when the id contains special character.
  • Added tab field in FindResourcesRequest to indicate which tab user is currently at, so that the app backend can choose to provide different resources for different tab, even when multiple tabs are showing the same resource type.
  • Added tabs field for ContainerType, so that each container type can have their customized tabs.
  • Fix typo for "Asset" -> "Assets" tab label inside containers.
  • Allow apps to display the more info bubble even when there are no tabs.
  • Changed tabValues field for OVERVIEW tab optional, and default to all tabs on the current page.
  • Updated @canva/app-ui-kit version to 3.5.1 (changelog)
  • Fixed search menu overlapping tabs when tab carousel appears
  • Reduced the top space of back buttons to give more space for content.
  • Fixed export requested multiple times if no container needs to be selected for export.
  • Added support for customizable tabs.
  • Added support for an optional exit button.
  • Improve mobile experience with filter form.
  • Improved the drag-and-drop experience in list layout by making the whole list item draggable.
  • Restrict the maximum width for the preview image for drag-and-drop to 200px.
  • Fixed item details button not visible enough in light mode.
  • Included Audio to exported resource types.
  • Improved toolkit UI.
  • Added support for audio resource.
  • Added two optional config, resourcesPerPage and containersPerPage.
  • Fixed type cannot be resolved correctly as ESM modules.
  • Fixed inconsistent width of the scrollable area when user has different OS or browser settings for scrollbar.
  • Fixed uploading of asset will fail if the asset id contains non-alphanumeric characters.
  • Add support for dynamically fetch filters during run time.
  • Allow Image, Video and Embed resources to have attachments, allow user to add image/video/embed attachments to their design, and open any other attachment types in a new tab.
  • Show export button when user has navigated inside a container or search result page.
  • Change Tag type to be value-label instead of id-name to be consistent with all other filters
  • Remove getFilterTags callback from props (we have a more powerful alternative coming out soon)
  • Fixed clearing filter does not exit search result page when query string is empty.
  • Make scroll smooth when hiding sort bar.
  • Fix SearchableListView overflow caused by paddings.
  • Fix progress bar starting too early for export.
  • Add empty message when there are no containers to choose for export.
  • Make sure placeholders have consistent shape and layout as assets.
  • Remove border from video cards.
  • Fix export page broken because ToastProvider is unavailable.
  • Fix sort menu blinks when repeatedly triggering scroll event.
  • UI improvement: Improve masonry display and infinite scrolling using react-infinite-scrollers and Masonry component from @canva/app-ui-kit.
  • UI improvement: Combine error or empty message into one on the "All" tab when no results are available.
  • Fix updateDate and createDate cannot be shown on item details view, when provided a date string instead of Date object
  • Fix filter button dis-positioned for some users
  • Rename config.search.filterFormConfig.containerTypeFilters to config.search.filterFormConfig.containerTypes
  • Apply generic type ContainerTypeKey on config.search.filterFormConfig.containerTypes, config.export.containerTypes, findResourcesRequest.containerTypes and findResourcesRequest.parentContainerType
  • Renamed filter fieldName to label
  • Added additional ListingSurface option for config.containerTypes, "SEARCH". Once included in listingSurfaces of a container type, this container type can be listed in the search results when user is searching using query/filters.

  • Added additional parentContainerType field in FindResourcesRequest, this field be provided in the request when searching for results from inside a container.

  • Fixed search suggestion will pop out unexpectedly when user types in filter form

  • Fixed redundant retry attempts when FindResourcesCallback returns an error

  • Replaced all exported enums with type unions of string literals.
  • Removed unnecessarily exported types.
  • Fixed importing the package from a node.js environment not working by removing React component from node.js environment export.