Overview
TheResourceInfo component displays metadata information for Designer Resource objects, including description, UID (unique identifier), and file path. It subscribes to these properties and automatically pauses updates when not visible in the viewport.
This component is conditionally rendered by ObjectSubscription when the subscribed object is detected to be a Resource instance.
Source: src/components/ResourceInfo.vue
Props
The LiveUpdate instance used to subscribe to resource properties.
The name of the Designer Resource object to display information for.
Features
Resource Metadata Subscription
The component subscribes to three key resource properties using Python expressions:src/components/ResourceInfo.vue:28
The resource’s description field
The unique identifier, formatted as a hexadecimal string (e.g.,
0x1a2b3c4d)The file system path to the resource
Visibility Optimization
The component usesuseSubscriptionVisibility to automatically pause subscription updates when the component is scrolled out of view:
src/components/ResourceInfo.vue:36
This optimization helps reduce unnecessary network traffic and computational overhead when displaying multiple resources.
Fixed Update Rate
Resource metadata is updated at 1000ms (1 second) intervals, which is appropriate since this information typically doesn’t change frequently:Usage
ObjectSubscription:
Component Structure
Styling
The component features a light gray background with a border to visually distinguish resource metadata from property subscriptions:src/components/ResourceInfo.vue:48
Resource Detection
TheObjectSubscription component determines if an object is a Resource using:
isResource is true will the ResourceInfo component be rendered.