跳转至

Resource List(资源列表(Resource List))

The Resource List widget is used to display various types of Foundry resources:

Files and Projects resources

This type of list is used to display collections of Files and Projects resources, either fixed statically or generated dynamically for every user viewing the widget, in accordance with existing Files and Projects hierarchy and permissions.

The Files and Projects resources setup menu.

When the Files and Projects resources option is chosen from the Type of the Resource list dropdown menu in the widget's configuration, you can also select a subtype of resources using the Content of the Resource list menu:

  • Static: users can manually define a list of resources to display in the list.
  • Dynamic:
  • Recent: resources that have been recently interacted with by the user.
  • Favorite: resources that have been favorited by the user.
  • Folders: resources located in a list of projects and/or folders specified by the user.
  • Tags: users can specify a list of tags so that resources that have one of these tags will be displayed.

The Files and Projects resources setup menu.

Object types

This type of list is used to display collections of object types, either fixed statically or generated dynamically for every user viewing the widget, in accordance with existing Ontology permissions and settings.

The object types resources setup menu

When the Object types option is chosen, you can choose one the following subtypes from the Content of the Object type list menu:

  • Static: users can manually define a list of object type resources to be displayed.
  • Dynamic:
  • All: every object type visible to the user in the Ontology.
  • Prominent: object types that are visible to the user that have been marked as prominent.
  • Favorite: object types that have been favorited by the user.

The object types resources setup menu

Object sets

This type of list is used to display a statically fixed collection of object sets, where each item is backed by a Workshop object set variable. To create an Object set list, choose the Object sets option from the top-level dropdown in the widget's configuration.

The object sets resources setup menu

Below is an example of a module that contains multiple Resource lists. Files and Projects resources are located on the top of the module displayed horizontally. Below them, the section titled Your favorite object types contains object types, and the column next to the object types contains object sets.

An example Workshop module with different types of the Resource List displayed

The Resource list widget also supports a number of interactions and display options, including:

  • Two item formats:
  • List
  • Image cards
  • Three display styles:
  • Minimal
  • Prominent
  • Classic

The configuration for minimal display style for list format The configuration for classic display style for list format The configuration for prominent display style for list format

The configuration for minimal display style for image card format The configuration for classic display style for image card format The configuration for prominent display style for image card format

Display overrides

For each of the list types, if the list is statically fixed then each item can have its display customized. By default, the widget will show the item's display metadata identical to the ones a resource has in Files and Projects or in the Ontology. For example, a Slate dashboard will display a Slate icon the title that appears in the Slate app. Similarly, an object type will show its Ontology icon and title. In some cases it might be desirable to provide different values for these display metadata, or, in case of image card list format, to provide a specific image called a thumbnail for each item.

The configuration for display overrides for an item on static list

To customize an item's display, select that item in the widget's configuration editor and toggle on the Display Overrides section. The following metadata can be specified or overridden:

  • Title: Can be overridden with a static string or a string variable.
  • Description: Can be overridden with a static string or a string variable.
  • Style: Can be overridden with a choice of minimal, classic, or prominent.
  • Icon: Can be overridden with a choice of the name and a predefined or custom color.
  • Item visibility: A Boolean variable can be chosen to control the visibility of the item. If the value is false, the item will be hidden on the list.
  • Thumbnail (only with image card format): An image resource from Files and Projects can be chosen here. The resource has to be uploaded to Foundry first.
  • Thumbnail position (only with image card format): Can be overridden with a choice of top, right, bottom, or left.

The configuration for display overrides for an item on static list

Integration with Workshop variable and eventing framework

Each item on the Resource list is interactive. The action performed will depend on the type of the list:

  • For the Files and Projects Resource list, selecting a resource item will open that resource in the default Foundry application for that resource in a new browser tab. If the user is in a Carbon workspace and the resource can be opened in Carbon, the resource will open in new Carbon tab.
  • An item representing a dataset will be opened in the Dataset Preview application in a new browser tab. Since datasets cannot be opened directly in Carbon, they will always open in Dataset Preview.
  • An item representing a Slate dashboard will be opened in a Slate application in a new browser tab, or in a new Carbon tab if user is in Carbon.
  • For the object types Resource list, selecting an object type item will open a new exploration Object Explorer seeded with all objects of that object type. The new exploration will be opened in a new browser tab, or in a new Carbon tab, if user is in Carbon.
  • For the object set Resource list, selecting an object set item will open that object set in Object Explorer in a new browser tab, or in a new Carbon tab, if user is in Carbon.

For all types of the Resource list, you can override the default action when the widget displays a static list of items. In widget's configuration editor, select the item and add any number of standard Workshop Events. Use the On selection of resource for Files and projects resources, On selection of object type for object type resources, and On selection of object set for object set resources.

Selection of a Workshop event which should happen when the item in the list is clicked

You can reference the selected object type item or object set item itself in the Event configuration if the Selected object type or Selected object set variable is set in the main widget configuration for the correct type. Refer to Workshop Events for more information on using variables in Events.

In the Selected object type or Selected object set section of the main widget configuration, you can set the variable that will contain the value of the selected object type or object set.

Configuration for the variable holding selected item on the list

Navigate to the configuration of a specific item by selecting that item in the Content of the resource list section. Then use the configured Selected object type or Selected object set variable in the Event configuration. In the example below, the variable is a parameter for the Open Object explorer Event.

Configuration for using selected item in a Workshop event


中文翻译

资源列表(Resource List)

资源列表(Resource List) 组件用于展示各类 Foundry 资源:

文件和项目资源(Files and Projects resources)

此类列表用于展示文件和项目资源的集合,可根据现有的文件和项目层级结构与权限,以静态方式固定设置,或为每位查看组件的用户动态生成。

文件和项目资源设置菜单

在组件配置中,从资源列表类型(Type of the Resource list)下拉菜单中选择文件和项目资源(Files and Projects resources)选项后,还可通过资源列表内容(Content of the Resource list)菜单选择资源的子类型:

  • 静态(Static):用户可手动定义要在列表中展示的资源列表。
  • 动态(Dynamic):
  • 最近(Recent):用户近期交互过的资源。
  • 收藏(Favorite):用户已收藏的资源。
  • 文件夹(Folders):位于用户指定的项目和/或文件夹列表中的资源。
  • 标签(Tags):用户可指定标签列表,带有其中任一标签的资源将被展示。

文件和项目资源子类型设置菜单

对象类型(Object types)

此类列表用于展示对象类型的集合,可根据现有的本体论(Ontology)权限与设置,以静态方式固定设置,或为每位查看组件的用户动态生成。

对象类型资源设置菜单

选择对象类型(Object types)选项后,可从对象类型列表内容(Content of the Object type list)菜单中选择以下子类型之一:

  • 静态(Static):用户可手动定义要展示的对象类型资源列表。
  • 动态(Dynamic):
  • 全部(All):用户在本体论(Ontology)中可见的所有对象类型。
  • 突出(Prominent):用户可见且已被标记为突出的对象类型。
  • 收藏(Favorite):用户已收藏的对象类型。

对象类型资源子类型设置菜单

对象集(Object sets)

此类列表用于展示静态固定的对象集集合,其中每个项目均由一个 Workshop 对象集变量 支持。要创建对象集列表,请从组件配置的顶级下拉菜单中选择对象集(Object sets)选项。

对象集资源设置菜单

以下是一个包含多个资源列表(Resource List)的模块示例。文件和项目资源位于模块顶部,以水平方式展示。其下方是标题为您最喜爱的对象类型(Your favorite object types)的部分,包含对象类型,而对象类型旁边的列则包含对象集。

展示不同类型资源列表(Resource List)的 Workshop 模块示例

资源列表(Resource List)组件还支持多种交互和显示选项,包括:

  • 两种项目格式:
  • 列表(List)
  • 图片卡片(Image cards)
  • 三种显示样式:
  • 极简(Minimal)
  • 突出(Prominent)
  • 经典(Classic)

列表格式极简显示样式配置 列表格式经典显示样式配置 列表格式突出显示样式配置

图片卡片格式极简显示样式配置 图片卡片格式经典显示样式配置 图片卡片格式突出显示样式配置

显示覆盖(Display overrides)

对于每种列表类型,如果列表是静态固定的,则每个项目都可以自定义其显示方式。默认情况下,组件将显示与资源在文件和项目或本体论(Ontology)中相同的显示元数据。例如,Slate 仪表盘将显示 Slate 图标以及 Slate 应用中显示的标题。同样,对象类型将显示其本体论(Ontology)图标和标题。在某些情况下,可能需要为这些显示元数据提供不同的值,或者对于图片卡片列表格式,为每个项目提供特定的缩略图(thumbnail)图像。

静态列表中项目的显示覆盖配置

要自定义项目的显示,请在组件配置编辑器中选择该项目,然后打开显示覆盖(Display Overrides)部分。可以指定或覆盖以下元数据:

  • 标题(Title):可使用静态字符串或字符串变量进行覆盖。
  • 描述(Description):可使用静态字符串或字符串变量进行覆盖。
  • 样式(Style):可选择极简(minimal)、经典(classic)或突出(prominent)进行覆盖。
  • 图标(Icon):可选择图标名称以及预定义或自定义颜色进行覆盖。
  • 项目可见性(Item visibility):可选择布尔变量来控制项目的可见性。如果值为 false,该项目将在列表中隐藏。
  • 缩略图(Thumbnail)(仅限图片卡片格式):可在此处选择文件和项目中的图像资源。该资源必须首先上传到 Foundry。
  • 缩略图位置(Thumbnail position)(仅限图片卡片格式):可选择顶部(top)、右侧(right)、底部(bottom)或左侧(left)进行覆盖。

静态列表中项目的显示覆盖配置

与 Workshop 变量和事件框架的集成

资源列表(Resource List)中的每个项目都是可交互的。执行的操作将取决于列表的类型:

  • 对于文件和项目资源列表(Files and Projects Resource list),选择某个资源项目将在新的浏览器标签页中,使用该资源的默认 Foundry 应用程序打开该资源。如果用户在 Carbon 工作区中,且该资源可在 Carbon 中打开,则资源将在新的 Carbon 标签页中打开。
  • 代表数据集(dataset)的项目将在新的浏览器标签页中,于数据集预览(Dataset Preview)应用程序中打开。由于数据集无法直接在 Carbon 中打开,它们将始终在数据集预览(Dataset Preview)中打开。
  • 代表 Slate 仪表盘的项目将在新的浏览器标签页中,于 Slate 应用程序中打开;如果用户在 Carbon 中,则会在新的 Carbon 标签页中打开。
  • 对于对象类型资源列表(Object types Resource list),选择某个对象类型项目将打开一个新的探索性对象浏览器(Object Explorer),其中预填充了该对象类型的所有对象。新的探索将在新的浏览器标签页中打开;如果用户在 Carbon 中,则会在新的 Carbon 标签页中打开。
  • 对于对象集资源列表(Object set Resource list),选择某个对象集项目将在新的浏览器标签页中,于对象浏览器(Object Explorer)中打开该对象集;如果用户在 Carbon 中,则会在新的 Carbon 标签页中打开。

对于所有类型的资源列表(Resource List),当组件显示静态项目列表时,您可以覆盖默认操作。在组件配置编辑器中,选择该项目并添加任意数量的标准 Workshop 事件(Workshop Events)。对于文件和项目资源,使用选择资源时(On selection of resource);对于对象类型资源,使用选择对象类型时(On selection of object type);对于对象集资源,使用选择对象集时(On selection of object set)

选择点击列表项目时应触发的 Workshop 事件

如果在主组件配置中为正确类型设置了所选对象类型(Selected object type)所选对象集(Selected object set)变量,则可以在事件(Event)配置中引用所选的对象类型项目或对象集项目本身。有关在事件(Events)中使用变量的更多信息,请参阅 Workshop 事件(Workshop Events)

在主组件配置的所选对象类型(Selected object type)所选对象集(Selected object set)部分,您可以设置将包含所选对象类型或对象集值的变量。

用于保存列表中选中项目的变量配置

通过在资源列表内容(Content of the resource list)部分中选择特定项目,导航到该项目的配置。然后在事件(Event)配置中使用已配置的所选对象类型(Selected object type)所选对象集(Selected object set)变量。在下面的示例中,该变量是打开对象浏览器(Open Object explorer)事件(Event)的一个参数。

在 Workshop 事件中使用所选项目的配置