-
Notifications
You must be signed in to change notification settings - Fork 2.2k
5.0 pre release changelog
Adi Dahiya edited this page Jun 22, 2023
·
29 revisions
-
#6234 feat: remove @juggle/resize-observer in favor of native
ResizeObserver
API -
#6235 feat(
TreeNode
): use<ChevronRight>
icon component instead of<Icon>
to remove dependency on icon loader
-
#6235 feat(
SVGIconProps
): support more DOM attributes in props interface, which allows users to attach arbitrary event handlers to generated icon components- for example,
<ChevronRight onClick={...} />
- for example,
- Changes from @blueprintjs/popover2 v1.4.11
-
#6228 fix(
Popover2
): restore basic support for some legacy class names
-
#6222 fix implementation of
size
prop for generated icon React components -
#6222 fix: reduce bundle size by removing webpack-annotated icon path loaders
⚠️ BREAK:IconLoaderOptions
now accepts{ loader: "split-by-size" | "all" | IconPathsLoader }
- These create more bundle size inflation than they're worth because of the auto-generated namespace objects created by webpack to map path module filepaths to their source modules. We can achieve the same behavior as the existing "lazy-once" default by writing our own
await import()
statements. If users want to customize loading behavior, they can easily specify a custom loader function. Docs have been updated to reflect this
-
#6218 Fix a bundle size regression caused by #6212
⚠️ BREAK: the import file path for loading icon contents has changed; see the new docs for loading icons
-
#6218 feat: Add support to
IconLoaderOptions
for multiple built-in webpack-annotated loaders:"webpack-lazy-once"
(default),"webpack-lazy"
, and"webpack-eager"
-
#6218 feat: Add new API
Icons.setLoaderOptions()
to globally specify an icon loader so that it doesn't have to be set on each call toIcons.load()
-
#6218
⚠️ deprecation:iconNameToPathsRecordKey
(usegetIconPaths
instead) -
#6219 feat: make
Icons.isValidIconName API
public
-
#6212 feat: reduce bundle size, load paths instead of components
⚠️ BREAK: refactorIconLoader
to load icon path modules instead of generated React components- This changes the type and semantics of the icon loader function, which now has the signature
Icons.load(name: IconName, size: IconSize)
- If you were previously specifying a custom icon loading function, it will have to be adjusted to account for the new paths of the expected modules:
loader: async (name, size) => { await import( /* webpackInclude: /\.js$/ */ /* webpackMode: "eager" */ - `@blueprintjs/icons/lib/esm/generated/components/${name}` + `@blueprintjs/icons/lib/esm/generated/${size}px/paths/${name}` ), }
- This changes the type and semantics of the icon loader function, which now has the signature
-
#6212 feat: new
getIconPaths()
function in@blueprintjs/icons
which provides a less verbose API to statically load icon paths
Includes all changes from v4.x in May 30 release.
-
#6191 fix(
ResizeSensor
): restore React 18 compatibility, porting a change that was lost from v4.x -
#6190 fix(
Label
): restore support forhtmlFor
prop -
#6188 fix: restore exports
PortalLegacyContext
,Expander
,SliderBaseProps
-
#6188 deprecation: deprecate
Expander
in favor of the more specific nameTabsExpander
-
#6188 fix: restore exported alias
DateRange
-
#6188 fix names for deprecated aliases
ColumnHeaderCell2Props
,RowHeaderCell2Props
Includes all changes in v4.x from May 16–25 releases.
-
#6175 feat: restore
Toaster.create()
API (as an alias forOverlayToaster.create()
) -
#6177 feat(
Card
): refactor into function component, supportref
prop
-
#6176 fix: restore export
getTimezoneMetadata
-
#6176 fix: restore exports
IconSvgPaths16
,IconSvgPaths20
,iconNameToPathsRecordKey
- fix: restore
ResizeEntry
type export - fix: restore various types as deprecated aliases:
AbstractComponent2
AbstractPureComponent2
InputGroupProps2
- fix: restore
Classes.SELECT
, punt removal of this API to v6.0 -
#6158 fix(
Icon
): don't use default loader if icon is already loaded- This allows custom loaders to work in bundlers that are not webpack
- fix: restore
TimezoneDisplayFormat
export
- fix(
Documentation
): remove usage of deprecatedcomponentWillMount
lifecycle method
-
#6158 fix(
IconLoader
): don't log a console error if an icon is not loaded duringIcons.getComponent()
(push that responsibility to the<Icon>
component) - fix: restore
icons.json
file in NPM distributable package
- fix: restore
JSONFormat2
,TruncatedFormat2
aliases
-
#6141 fix: restore
PopoverPosition
export in public API -
#6141 fix: restore
ToasterInstance
(as a deprecated type alias forToaster
) in public API -
#6141 fix(
Icon
): restore support foriconSize
prop, marking it as deprecated
-
#6141 fix: restore
PopperCustomModifer
(with intentional misspelling) in public API
- fix: remove all remaining usage of default import from "react" (
import React from "react"
)
-
#6136 fix(
Classes
): restore no-op CSS classClasses.POPOVER_WRAPPER
-
#6136 fix(
removeNonHTMLProps
): restoreelementRef
back to the list of props filtered by this utility function (for backcompat) -
#6139 fix(
HotkeyParser
): restore support for 'space' in key combos - #6140 fix: add back HotkeysDialogLegacy functions to public API
-
#6137 fix(
ResizeSensor
): account forprops.targetRef
if specified (previously, this component would not actually take DOM measurements properly if this prop was specified)⚠️ break: the type of thetargetRef
prop is now more specific, it only allows ref objects and no ref callbacks. Before this change, this prop's usage broke the component completely, so it's extremely unlikely that this break will impact any users negatively.
-
#6137 feat(
EditableText
): new propelementRef
allows users to pass through a DOM ref (useful for taking measurements or implementing interactions like<Draggable>
in @blueprintjs/table)
-
#6137 fix: stop using
ReactDOM.findDOMNode()
to implement drag & drop interactions, which unblocks support for React strict mode
Most packages 5.0.0-alpha.1; @blueprintjs/popover2 2.0.0-alpha.1
See latest 5.x documentation here.
See 5.0 overview for list of breaking changes and migration path.
- react-day-picker v8 migration
- HotkeysTarget & useHotkeys migration
- PanelStack2 migration
- Table 6.0 changes