Change log for uiInfrastructure
All notable changes to the package uiInfrastructure made in master are documented here.
Version 8.9.0
Breaking change
- UiSdlExtraFilesInvalidatingCacheLoader is disabled by default to overcome bundling memory and performance issues.
- Files in
ui/c3/src/folders can no longer be imported through@c3/ui/and are no longer flattened during bundling. Please import these files from@c3/app/ui/src/instead with their full path. - If necessary, you can re-enable it by setting
UiSdlConfig#infrastructure.disableExtraFilesLoaderto false but be aware that it will significantly decrease performance and prefer to change your imports.
- Files in
Version 8.8.0
New Features
- UiSdlInAppDoc
- Added loadDocEagerly property to control when documentation is fetched. When
falseor not set (default), documentation is only fetched when the panel is opened. Whentrue, documentation is loaded immediately on component mount.
- Added loadDocEagerly property to control when documentation is fetched. When
Improvements
- UiSdlInAppDoc
- Improved performance by preventing unnecessary
DocService.renderTopic()network requests on every page render.
- Improved performance by preventing unnecessary
- UiSdlDeploymentDoctor
- Enhanced
diagnosefunction to include most likely artifact versions
- Enhanced
Version 8.7.16
Bug Fixes
-
- Fixed stale closure issue in
useMetadatahook by addingmetadataIdto theuseEffectdependency array. This ensures metadata is properly initialized for dynamically created nested components (e.g., data grid detail rows) when multiple instances mount simultaneously.
- Fixed stale closure issue in
-
- Added null check for
metadataparameter incompareDataSpecsAndFindDifffunction to prevent "Cannot read properties of null" errors when comparing data specs before metadata has loaded.
- Added null check for
Version 8.7.0
Bug Fixes
- UiSdlComponentsSourceCodeLoader
- Removed
typefield UiSdlComponentRef instances, allowing component ref's to use actions/reducers correctly if thetypefield is included.
- Removed
New Features
- Introduced the action.meta.dataSourceComponentId field to the following actions:
- requestDataAction
- receiveDataAction
- saveDataAction
- The
dataSourceComponentIdidentifies the component responsible for triggering these actions—whether requesting, receiving, or saving data. This update ensures the originating component's ID is preserved within these actions. IfdataSourceComponentIdis not explicitly set, will default to a calculation based on dataId.
- Introduced the action.meta.dataSourceComponentId field to the following actions:
UiSdlTsTypesSourceCodeLoader, UiSdlComponentsSourceCodeLoader, UiSdlEnumsSourceCodeLoader,
UiSdlTranslationSourceCodeLoader- Added
produceBatchto generate source code for multiple files.
- Added
Version 8.6.0
Breaking Change
- React version upgrade
- Upgrade to React v18.3.0.
- Upgrade react-intl and
@formatjs/intl-localematcher, means that locales will now find a match if they share the same language even if the full locale does not match. For example,fr-CHwill match withfr-FRif it is available andfr-CHis not.
- Ann.UiBuildNestedDataSpecs annotation is now needed for components with deeply nested data specs
- Components with deeply nested data specs will not work properly if they are not annotated with Ann#UiBuildNestedDataSpecs. If UiSdlForm or UiSdlFilterPanel are being mixed or remixed, or if there exists a component that contains a deeply nested data spec, the Ann#UiBuildNestedDataSpecs annotation will need to be added on the Type for the component to work properly.
New Features
- UiSdlComponentDataSpec
- Added ignoreFirstContextVarResolution and ignoreAllContextVarResolution to allow for greater control on fetching data. These allow you to not request data when the resolution of contextVars changes.
- UiSdlPageWrapper, UiSdlComponentsSourceCodeLoader
- Created
SDL.DefaultPageWrappercomponent to load page level containers.
- Created
- UiSdlErrorBoundary
- Added new component
UiSdlErrorBoundarywhich catches JavaScript errors in their child component tree, logs those errors, and displays a fallback UI.
- Added new component
- UiSdlComponentsSourceCodeLoader
- Added a way for UiSdlRenderCondition
useConditionfunctions to be passed through json files to the underlying component. - Allow epics to be declared as inner Types.
- Added a way for UiSdlRenderCondition
- UiSdlApplicationConfig
- New Config type for applications to remix and add their own configurations or feature flags. This is part of UiSdlConfig and ensures its usage doesn't produce extra requests at runtime.
- Ann.UiBuildNestedDataSpecs
- This annotation is used to specify if we should build nested data specs for a component. This annotation should be used only when the component is expected to have nested data specs.
- UiSdlComponentDataSpec
generateFilterFromDataPathAndContextVarshas a new optional argumentspecFieldwhich is defaulted to "dataSpec". This argument can be used to access "totalDataCount" or other DataSpec related fields.
- UiSdlTsTypesSourceCodeLoader
- Allow ts inheritance from inner Types. Previously, generated code for the type that was inheriting an inner type was invalid.
Deprecations
- UiSdlSpecHelper#clearRenderedContent
- This method will be deprecated. Use
cleanupfrom React Testing Library instead.
- This method will be deprecated. Use
Version 8.5.0
Deprecations
- UiSdlExtraFilesInvalidatingCacheLoader
- Files in
ui/c3/src/folders can no longer be imported through@c3/ui/and are no longer flattened during bundling. Please import these files from@c3/app/ui/src/instead.
- Files in
New Features
- UiSdlInfrastructureConfig
- Added disableExtraFilesLoader to help users prepare for the deprecation of UiSdlExtraFilesInvalidatingCacheLoader.
Version 8.4.2
New Features
- UiSdlComponentDataSpec
- Added ignoreFirstContextVarResolution and ignoreAllContextVarResolution to allow for greater control on fetching data. These allow you to not request data when the resolution of contextVars changes.
Version 8.4.0
Improvements
- Reduced the size of final CSS output. This was done by moving SCSS import of shared SCSS files to JS side using dynamic import. This ensures that CSS styles are not duplicated in the final CSS output.
Deprecations
- Enzyme will be deprecated in 8.4 and removed in 8.6.0, since it is no longer supported in React 18. This change will be made on day 1 of 8.6.0 and all enzyme test will stop running once you start using UI 8.6.0. Please migrate all enzyme tests to use React Testing Library instead.
- Starting in this version, non-reusable React component instances should be created in the
{package}/ui/src/c3/src/customInstances. Adding non-reusable React components to{package}/ui/src/c3/src/customComponentswill still work until 8.6.0, when this functionality will be removed. Component instances created in this directory should not be reused by other React components. If you intend to reuse any exported functionality, create your component in any directory under{package}/ui/src/c3/**, exceptcustomInstancesandcustomComponents. - Starting in 8.4 overwriting UI Framework metadata (such as
SDL.DefaultSite) will be deprecated. It will work until 8.6.0, when the functionality will be removed. At that point, something else will be added to add functionality for metadata normally created through the Framework.
Improvements
- Performance improvements
- UiSdlApplicationState instances that use epic types in
effectTriggersdon't require extra requests. - UiSdlPageContainer components are loaded in parallel with the page components.
- CSS Library styles are loaded in parallel to all the framework code.
- Removed duplicate code from the
mainbundle ImmutableJsandI18nlibraries are only included in thec3ui_corebundle- Cleaned up incorrect usage of role name
C3.Group.UiSdlAccessas an action group
- UiSdlApplicationState instances that use epic types in
Changes
- Metadata Validation
- In 8.6.0, we plan to enable both
.jsand.jsonfiles to be treated as metadata across the entire platform. As part of this effort, we will be more strict with metadata validation on.jsonfiles to ensure they match their respectiveTypedefinition. To find these issues, runPkg.metadata(UiSdlComponent)to view what issues there are with your metadata and fix them accordingly. Once this change is made, if there are any metadata issues, UI bundling will not work and you will need to find and fix all metadata issues to bundle your UI properly.
- In 8.6.0, we plan to enable both
- UiSdlComponentDataSpec
- Changed value type of
dataTypefield to!string serialized UiSdlTypeRef
- Changed value type of
- UiSdlTsTypesSourceCodeLoader
- Created new type to replace and deprecate
UiSdlTypesSourceCodeLoader.
- Created new type to replace and deprecate
- UiSdlDataTransform Introduce UiSdlDataTransform#Context as a new parameter to UiSdlDataTransform functions
Breaking changes
- UiSdlMetadataLoader
- Is now labeled as
final, this means other packages cannot remix nor extend its functionality. This Type is considered internal and as such overrides are not supported. - Validates package access tokens (only affects protected component packages, currently only
uiGanttChartReact).
- Is now labeled as
Bug Fixes
- UiSdlStylesLoader
- Fixed issue where
scssfiles were being loaded in the wrong order, causingrootPkgscss files to be overwritten.- With this,
scssfiles in therootPkgwill now overwritescssfiles with the same name in dependency packages.
- With this,
- Fixed issue where
- UiSdlComponentsSourceCodeLoader
- Fixed issue where components with deep
childComponenthas duplicate imports
- Fixed issue where components with deep
New Features
- UiSdlComponentPackageAccess. New configuration type to provide access tokens per package.
- UiSdlApplicationState
- Added support for including application state default values in initial metadata.
- Ann.UiImportGenerator
- Added the ability to dynamically create static imports for component code generation.
- UiSdlThemeContext
- Created a new presentational only context that handles both UiSdlThemeTemplate and UiSdlDensityTemplate for use through UiSdlSite.
- UiSdlSite
- Added densityDataSpec and styleDataSpec to handle loading UiSdlDensityTemplates and UiSdlThemeTemplates to be consumed by UiSdlThemeContext. These will be added through bundling if they are not in the metadata already for components that are or mix UiSdlSite.
- UiSdlStyleIdContext
- Added new context, this style ID context stores the up-to-date theme ID and Density ID.
- UiSdlComponentsSourceCodeLoader
- Added circular dependencies detection for components.
- UiSdlDataRedux, UiSdlDataRequestEpic
- Added new action receiveErrorAction to store error messages in state when a request has failed.
- Updated UiSdlDataRequestEpic to use this new action when any error is caught.
Version 8.3.3
Deprecations
- Enzyme is now depreciated in favor of React Testing Library and will be removed in 8.6.0.
Changes
- UiSdlEnumsSourceCodeLoader
- Created new type to replace and deprecate
UiSdlEnumTypeSourceCodeLoader.
- Created new type to replace and deprecate
- UiSdlStyleContext
- Seeded a
UiSdlConfiginstance such that the default themes will beC3DefaultDarkandC3DefaultDenseDensity.
- Seeded a