Repository navigation
[Chore] Add Libra review configuration #10210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6701343
[Chore] Add Libra review configuration
clintandrewhall 54db0d9
[Chore] Widen Libra specialist scopes to component .ts files and expo…
clintandrewhall 3e11d45
[Chore] Refine Libra config per review
clintandrewhall b6cf309
[Chore] Cover illustrations package in Libra public-api specialist
clintandrewhall 4c9a69b
[Chore] Address Libra config review follow-ups
clintandrewhall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| - "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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.