Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .libra/instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# EUI review instructions

EUI is a React/Emotion component library consumed by Kibana and other Elastic
products. Small changes can have a large downstream impact, so weigh
consumer-facing regressions most heavily. Follow the `wiki/` directory where it
conflicts with other guidance.

Some guidance in `AGENTS.md` (for example, which contributors may open PRs)
addresses agents that author changes, not reviewers. Do not flag a PR because of
who opened it or which issue it references.

## What to prioritize

- Breaking changes to the public API (props, exports, CSS variables, tokens,
default values, DOM structure and class names relied on by consumers) that are
not called out in the PR's "API Changes" table or changelog.
- Accessibility regressions: keyboard support, focus management, ARIA
roles/labels, and color contrast, in light and dark modes and in high
contrast mode (`highContrastMode`).
- Behavior bugs in shared components (overlays, popovers, flyouts, data grid,
form controls) including SSR safety and `ref` / `...rest` prop forwarding.
- Missing unit tests for changed behavior.

## What to skip

- Formatting; Prettier enforces it. Import order is not enforced anywhere, so do
not flag it either.
- Stylistic preferences not backed by the wiki.
- Documentation-only wording nits in `packages/website/` and `wiki/` unless
the text is factually wrong.

## Conventions to enforce

- Styles use Emotion `*.styles.ts` files with theme tokens (`useEuiTheme`),
not hard-coded colors, sizes or SCSS.
- Changelog entries under `packages/*/changelogs/upcoming/` must describe the
consumer-visible change accurately. CI already checks that an entry exists,
so do not flag a missing one.
36 changes: 36 additions & 0 deletions .libra/settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 1
enabled: true

# EUI PRs are frequently opened as drafts for early feedback; review them on
# request by adding the bypass label rather than on every push.
review_drafts: false
skip_labels:
- libra-skip
draft_bypass_labels:
- libra-review-draft

paths:
exclude:
# Dependencies and lockfiles
- "yarn.lock"
# Keep .yarn/patches reviewed; they are real changes to dependency code
- ".yarn/releases/**"
- ".yarn/plugins/**"
# Yearly changelogs are collated by the release script
- "packages/*/changelogs/CHANGELOG_*.md"
# Generated by i18n tooling
- "packages/eui/i18ntokens.json"
- "packages/eui/i18ntokens_changelog.json"
# Jest snapshots are regenerated, review the tests that produce them
- "**/__snapshots__/**"
# Icon SVG sources and the components generated from them
- "packages/eui/src/components/icon/svgs/**"
- "packages/eui/src/components/icon/assets/**"

publication:
# Drop wording/naming/comment-only notes; they are noise on small, frequent PRs.
publish_min_severity: P3
block_min_severity: P1
verify_min_severity: P1
# A flaky specialist should not silence findings from the ones that finished.
allow_partial_coverage: true
15 changes: 15 additions & 0 deletions .libra/specialists/accessibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
id: accessibility
description: Reviews keyboard, focus, screen reader and contrast behavior
apply_to:
- "packages/eui/src/components/**/*.ts"
- "packages/eui/src/components/**/*.tsx"
Comment thread
Copilot marked this conversation as resolved.
- "packages/eui/src/services/accessibility/**"
- "packages/eui/src/services/focus_trap/**"
can_block: false
---
Check that interactive components remain operable by keyboard, manage and
restore focus correctly (overlays, popovers, flyouts, modals, menus), expose
accurate roles, states and accessible names, and do not rely on color alone, including in high contrast mode.
Verify live-region and `aria-*` usage matches the WAI-ARIA pattern for the
component. Report only concrete regressions or gaps introduced by the change.
16 changes: 16 additions & 0 deletions .libra/specialists/docs-and-changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
id: docs-and-changelog
description: Reviews changelog entries, website docs and stories
apply_to:
- "packages/*/changelogs/upcoming/**"
- "packages/website/docs/**"
- "packages/eui/src/**/*.stories.tsx"
- "wiki/**"
can_block: false
---
Changelog entries must describe the consumer-visible effect accurately and use
`**` subheadings for bug fixes, deprecations and breaking changes, per
`packages/eui/changelogs/upcoming/_template.md`. Docs and stories should
reflect new or changed props. Flag factual errors, examples that would not work
as written, and breaking changes missing from the changelog; do not comment on
tense, casing or prose style.
31 changes: 31 additions & 0 deletions .libra/specialists/public-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
id: public-api
description: Reviews changes to EUI's public API surface and consumer compatibility
apply_to:
- "packages/eui/src/components/**/*.ts"
- "packages/eui/src/components/**/*.tsx"
- "packages/eui/src/services/**"
- "packages/eui/src/utils/**"
- "packages/eui/src/global_styling/**"
- "packages/eui/src/index.ts"
- "packages/eui-theme-common/src/**"
- "packages/eui-theme-borealis/src/**"
- "packages/eui-theme-common/package.json"
- "packages/eui-theme-borealis/package.json"
- "packages/docusaurus-theme/src/**"
- "packages/docusaurus-preset/src/**"
- "packages/eui/package.json"
- "packages/test-helpers/src/**"
- "packages/illustrations/src/**"
- "packages/eslint-plugin/src/**"
can_block: true
---
Review for breaking changes to what Kibana and other consumers depend on:
removed or renamed props, exports, tokens, CSS variables, ESLint rules or
test-helper methods; changed `package.json` exports or peer dependencies; changed defaults;
narrowed or broadened TypeScript types; changed DOM output or class names;
props not forwarded (`...rest`, `ref`, `data-test-subj`, `className`).
A breaking change is acceptable only when the PR documents it, ships a
changelog entry, and carries the `breaking change` label (required by the wiki;
it triggers the Kibana due-diligence comment); flag it otherwise. Prefer additive, deprecated-then-removed
paths over silent behavior changes.
17 changes: 17 additions & 0 deletions .libra/specialists/styles-theming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
id: styles-theming
description: Reviews Emotion styles, tokens and theme compatibility
apply_to:
- "**/*.styles.ts"
- "**/*.styles.tsx"
- "packages/eui/src/global_styling/**"
- "packages/eui-theme-borealis/**"
- "packages/eui-theme-common/**"
can_block: false
---
Check that styles use theme tokens and EUI mixins/functions instead of
hard-coded values, work in light and dark color modes, in high contrast mode
(`highContrastMode`) and in every shipped theme, respect `prefers-reduced-motion`, and keep style generation memoized
(`useEuiMemoizedStyles`) rather than recomputed each render. Flag SCSS or
global CSS additions that should be Emotion, and selector or specificity
changes that could break consumers' overrides.