mirror of
https://github.com/hanzoai/o11y.git
synced 2026-10-15 12:58:33 +00:00
* feat: add useIsDashboardV2 hook
* feat(dashboards-list-v2): page shell
* feat(dashboards-list-v2): loading / error / empty / no-results state components
* feat(dashboards-list-v2): SearchBar input component
* feat(dashboards-list-v2): CreateDashboardDropdown (new / import JSON entry)
* feat(dashboards-list-v2): DashboardRow + per-row ActionsPopover with v2 delete
* feat(dashboards-list-v2): ListHeader with sort/order + Configure Metadata trigger
* feat(dashboards-list-v2): JSON import modal (Monaco editor + sample)
* feat(dashboards-list-v2): Configure Metadata modal + persisted visible-columns store
* feat(dashboards-list-v2): wire list to v2 API with pagination, URL state, debounced search
* chore: park v2 dashboard pages until backend lands on main
* refactor(dashboards-list-v2): extract lastUpdatedLabel into utils
Dedupe the relative-time formatter that was copied into both DashboardRow
and ConfigureMetadataModal. Single source in DashboardsListPageV2/utils.ts.
* refactor(dashboards-list-v2): group state components under states/
Move EmptyState, ErrorState, LoadingState, and NoResultsState under
components/states/. They're a coherent family (interchangeable view
branches in the list orchestrator) and grouping them sets up shared
styling extraction next.
Pure relocation — git mv preserves history; only DashboardsList.tsx's
imports change.
* refactor(dashboards-list-v2): extract shared state wrapper styles
Pull the dashed-border card layout, body text, and learn-more CTA into
states/states.module.scss. EmptyState, ErrorState, and NoResultsState
now compose from the shared base and only declare what differs
(padding, gap, color, font-weight). LoadingState is a different shape
(skeleton stack) and stays untouched.
Cascaded properties are byte-equivalent — pure de-duplication.
* refactor(dashboards-list-v2): port to @signozhq/ui primitives
Replace antd Button/Input usages and bespoke <button> rows with the
@signozhq/ui equivalents across the four review-flagged surfaces:
- EmptyState "Learn more" → Button variant="link" color="primary"
- ErrorState "Retry" → Button variant="outlined" color="secondary"
with prefix icon; drops the sub-pixel .retryButton overrides in
favour of the variant's tokenized layout.
- ErrorState "Contact Support" → Button variant="link" color="primary"
- SearchBar Input → signoz Input (data-testid → testId)
- ActionsPopover rows → Button variant="ghost" color="secondary"
(color="destructive" for Delete) with prefix icons
- ActionsPopover trigger → Button size="icon" variant="ghost"
The signoz button variant handles the icon-slot alignment that the
removed .actionItem styling reimplemented manually, so the bulk of
ActionsPopover SCSS is deleted. A minimal .menuItem class still
left-aligns + fills the popover row, and .deleteDivider keeps the
hairline separator above the destructive action.
Popover itself stays on antd — migrating to @signozhq/ui/dropdown-menu
is deferred (same TODO as CreateDashboardDropdown).
* style(dashboards-list-v2): use font tokens across new SCSS
Replace literal font-size/weight values across the V2 page SCSS with
the shared design-token custom properties already used elsewhere:
- 14px → var(--font-size-sm)
- 12px → var(--font-size-xs)
- 400 → var(--font-weight-normal)
- 500 → var(--font-weight-medium)
- 600 → var(--font-weight-semibold)
ErrorState.module.scss was tokenized alongside its .retryButton
removal in the previous commit. Three literals remain because they
have no clean token equivalent: 11px (sub-token), 8px (avatar
initial), and 12.805px (sub-pixel artifact from a Figma export,
a separate concern).
* style(dashboards-list-v2): replace sub-pixel padding in CreateDashboardDropdown
Round 5.937px / 11.875px / 1.484px to clean integer pixel values
(6px / 12px / 2px). The sub-pixel values were the "trial-and-error"
artifact reviewer flagged — likely a Figma scaling round-trip.
Difference is sub-pixel and not visible on any standard DPR.
* feat(dashboards-list-v2): treat search input as DSL with explicit submission
What the user types is what gets sent to the API as the `query`
param — no more wrapping the input in a synthesized
`name CONTAINS '…' or description CONTAINS '…'` clause.
This gives users the full DSL surface (name, description, created_by,
created_at, updated_at, locked, public, source, tag-key equality)
instead of the name+description CONTAINS approximation.
Submission is explicit (Enter, blur, or a return-key icon button
in the input's suffix slot) so an in-progress DSL string never
hits the API mid-typing. On error, the toolbar (search + create)
stays visible above the ErrorState so users can edit and retry
without losing their place.
- Drop buildSearchDSL helper and the 300ms debounce.
- Pass searchInput.trim() to the API; empty input clears filter.
- SearchBar gains onSubmit (Enter / blur / suffix click).
- Move ErrorState below the toolbar in DashboardsList layout.
- Sync local input from searchString on URL changes (back/fwd).
- Placeholder updated to hint at DSL syntax.
Trade-off: a bare "foo" no longer matches anything; users now need
to type "name CONTAINS 'foo'". This is the new UX.
* fix(dashboards-list-v2): tighten ActionsPopover button styling
- Drop variant="ghost" on the three non-destructive row buttons so
they pick up the signoz Button default.
- Use <Divider /> from @signozhq/ui above the destructive Delete
button instead of a bespoke .deleteDivider class.
- Drop the surrounding .content padding and the now-unused
.deleteDivider rule. Keep .menuItem for left-alignment + width.
* fix(dashboards-list-v2): surface DSL parse errors on 400 responses
When the BE rejects the search query with a 4xx, show the server-
provided detail (e.g. `invalid filter query: unsupported expression
"asdas" — every term must be of the form \`key OP value\``) instead
of the generic "Something went wrong" panel.
- ErrorState gains optional httpStatus + errorMessage props.
For 4xx it renders a two-line layout (title + cleaned detail)
and drops the Retry button (retrying the same bad query won't
help). Contact Support stays.
- Add formatQueryErrorMessage util: strips the "invalid filter
query:" prefix that the FE title already implies, and rewrites
backtick-quoted format hints to use double quotes.
- DashboardsList extracts status + message via toAPIError and
passes them through. Search toolbar remains visible above the
error, so the user can fix and resubmit.
* chore: fix lint error due to rebase
72 lines
1.4 KiB
JSON
72 lines
1.4 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"sourceMap": true,
|
|
"outDir": "./dist/",
|
|
"noImplicitAny": true,
|
|
"noImplicitReturns": true,
|
|
"module": "esnext",
|
|
"target": "es2018",
|
|
"jsx": "react-jsx",
|
|
"allowJs": true,
|
|
"strict": true,
|
|
"esModuleInterop": true,
|
|
"skipLibCheck": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"lib": [
|
|
"dom",
|
|
"dom.iterable",
|
|
"esnext"
|
|
],
|
|
"allowSyntheticDefaultImports": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"moduleResolution": "bundler",
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"noEmit": true,
|
|
"paths": {
|
|
"*": [
|
|
"./src/*"
|
|
],
|
|
"@constants/*": [
|
|
"./src/container/OnboardingContainer/constants/*"
|
|
],
|
|
"@/*": [
|
|
"./src/*"
|
|
],
|
|
"test-mocks/*": [
|
|
"./__mocks__/*"
|
|
]
|
|
},
|
|
"plugins": [
|
|
{
|
|
"name": "typescript-plugin-css-modules"
|
|
}
|
|
],
|
|
"types": ["vite/client", "node", "jest", "testing-library__jest-dom"]
|
|
},
|
|
"exclude": [
|
|
"node_modules",
|
|
"src/parser/*.ts",
|
|
"src/parser/TraceOperatorParser/*.ts",
|
|
"orval.config.ts",
|
|
"src/pages/DashboardsListPageV2/**/*",
|
|
"src/pages/DashboardPageV2/**/*"
|
|
],
|
|
"include": [
|
|
"./src",
|
|
"./src/**/*.ts",
|
|
"src/**/*.tsx",
|
|
"src/**/*.d.ts",
|
|
"babel.config.cjs",
|
|
"./jest.config.ts",
|
|
"./__mocks__",
|
|
"./conf/default.conf",
|
|
"./public",
|
|
"./commitlint.config.ts",
|
|
"./vite.config.ts",
|
|
"./jest.setup.ts",
|
|
"./tests/**.ts",
|
|
"./**/*.d.ts"
|
|
]
|
|
}
|