Skip to content
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

Info component #2949

Merged
merged 21 commits into from
Jan 18, 2025
Merged

Info component #2949

merged 21 commits into from
Jan 18, 2025

Conversation

hughess
Copy link
Member

@hughess hughess commented Dec 20, 2024

Description

Adds an Info component which can be used standalone within markdown to display a tooltip, or within components to display information when a description prop is used.

Components covered:

  • Column
  • Value
  • BigValue
  • Accordion
  • Alert
  • Tab
  • Checkbox
  • Dropdown
  • DateRange
  • DateInput
  • ButtonGroup
  • TextArea
  • Slider

Note on Charts, DataTable, and DimensionGrid

It's difficult to find a suitable place for the info icon that does not visually clutter a chart. The recommended approach before we have a built-in way to do this (via a description prop) is to do one of the following:

  • Add a markdown header above the chart and include an <Info/> component in that line so it appears with the title
  • Add a standalone <Input/> component above or below the chart

Standalone example

CleanShot 2024-12-20 at 15 46 34@2x

BigValue

CleanShot 2024-12-20 at 15 56 22

DataTable Columns

CleanShot 2024-12-20 at 16 23 31

Value

CleanShot 2024-12-21 at 16 42 10@2x

Slider

CleanShot 2024-12-21 at 16 42 00@2x

Dropdown

CleanShot 2024-12-21 at 16 41 49@2x

ButtonGroup

CleanShot 2024-12-21 at 16 41 44@2x

Alert

CleanShot 2024-12-21 at 16 41 21@2x

Accordion

CleanShot 2024-12-21 at 16 41 14@2x

To Do

  • Decide on className prop
  • Add to VS Code extension
  • Confirm that there is not an issue with HMR for ButtonGroup, DateRange, and DateInput
    • When testing in docs site, changing title or description seemed to break page, but refreshing fixed it
  • Add description prop to docs for relevant components + example usage

Checklist

  • For UI or styling changes, I have added a screenshot or gif showing before & after
  • I have added a changeset
  • I have added to the docs where applicable
  • I have added to the VS Code extension where applicable

@hughess
Copy link
Member Author

hughess commented Dec 20, 2024

@timothyhoward I think you were waiting for the DataTable version of this!

@timothyhoward
Copy link

@hughess Amazing work! This is just what I've been after! 🎉

@mcrascal
Copy link
Member

mcrascal commented Jan 9, 2025

@hughess some proposed changes in #2995 for your review

@hughess
Copy link
Member Author

hughess commented Jan 9, 2025

@mcrascal nice thanks! Those look perfect

@ItsMeBrianD
Copy link
Member

@hughess
Copy link
Member Author

hughess commented Jan 14, 2025

For posterity, this component needs to live separately from Hint since there are different spacing requirements in different contexts of the app. Changing Hint would adversely impact our usage of it in the settings menu/elsewhere in the app itself

Copy link
Member

@archiewood archiewood left a comment

Choose a reason for hiding this comment

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

assume we should add prop to the docs for supported components?

sites/docs/pages/components/ui/info/index.md Show resolved Hide resolved
@hughess hughess merged commit c9aa366 into next Jan 18, 2025
68 checks passed
@hughess hughess deleted the info-component branch January 18, 2025 19:44
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.

5 participants