Skip to content

fix: make the public types and the overlay menu work for DashKit 11 consumers - #345

Open
korvin89 wants to merge 10 commits into
release/v11from
t-20261109-v11-uikit-v8-consumer-fixes
Open

korvin89 wants to merge 10 commits into
release/v11from
t-20261109-v11-uikit-v8-consumer-fixes

Conversation

@korvin89

@korvin89 korvin89 commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes on release/v11 found by a consumer check: a small app on DashKit 10 + uikit 7 was moved to DashKit 11 + uikit 8 by the migration guides. It installed, built and passed its tests on React 18 and 19 without test changes; these are the problems it hit in DashKit.

  • The public types compile with skipLibCheck: false, and test:build now checks that.
  • Custom overlay menus keep their default items.
  • The migration guide is corrected where the app found it wrong or incomplete.
Details

Types

DashKit 10 and the first DashKit 11 build needed skipLibCheck: true in a consumer (7 errors in the .d.ts):

  • the [_emitSymbol] member of DashKit is @internal like the symbol itself: stripInternal removed the symbol and left the member that names it;
  • GridLayout.render() returns React.ReactNode: the inferred type spelled out ReactNode of @types/react 19 and failed for a consumer on @types/react 18 (TS2416, reproduced by installing it);
  • @types/react-grid-layout moves to dependencies: the public types import react-grid-layout, which ships no types.

npm run test:build now:

  • compiles the .d.ts with skipLibCheck: false under bundler, nodenext (ESM and CommonJS builds) and node10 (through typesVersions, with esModuleInterop), failing only on errors inside build/;
  • requires the @types package of a dependency whose types TypeScript finds in @types;
  • fails on types spelled out from @types/react 19 (bigint, AwaitedReactNode).

Each of the three defects, put back one at a time, makes test:build fail.

Overlay menu

  • A default item (copy, delete, settings) given as an object without title showed its raw id (copy) in any language; it shows its default text now.
  • copy and delete given as strings were dropped as soon as the menu had one custom item; they are kept now. settings as a string stays hidden everywhere, as in a menu of strings only, because the gear button opens the settings; as an object it is shown.
  • iconSize of a menu item is @deprecated: the menu never applied it, and the uikit 8 Menu sizes item icons itself. iconSize of an overlayControls button still works.
  • README and README-ru describe the rule; new tests pin it and fail on the old code.

Migration guide

  • Jest:
    • the error texts of Jest 29 and 30;
    • ts-jest 29.3.2+ transforms the two ESM-only packages by itself (measured: 29.2.5 fails, 29.3.0–29.3.1 need isolatedModules, 29.3.2 and 29.4.15 work);
    • babel-jest needs a project-wide babel.config.js;
    • a two-package transformer works with any ts-jest;
    • a snippet with a pnpm variant.
  • Types: @types/react 18.2.6 or later (React.JSX), esModuleInterop with node10, deduping @types/react.
  • Language: DashKit texts re-render on a language change, so the DashKit 10 workaround can go; the application's own texts stay its own.
  • Menu: role="menu" is on the popup element, not on .g-menu; iconSize is deprecated. The fixed default items are described in README, not in the guide: they need no action.
  • Node: the main entry imports CSS; a local path to the uikit guide.

- the [_emitSymbol] member is @internal like the symbol itself: stripInternal removed
  the symbol and left the member that names it
- GridLayout.render() returns React.ReactNode: the inferred type spelled out ReactNode of
  @types/react 19 and did not fit a consumer on @types/react 18
- @types/react-grid-layout moves to dependencies: the public types import react-grid-layout,
  which ships no types
test:build now compiles the .d.ts of both builds with skipLibCheck: false and requires
the @types package of a dependency without its own types in dependencies.
- a default item (copy, delete, settings) given as an object without title shows its default
  text instead of the raw id
- default items given as strings next to custom items are no longer dropped
- iconSize of a menu item is deprecated: the menu never applied it
A consumer app moved from DashKit 10 + uikit 7 to DashKit 11 + uikit 8 by the guide.
- Jest: the error texts of Jest 29 and 30, the ts-jest and babel-jest setups that work, a snippet
- Language: the texts re-render on a language change, the DashKit 10 workaround can go
- menu: role="menu" is on the popup element; the fixed default items; iconSize deprecated
- types: @types/react-grid-layout is a dependency, skipLibCheck: false works
- Node: the main entry imports CSS; a local path to the uikit guide
A settings id given as a string is left to the gear button, next to custom items as well as
in a menu of ids only; an object without title still shows it. README states the rule; tests
pin it and the id fallback of a custom item. The comment on _emitSymbol says what it hides.
- find @types packages through TypeScript's own module resolution instead of a manifest heuristic
- compile the declarations under bundler, nodenext (ESM and CommonJS) and node10 (typesVersions)
- fail on types spelled out from @types/react 19, which break consumers on @types/react 18
- compare diagnostic paths in a way that also works on Windows
- Jest: ts-jest 29.3.2+ transforms node_modules files by itself (measured 29.2.5, 29.3.x,
  29.4.15), babel-jest needs a project-wide babel.config.js, a transformer for two packages
  works with any ts-jest; a pnpm pattern; keep the CSS stub and jsdom
- types: @types/react 18.2.6+, esModuleInterop with node10, deduping @types/react
- menu: the settings id rule; language: the application's own texts stay its own
@gravity-ui-bot

Copy link
Copy Markdown
Contributor

Preview is ready.

They need no action from an application; README describes the default items.

Addresses: 4564396064
valid-jsdoc asks for @PARAM and @returns once the member has a JSDoc block, which @internal needs.

Addresses: 4564465176
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants