06-18-2021, 03:51 PM
(This post was last modified: 06-18-2021, 03:52 PM by remkonoteboom.)
Unless there is a need to have a reusable table view that will be in many custom layouts, I often prefer to decide which columns will be present inline using element names. In this example:
We are using the "shot" view. There is nothing wrong with this as it allows you use the "shot" view in multiple places ... if you do have another view, you can always use:
In this case, it would only display the elements list here (preview,code,status), but cascade to "shot" view for the definition and if an element doesn't exist, it will cascade to the "definition" view.
Generally, the "definition" view will contain all the base definitions. However, as you can see in the current "definition" entry for shot, it has, over the years, become a monstrosity. If an element definition will only be used once, it is probably best to create a new "view" with that one entry. The <element_names> tag removes the vast majority of needs to have a separate view for a given widget.
In the end, none of it is wrong. It is just a matter of design and readability. I prefer to keep local definitions as local as possible and reserve "definition" for the global definition (the exact opposite of what we see in the VFX module). So, delete element entries and views as you see fit, if they are redundant.
Code:
<div class="card vfx_shot_list_top">
<element>
<display class="tactic.ui.panel.ViewPanelWdg">
<title>SHOTS</title>
<search_type>vfx/shot</search_type>
<simple_search_view>shot_custom_filter</simple_search_view>
<view>shot</view>
<use_last_search>false</use_last_search>
</display>
</element>
</div>
We are using the "shot" view. There is nothing wrong with this as it allows you use the "shot" view in multiple places ... if you do have another view, you can always use:
Code:
<element_names>preview,code,status</element_names>
In this case, it would only display the elements list here (preview,code,status), but cascade to "shot" view for the definition and if an element doesn't exist, it will cascade to the "definition" view.
Generally, the "definition" view will contain all the base definitions. However, as you can see in the current "definition" entry for shot, it has, over the years, become a monstrosity. If an element definition will only be used once, it is probably best to create a new "view" with that one entry. The <element_names> tag removes the vast majority of needs to have a separate view for a given widget.
In the end, none of it is wrong. It is just a matter of design and readability. I prefer to keep local definitions as local as possible and reserve "definition" for the global definition (the exact opposite of what we see in the VFX module). So, delete element entries and views as you see fit, if they are redundant.