VDT Changes [VDT RN]
The information on this page is sourced from here: Start Here / Changelog - Page ⋅ Storybook (vidispine.github.io)
22.4.0
cra-template-vdt
Updates
eslintincluded as dev dependency in templateFix horizontally misaligned links in Drawer
Replace card header with placeholder in search components
@vidispine/eslint-config
Updates
Added typescript linting for "*.ts" and "*.tsx" files
Improved readme
@vidispine/eslint-config-typescript
Updates
Is now based off of airbnb-typescript rules
Improved readme
dependencies
@typescript-eslint/eslint-plugin5.33.1 -> 5.44.0@typescript-eslint/parser5.33.1 -> 5.44.0eslint-config-typescriptremovedeslint-config-airbnb-typescript: added (^17.0.0)eslint-config-prettieradded (^8.5.0)eslint-plugin-import: added (^2.26.0)
@vidispine/eslint-config-base
Updates
Typescript support added for "*.ts" files (using
@vidispine/eslint-config-typescript/base)Improved readme
dependencies
eslint-plugin-import2.25.4 -> 2.26.0eslint-plugin-prettier4.0.0 -> 4.2.1
@vidispine/eslint-config-react
Updates
Typescript support added for "*.tsx" files (using
@vidispine/eslint-config-typescript/react)Improved readme
@vidispine/eslint-config-mdx
New package
Package for adding mdx and md eslint config
Can also lint and format js/jsx code inside md/mdx code blocks (using
@vidispine/eslint-config-baseand@vidispine/eslint-config-react)i.e. inside ```js/jsx {...code...} ```
example-vdt-mui-app
Updates
Updated themes/styling with vidispine colors, font, etc.
react-queryadded for data synchronizationUpdated dependencies
example-vdt-material-app
Updates
Refactored and improved file/code structure and readability
Improved paths handling for routing
Updated styling/logos
Updated dependencies
@vidispine/prettier-config
Updates
prettierpeer dependency lowered from "^2.7.1" to "^2.0.0"
@vidispine/proptypes
Updates
ShapeTypefixed invalid prop type forcontainerComponentprop-typesre-added as dependency
dependencies
@babel/runtime7.18.9 -> 7.20.1
@vidispine/types
New
Bundling all typings into
dist/index.d.tsfor easy import of the VidiCore model types
Updates
Types updated for VidiCore 22.4.0
@vidispine/vdt-api
Updates
Improved documentation of chunked upload example
dependencies
@babel/runtime7.18.9 -> 7.20.1
@vidispine/vdt-js
In this release we've added typescript to vdt-js (using @vidispine/types). Consequently, we've also added typedoc to give better documentation. All function exported from vdt-js now got typings (bundled into dist/index.d.ts), stories and documentation on how to use them.
Note: Default values when using objects aren't shown in typedoc (no typedoc support for it out of the box); so for now look at the storybook controls to find those
Breaking changes
rolesrenamedROLE_NAMESfor clarity of what it contains and consistency with upper case name praxis for constsgetDocumentTyperenamedgetShapeDocumentTypegetShapeMediaTypenow takes a VidiCore shape as input instead of a parsed shapemetadataTypeToWebVttswitched to pass args metadataType and options to be consistent with how other parsers/mappers send in argsChange from
metadataTypeToWebVtt({ metadataType, subtitleGroup, subtitleField })tometadataTypeToWebVtt(metadataType, { subtitleGroup, subtitleField })
filterShapeSourcechanged so it's returns VidiCore shape with the shape key (previously returned a parsed shape). The parsed shape is now instead returned with a parsedShape key.Both keys can also be adjusted with options.shapeKey and options.parsedShapeKey
New
Note: Some of these aren't actually new for this release, but they haven't been documented publicly before so they're added here now
SYSTEM_FIELDSconst for all default VidiCore system field namesSYSTEM_FIELDGROUPSconst for all default VidiCore system group namesparseFileTypeparse VidiCore file types (e.g. adds file size in KB/MB/GB instead of only bytes)parseGroupListandparseFieldList, used to parse metadata group/field listsparseNowDateparse vidicore "NOW" date representations to actual datesparseSimpleMetadataTypeparse VidiCore simple metadata types to flat (key/value) objectsparseHighlightTimespanparses a VidiCore search/highlight timespancreateFacetTypecreate VidiCore facet type from a (js) simplified structureparseFacetTypeparses VidiCore facet type to flat (key/value) objectsparseTranscodePresetparses VidiCore facet type to a simplified structureparseContainerComponentparse a container componentparseVideoComponentparse a specific video componentparseAudioComponentparse a specific audio componentparseBinaryComponentparse a specific binary componentfindNearestThumbnailwill given a time code find nearest thumbnail in itemType
Updates
parseShapeTyperefactored/reworked with extracted audio/video/binary component parsersAdded missing note in previous release for
TimeCode.toFraction()being replaced withTimeCode.toText({ fraction: true })
Bug fixes
TimeCode.toDurationfix issue with overflowing larger units to smaller (given such format option)useSnackbarAlertuseCallback added for showAlert functionUpdate stories with new api mock
parseMetadataType
We've dedicated a section for the changes to parseMetadataType (which also applies to its dependent parseTimespanList and parseTimespan functions). In addition to dynamically typing this parseer, it has gotten improved support for parsing multiple fields/groups having the same name within the same field/group list (e.g. transient fields like __ancestor_collection are stored like that). More information about this is also present in the documentation of this parser.
Adding support for parsing multiple fields and groups with same name into the same field/group name property as an array (was previously unsupported unless enabling
fieldAsListorgroupAsList)Be aware that this makes it possible previously ignored duplicated fields/groups surfaces in your system (as intended with this change - making that more transparent)
The default options are adjusted to not return fields and groups in field/group key objects by default (they are instead returned with field/group name as key directly). When enabling
fieldAsListorgroupAsListthey are placed inside field/group keys (as arrays).Following this change, we removed the
flatGroupoption.
Setting
flat: truewill flatten all timespans to one (as before) - but generic metadata will have highest priority now.flathas typically been used to get the generic timespan flattened, and to avoid unexpected timed fields polluting it generic are added last (while still keeping the flexibility of combining different fields/groups from several timespans).overrideGroup(default false) option added following this to return only the latest "duplicated" group it parses (to support same behavior as before)overrideField(default false) option added following this to return only the latest "duplicated" field it parses (to support same behavior as before)If you wan't to keep the same behavior of overriding with the latest parsed and not return an array for single fields/groups with same name, set
overrideFieldandoverrideGroupto true. (Note that usingflat: trueenables these override options by default to have the same flat behavior as previously)Added
arrayOnSingleGroupoption to return single group in array (useful when expecting more than one group with same name)Added
arrayOnSingleFieldoption to return single field in array (useful when expecting more than one field with same name)arrayOnSinglehas changed to have default value false. But since it was more or less a synonym forarrayOnSingleValuepreviously - and that still has the default valuetrue- the default behavior of returning field values in arrays remain.Note: if you've previously used
arrayOnSingle: falseto get field values without array you need to switch to usearrayOnSingleValue: falsenow.Also note: It's now possible to explicitly set what you don't want to return as an array by setting
arrayOnSingle: truebut false forarrayOnSingleGroup,arrayOnSingleField, orarrayOnSingleValue.
Adding option
includeMetadataAttributesto include metadata attributes in the parsed outputAdding possibility to filter parsed attributes with an array of attribute keys for
includeMetadataAttributes,includeTimespanAttributes,includeGroupAttributes,includeFieldAttributesandincludeValueAttributes.e.g. add
includeGroupAttributes: ["uuid"]to also include uuid for groups in the parsed output
dependencies
@babel/runtime7.18.9 -> 7.20.1
@vidispine/vdt-mui
A rework of our general component structure has been done. In addition to the api/props our components have: you can override all internal (mui) components and componentsProps. This enables extensive customization while still maintaining a stable/testable api for our components (see vdt-mui docs in the root for more info).
New
Collection:
CollectionCarddisplay a vidicore collection in a card (horizontal/vertical, options menu, actions)CollectionRepresentativeThumbnailshow collection representative thumnbnails in one image (combined, blurred background)
Item:
ItemCarddisplay a VidiCore item in a card (horizontal/vertical, options menu, actions)ItemThumbnaildisplays item thumbnails with transitions - has api for adding scrub feature to change thumbnail based on interaction (see storybook for an example)ItemTableshow VidiCore item lists in a table representation (with select/multi-select checkboxes)ItemTableRowcomponent for showing one VidiCore item as a table row
Shape:
ShapeMediaBadgesextract and display media badges from a vidicore shapeTranscodePresetMediaBadgesextract and display media badges from a vidicore transcode preset
Inputs (uniformed api, controlled/uncontrolled, variant, size, etc...):
BasicDateTimeInput(not locale aware) date time input for handling date, month,DateTimeInput(locale aware) date time input for handling date and time (mui-x pickers and dayjs is used)week, and time.CheckboxGroupInputinput for array values with multiple checkboxesRadioGroupInputinput for single value with multiple radio buttonsCheckboxInputinput for boolean as a checkboxSwitchInputinput for boolean as a switchNumberInputinput for number with a "text field"SliderInputinput for number(s) as a slider or range sliderTagInputinput for array values displaying tags/chips within a "text field"TextInputinput for string with a single or multiline text field/area
General:
CompactBadgeshow text in styled compact badge componentCompactLabelshow label in a styled compact format with light/dark mode (intended to be used above media)TablePaginationcomponent to use for paginationSortselect button and menu for sorting (with asc/desc support)ScrubLinewrapper to add a scrub line over its children,ExpandButtonanimated expand button with onChange handlerBlurredBackgrounddisplay image or theme color as a blurred backgroundCornerLabelPlacerwrapper to place labels (compact labels)AvatarMenuavatar with menu and optionsCornerLabelPlacerwrapper to place labels in the corners over its children
Updates
Note: The components we had for vdt-mui in previous release has changed to follow the new components/componentsProps pattern, please modify them according to the documentation inside storybook
Bug fixes
[BinList]: Fix parsing bin list timespans (swap to
toText({ fraction: true }))
dependencies
@babel/runtime7.18.9 -> 7.20.1@mui/icons-material5.8.4 -> 5.10.15@mui/lab5.0.0-alpha.95 -> 5.0.0-alpha.109@mui/material5.10.1 -> 5.10.15@mui/styles5.9.3 -> 5.10.15@mui/systemadded (5.10.15)@mui/x-date-pickersadded (5.0.8)dayjsadded (1.11.6)prop-typesmoved from dev dependency (15.8.1)
@vidispine/vdt-materialui
Breaking Changes
FieldGroupDesignerChanged propsmetadataFieldGroupDocument changed name to metadataFieldGroupType
setNotification replaced with onSuccess and onError
New
FileTypeTableBodydisplay file types in a table body (storage method filters, copy button for uris)
Updates
ItemSourceTablestyling changes and option to show file informationTableHeadLabel class added
showFilesflag added as prop to include file information
ItemShapeTablenow includes file information as wellstorageListType,displayMethodTypesandstorageMetadataKeysprops added to enrich or filter the file information to displayshowDownloadprop added to hide shape file download buttonShape file size fallback 'Not Available' added if file size can't be retrieved from VidiCore shape
Updated components affected by breaking changes in dependent vdt packages
Revised the withDrag/withDrop story examples
Bug fixes
StorageListTreestyles applied to tree correctly
dependencies
@babel/runtime7.18.9 -> 7.20.1core-js3.24.1 -> 3.26.1pdfjs-distrolled back (2.9.359) - unexpected breaking change between minor versionsreact-beautiful-dnd13.1.0 -> 13.1.1react-select5.4.0 -> 5.6.1
@vidispine/vdt-react
dependencies
@babel/runtime7.18.9 -> 7.20.1
@vidispine/vdt-react-timeline
Updates
TimelineEventstory addedChanged styles and fonts
Improved documentation for all components
Added overview documentation and example usage
Integrate timeline story state with storybook controls
Bug fixes
Remove duplicate marker when dragged
Fix style misalignments if not wrapping timeline inside mui css baseline or normalize.css
dependencies
@babel/runtime7.18.9 -> 7.20.1konva8.3.11 -> 8.3.14
@vidispine/vdt-videojs-react
dependencies
@babel/runtime7.18.9 -> 7.20.1
@vidispine/vdt-videojs
dependencies
@babel/runtime7.18.9 -> 7.20.1video.js7.20.2 -> 7.21.1
core
Improve support for cross-platform development
Improve instructions on how to make pre-release/release
Switch to Yarn2
Remove lerna and only use yarn workspaces
Update publishing, scripts, github actions and docs accordingly
Changed to use
yarn lint --fixinstead of a dedicatedyarn lint:fixscriptUpdate storybook to use webpack 5
Replace storybook sw mock (msw) with storybook plugin mock
msw wasn't updated correctly when serving multiple from the same origin
Add support for typescript in (vscode) workspace, stories/docs, tests, example-mui-app and vdt-js
Fix "?undefined" path redirect on "/vdt" at storybook page
hygen templates updated for mui components
Add utils for integrating story state with storybook controls