Skip to content

feat: warn about unsupported dots in spec property keys - #393

Merged
i-doshechnikow merged 5 commits into
mainfrom
DATAUI-4008-dotted-keys
Aug 24, 2026
Merged

feat: warn about unsupported dots in spec property keys#393
i-doshechnikow merged 5 commits into
mainfrom
DATAUI-4008-dotted-keys

Conversation

@i-doshechnikow

@i-doshechnikow i-doshechnikow commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What and why

Spec property keys containing dots (a.b) are not supported: the library follows the final-form field name convention, where a dot is a path separator. Such specs are currently accepted silently and their values are lost during rendering (titles render, data does not) — hard to diagnose when the keys come from an external data source (e.g. Helm values).

Change

  • DynamicView emits a dev-only console.warn listing the offending property keys, collected recursively (nested objects and array items included).
  • New "Dotted property keys" docs section documents dots in keys as not supported and tells consumers to transform specs and values beforehand.
  • Rendering behavior is unchanged.

Tests

  • The warning lists all dotted keys, including nested object properties and array item specs.
  • No warning for specs without dots.

Note: the branch history contains an earlier rendering fix and its revert — the approach was changed after discussion with maintainers in favor of an explicit warning; commits squash on merge.


🇷🇺 Описание на русском

Что и зачем

Ключи spec.properties с точками (a.b) не поддерживаются: библиотека следует конвенции именования полей final-form, где точка — разделитель пути. Сейчас такие спеки принимаются молча, а значения теряются при рендере (заголовки рисуются, данные — нет) — это трудно диагностировать, когда ключи приходят из внешнего источника (например, Helm values).

Изменение

  • DynamicView выводит dev-only console.warn со списком проблемных ключей, собранных рекурсивно (включая вложенные объекты и элементы массивов).
  • Новый раздел документации «Dotted property keys» фиксирует, что точки в ключах не поддерживаются, и советует потребителям преобразовывать спеки и значения заранее.
  • Поведение рендера не меняется.

Тесты

  • Ворнинг перечисляет все точечные ключи, включая свойства вложенных объектов и спеки элементов массивов.
  • Для спек без точек ворнинга нет.

Примечание: в истории ветки есть более ранний фикс рендера и его revert — после обсуждения с мейнтейнерами подход заменён на явный ворнинг; при мерже коммиты схлопнутся squash'ем.

🤖 Generated with Claude Code

@gravity-ui-bot

Copy link
Copy Markdown
Contributor

Preview is ready.

@gravity-ui-bot

Copy link
Copy Markdown
Contributor

Playwright Test Component is ready.

@i-doshechnikow i-doshechnikow changed the title fix: resolve values of spec keys containing dots feat: warn about unsupported dots in spec property keys Aug 18, 2026
);
}
}
}, [spec]);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule applies to both modes, so this log also needs to be added for DynamicField

@i-doshechnikow i-doshechnikow Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@i-doshechnikow
i-doshechnikow merged commit 1e45f66 into main Aug 24, 2026
4 checks passed
@i-doshechnikow
i-doshechnikow deleted the DATAUI-4008-dotted-keys branch August 24, 2026 15:51
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.

3 participants