feat(experiments): Create Metric page#7712
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces experiment metrics functionality, including the creation of a new CreateMetricForm component, RTK Query endpoints for metric management, and new design tokens for font weights. Feedback on the changes highlights that the redirect logic in CreateMetricPage should be wrapped in a useEffect hook to avoid side-effects during rendering. Additionally, it is recommended to redirect users back to the experiments page upon successful creation or cancellation of a metric, rather than simply resetting the form on the same page.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces experiment metrics support, including a new useMetric service, type definitions, and the CreateMetricForm and MetricsPage components. It also adds new font-weight design tokens across the application and integrates a "Metrics" link into the sidebar navigation. Feedback on these changes highlights two key improvements: first, converting the measurement option buttons in CreateMetricForm to a proper radio button group to improve accessibility; second, ensuring that the search input on the MetricsPage actually filters the metrics by passing the search query (ideally debounced) to the API query, along with updating the empty state message for search results.
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Frontend for the Create Metric page.
/metricsroute, gated behind theexperiment_metricsflag (hidden when off; URL redirects to Features).increase/decrease/informational), and data source (event + optional filter). Posts to theexperiment-metricsendpoint via a new RTK Query service; payload-building/validation are unit-tested pure helpers.regular/medium/semibold/bold) totokens.json+ the generator — the experiments UI already referenced these but they were undefined.How did you test this code?
npm run test:unit— payload shape, filter omission, submit gating).