Skip to content

feat(design-system): add hostmap, tailwind merge, other #1228

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexfreska
Copy link
Member

@alexfreska alexfreska commented Jul 31, 2025

The PR adds a few components for use in indexd, and also cleans up the units storage helpers used across apps.

design-system

  • Added cn tailwind class merging helper.
  • ValueCopyable now shows the display value as hover title.
  • Added CountryFlag.
  • Added HostMap.

units

  • Added country code helpers.
  • Storage helpers refactored for v2-only and modular usage.

Copy link

changeset-bot bot commented Jul 31, 2025

🦋 Changeset detected

Latest commit: 76e9c68

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@siafoundation/design-system Minor
@siafoundation/units Minor
indexd Patch
@siafoundation/indexd-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jul 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
explorer ❌ Failed (Inspect) Aug 1, 2025 8:57pm
explorer-zen ❌ Failed (Inspect) Aug 1, 2025 8:57pm
indexd ❌ Failed (Inspect) Aug 1, 2025 8:57pm
renterd ❌ Failed (Inspect) Aug 1, 2025 8:57pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
hostd ⬜️ Ignored (Inspect) Visit Preview Aug 1, 2025 8:57pm

Copy link
Member Author

alexfreska commented Jul 31, 2025

@github-project-automation github-project-automation bot moved this to In Progress in Sia Jul 31, 2025
@alexfreska alexfreska force-pushed the feat_ds_changes branch 3 times, most recently from 6ed2df3 to e61f5d8 Compare July 31, 2025 15:51
@alexfreska alexfreska force-pushed the feat_indexd_siascan_data branch from 2e08288 to 862e457 Compare July 31, 2025 16:26
@alexfreska alexfreska changed the base branch from feat_indexd_siascan_data to graphite-base/1228 August 1, 2025 13:22
@graphite-app graphite-app bot changed the base branch from graphite-base/1228 to main August 1, 2025 13:28
@Copilot Copilot AI review requested due to automatic review settings August 1, 2025 15:18
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds new data visualization components and refactors storage helpers to support v2-only host operations. The main focus is adding a DataTable component with TanStack integration, a HostMap visualization, and improved country handling utilities.

  • Refactored storage utilities to work exclusively with V2HostSettings instead of mixed v1/v2 support
  • Added TanStack-based DataTable with virtualization, filtering, and pagination
  • Added HostMap component for geographical visualization of hosts
  • Added country utilities and CountryFlag component for better internationalization

Reviewed Changes

Copilot reviewed 31 out of 33 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
libs/units/src/storage.ts Refactored storage cost calculations to use V2HostSettings exclusively
libs/units/src/country.ts Added country utilities and improved error handling for country codes
libs/design-system/src/app/DataTable/* New TanStack-based data table implementation with virtualization
libs/design-system/src/app/HostMap/* New geographical host visualization component
libs/design-system/src/components/CountryFlag.tsx New component for displaying country flags with proper accessibility
libs/design-system/src/lib/ui.ts Added tailwind class merging utility function
Comments suppressed due to low confidence (1)

libs/units/src/storage.spec.ts:30

  • The test expects '$8.64/TB' but the function displayStoragePricePerTBPerMonth should append '/month' suffix based on the perMonth: true parameter in the implementation. The expected value should be '$8.64/TB/month'.
  ).toEqual('$8.64/TB')

@alexfreska alexfreska changed the title feat(design-system): add datatable, hostmap, cn feat(design-system): add hostmap, tailwind merge, other Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant