Skip to content

ECHOES-1385 Implement new EmptyState component#737

Merged
2amelia merged 9 commits into
mainfrom
amelia/echoes-1385-implement-new-empty-state-component
Jul 24, 2026
Merged

ECHOES-1385 Implement new EmptyState component#737
2amelia merged 9 commits into
mainfrom
amelia/echoes-1385-implement-new-empty-state-component

Conversation

@2amelia

@2amelia 2amelia commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a reusable \ component to \
  • export the component publicly with tests and Storybook coverage
  • refine spacing, icon-color inheritance, and docs/examples based on review feedback

Validation

  • yarn jest src/components/empty-state
  • yarn ts-check
  • yarn lint

@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for echoes-react ready!

Name Link
🔨 Latest commit 17fe587
🔍 Latest deploy log https://app.netlify.com/projects/echoes-react/deploys/6a6385c3e9c5fe0008c80ea3
😎 Deploy Preview https://deploy-preview-737--echoes-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Jul 21, 2026

Copy link
Copy Markdown

ECHOES-1385

@2amelia
2amelia marked this pull request as ready for review July 21, 2026 15:32
Comment thread src/components/empty-state/EmptyState.tsx Outdated
Comment thread src/components/empty-state/EmptyState.tsx
Comment thread src/components/empty-state/EmptyState.tsx Outdated
Comment thread stories/EmptyState-stories.tsx
Comment thread src/components/empty-state/EmptyStateStyles.tsx
Comment thread stories/EmptyState-stories.tsx
@2amelia
2amelia requested a review from marciopmoreira6 July 21, 2026 19:09
Comment thread src/components/empty-state/EmptyStateStyles.tsx Outdated

@jeremy-davis-sonarsource jeremy-davis-sonarsource left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Nice work.

Just a few comments, but I'm trusting you to address them. No need for a re-review

(NP = Nitpicks, feel free to ignore)

Comment thread src/components/empty-state/EmptyState.tsx Outdated
Comment thread src/components/empty-state/EmptyStateStyles.tsx
Comment thread src/components/empty-state/EmptyStateStyles.tsx Outdated
Comment thread src/components/empty-state/EmptyStateStyles.tsx Outdated
@sonarqube-next

Copy link
Copy Markdown

@2amelia
2amelia requested a review from marciopmoreira6 July 24, 2026 15:39
@2amelia
2amelia merged commit 57a7c1b into main Jul 24, 2026
12 checks passed
@2amelia
2amelia deleted the amelia/echoes-1385-implement-new-empty-state-component branch July 24, 2026 15:45
@gitar-bot

gitar-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 2 resolved / 2 findings

Implements the reusable EmptyState component with comprehensive tests and Storybook coverage, addressing the hardcoded heading level finding.

✅ 2 resolved
Edge Case: Heading level hardcoded to h2 may break heading order

📄 src/components/empty-state/EmptyState.tsx:79-81
EmptyState always renders its heading as <Heading as="h2">. When the component is placed on a page where the surrounding document outline doesn't start at h1, this produces non-sequential heading levels, an accessibility (heading-order) issue that the component's a11y test won't catch since it renders in isolation. Consider exposing an optional headingLevel/as prop (defaulting to h2) so consumers can align the level with their page structure.

Quality: EmptyState uses ref-as-prop while rest of codebase uses forwardRef

📄 src/components/empty-state/EmptyState.tsx:60 📄 src/components/empty-state/EmptyState.tsx:67-71
Existing components (Heading, Text, Button) forward refs via forwardRef, but EmptyState adopts the React 19 ref-in-props pattern. This works under React 19 but is inconsistent with the surrounding conventions, which can confuse maintainers. Consider matching the established forwardRef pattern for consistency, or intentionally standardize on the new pattern project-wide.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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