Skip to content

LG-5027: Toolbar #2809

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

Merged
merged 49 commits into from
May 22, 2025
Merged

LG-5027: Toolbar #2809

merged 49 commits into from
May 22, 2025

Conversation

shaneeza
Copy link
Collaborator

@shaneeza shaneeza commented Apr 16, 2025

✍️ Proposed changes

🎟 Jira ticket: LG-5027

✅ Checklist

For bug fixes, new features & breaking changes

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have run pnpm changeset and documented my changes

For new components

  • I have added my new package to the global tsconfig
  • I have added my new package to the Table of Contents on the global README
  • I have verified the Live Example looks as intended on the design website.

🧪 How to test changes

Copy link

changeset-bot bot commented Apr 16, 2025

🦋 Changeset detected

Latest commit: a9c9c31

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

This PR includes changesets to release 34 packages
Name Type
@leafygreen-ui/toolbar Patch
@leafygreen-ui/icon-button Patch
@lg-charts/chart-card Patch
@lg-chat/message-feedback Patch
@lg-chat/title-bar Patch
@leafygreen-ui/banner Patch
@leafygreen-ui/code Patch
@leafygreen-ui/combobox Patch
@leafygreen-ui/date-picker Patch
@leafygreen-ui/drawer Patch
@leafygreen-ui/expandable-card Patch
@leafygreen-ui/guide-cue Patch
@leafygreen-ui/menu Patch
@leafygreen-ui/modal Patch
@leafygreen-ui/pagination Patch
@leafygreen-ui/password-input Patch
@leafygreen-ui/search-input Patch
@leafygreen-ui/table Patch
@leafygreen-ui/toast Patch
@lg-charts/core Patch
@lg-charts/drag-provider Patch
@lg-chat/chat-window Patch
@lg-chat/fixed-chat-window Patch
@lg-chat/message Patch
@leafygreen-ui/form-footer Patch
@lg-tools/storybook-decorators Patch
@lg-chat/lg-markdown Patch
@leafygreen-ui/split-button Patch
@lg-chat/chat-disclaimer Patch
@leafygreen-ui/confirmation-modal Patch
@leafygreen-ui/marketing-modal Patch
@lg-chat/input-bar Patch
@lg-chat/message-feed Patch
@lg-tools/storybook-addon 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
Contributor

github-actions bot commented Apr 16, 2025

Size Change: +70 B (0%)

Total Size: 1.51 MB

Filename Size Change
packages/icon-button/dist/esm/index.js 2.26 kB +36 B (+1.62%)
packages/icon-button/dist/index.js 2.46 kB +34 B (+1.4%)
ℹ️ View Unchanged
Filename Size
charts/chart-card/dist/esm/index.js 2.78 kB
charts/chart-card/dist/index.js 2.93 kB
charts/colors/dist/esm/index.js 515 B
charts/colors/dist/index.js 640 B
charts/core/dist/esm/index.js 16 kB
charts/core/dist/index.js 16.2 kB
charts/drag-provider/dist/esm/index.js 1.39 kB
charts/drag-provider/dist/index.js 1.5 kB
charts/legend/dist/esm/index.js 1.55 kB
charts/legend/dist/index.js 1.71 kB
charts/series-provider/dist/esm/index.js 1.05 kB
charts/series-provider/dist/index.js 1.17 kB
chat/avatar/dist/esm/index.js 1.36 kB
chat/avatar/dist/index.js 1.52 kB
chat/chat-disclaimer/dist/esm/index.js 566 B
chat/chat-disclaimer/dist/index.js 755 B
chat/chat-window/dist/esm/index.js 1.62 kB
chat/chat-window/dist/index.js 1.79 kB
chat/fixed-chat-window/dist/esm/index.js 2.39 kB
chat/fixed-chat-window/dist/index.js 2.57 kB
chat/input-bar/dist/esm/index.js 6.9 kB
chat/input-bar/dist/index.js 7.11 kB
chat/leafygreen-chat-provider/dist/esm/index.js 873 B
chat/leafygreen-chat-provider/dist/index.js 1.02 kB
chat/lg-markdown/dist/esm/index.js 1.44 kB
chat/lg-markdown/dist/index.js 1.59 kB
chat/message-feed/dist/esm/index.js 2.78 kB
chat/message-feed/dist/index.js 2.97 kB
chat/message-feedback/dist/esm/index.js 2.54 kB
chat/message-feedback/dist/index.js 2.78 kB
chat/message-prompts/dist/esm/index.js 1.72 kB
chat/message-prompts/dist/index.js 1.86 kB
chat/message-rating/dist/esm/index.js 2.55 kB
chat/message-rating/dist/index.js 2.75 kB
chat/message/dist/esm/index.js 3.78 kB
chat/message/dist/index.js 3.98 kB
chat/rich-links/dist/esm/index.js 2.68 kB
chat/rich-links/dist/index.js 2.89 kB
chat/title-bar/dist/esm/index.js 1.37 kB
chat/title-bar/dist/index.js 1.58 kB
packages/a11y/dist/esm/index.js 1.7 kB
packages/a11y/dist/index.js 1.83 kB
packages/avatar/dist/esm/index.js 2.35 kB
packages/avatar/dist/index.js 2.53 kB
packages/badge/dist/esm/index.js 1.41 kB
packages/badge/dist/index.js 1.59 kB
packages/banner/dist/esm/index.js 3.08 kB
packages/banner/dist/index.js 3.37 kB
packages/box/dist/esm/index.js 489 B
packages/box/dist/index.js 627 B
packages/button/dist/esm/index.js 4.92 kB
packages/button/dist/index.js 5.1 kB
packages/callout/dist/esm/index.js 1.54 kB
packages/callout/dist/index.js 1.71 kB
packages/card/dist/esm/index.js 1.51 kB
packages/card/dist/index.js 1.69 kB
packages/checkbox/dist/esm/index.js 4.23 kB
packages/checkbox/dist/index.js 4.43 kB
packages/chip/dist/esm/index.js 3.2 kB
packages/chip/dist/index.js 3.41 kB
packages/code/dist/esm/index.js 10.9 kB
packages/code/dist/index.js 11.5 kB
packages/combobox/dist/esm/index.js 11.6 kB
packages/combobox/dist/index.js 11.8 kB
packages/confirmation-modal/dist/esm/index.js 2.52 kB
packages/confirmation-modal/dist/index.js 2.74 kB
packages/copyable/dist/esm/index.js 2.78 kB
packages/copyable/dist/index.js 2.99 kB
packages/date-picker/dist/esm/index.js 13.6 kB
packages/date-picker/dist/index.js 14 kB
packages/date-utils/dist/esm/index.js 3.48 kB
packages/date-utils/dist/index.js 3.6 kB
packages/descendants/dist/esm/index.js 2.83 kB
packages/descendants/dist/index.js 2.93 kB
packages/drawer/dist/esm/index.js 3.62 kB
packages/drawer/dist/index.js 3.75 kB
packages/emotion/dist/esm/index.js 356 B
packages/emotion/dist/index.js 572 B
packages/empty-state/dist/esm/index.js 1.77 kB
packages/empty-state/dist/index.js 1.94 kB
packages/expandable-card/dist/esm/index.js 2.85 kB
packages/expandable-card/dist/index.js 3.03 kB
packages/form-field/dist/esm/index.js 4.31 kB
packages/form-field/dist/index.js 4.47 kB
packages/form-footer/dist/esm/index.js 1.71 kB
packages/form-footer/dist/index.js 1.91 kB
packages/gallery-indicator/dist/esm/index.js 1.51 kB
packages/gallery-indicator/dist/index.js 1.67 kB
packages/guide-cue/dist/esm/index.js 6.37 kB
packages/guide-cue/dist/index.js 6.57 kB
packages/hooks/dist/esm/index.js 3.45 kB
packages/hooks/dist/index.js 3.59 kB
packages/icon/dist/ActivityFeed.js 1.95 kB
packages/icon/dist/AddFile.js 1.72 kB
packages/icon/dist/AllProducts.js 1.79 kB
packages/icon/dist/AnalyticsNode.js 1.56 kB
packages/icon/dist/Apps.js 1.39 kB
packages/icon/dist/Array.js 1.51 kB
packages/icon/dist/ArrowDown.js 1.64 kB
packages/icon/dist/ArrowLeft.js 1.65 kB
packages/icon/dist/ArrowRight.js 1.64 kB
packages/icon/dist/ArrowUp.js 1.64 kB
packages/icon/dist/Beaker.js 2.07 kB
packages/icon/dist/Bell.js 1.6 kB
packages/icon/dist/Biometric.js 2.17 kB
packages/icon/dist/Boolean.js 1.44 kB
packages/icon/dist/Building.js 1.59 kB
packages/icon/dist/Bulb.js 1.64 kB
packages/icon/dist/Calendar.js 1.59 kB
packages/icon/dist/Camera.js 1.68 kB
packages/icon/dist/Cap.js 1.8 kB
packages/icon/dist/CaretDown.js 1.46 kB
packages/icon/dist/CaretLeft.js 1.46 kB
packages/icon/dist/CaretRight.js 1.46 kB
packages/icon/dist/CaretUp.js 1.46 kB
packages/icon/dist/ChartFilled.js 1.56 kB
packages/icon/dist/Charts.js 1.53 kB
packages/icon/dist/Checkmark.js 1.6 kB
packages/icon/dist/CheckmarkWithCircle.js 1.67 kB
packages/icon/dist/ChevronDown.js 1.56 kB
packages/icon/dist/ChevronLeft.js 1.56 kB
packages/icon/dist/ChevronRight.js 1.57 kB
packages/icon/dist/ChevronUp.js 1.55 kB
packages/icon/dist/Circle.js 1.33 kB
packages/icon/dist/Clock.js 1.62 kB
packages/icon/dist/ClockWithArrow.js 1.91 kB
packages/icon/dist/Clone.js 1.5 kB
packages/icon/dist/Cloud.js 1.67 kB
packages/icon/dist/Code.js 1.88 kB
packages/icon/dist/CodeBlock.js 1.81 kB
packages/icon/dist/Coin.js 1.93 kB
packages/icon/dist/Colon.js 1.44 kB
packages/icon/dist/Config.js 1.76 kB
packages/icon/dist/Connect.js 1.92 kB
packages/icon/dist/Copy.js 1.87 kB
packages/icon/dist/CreditCard.js 1.42 kB
packages/icon/dist/CurlyBraces.js 2.02 kB
packages/icon/dist/Cursor.js 1.55 kB
packages/icon/dist/Dashboard.js 1.56 kB
packages/icon/dist/Database.js 2.02 kB
packages/icon/dist/Diagram.js 1.64 kB
packages/icon/dist/Diagram2.js 1.65 kB
packages/icon/dist/Diagram3.js 1.62 kB
packages/icon/dist/Disconnect.js 1.86 kB
packages/icon/dist/Download.js 1.78 kB
packages/icon/dist/Drag.js 1.6 kB
packages/icon/dist/Edit.js 1.51 kB
packages/icon/dist/Ellipsis.js 1.48 kB
packages/icon/dist/Email.js 1.7 kB
packages/icon/dist/EmptyDatabase.js 4.29 kB
packages/icon/dist/EmptyFolder.js 2.08 kB
packages/icon/dist/Eraser.js 1.77 kB
packages/icon/dist/Escalation.js 1.67 kB
packages/icon/dist/esm/ActivityFeed.js 1.74 kB
packages/icon/dist/esm/AddFile.js 1.51 kB
packages/icon/dist/esm/AllProducts.js 1.59 kB
packages/icon/dist/esm/AnalyticsNode.js 1.36 kB
packages/icon/dist/esm/Apps.js 1.2 kB
packages/icon/dist/esm/Array.js 1.31 kB
packages/icon/dist/esm/ArrowDown.js 1.44 kB
packages/icon/dist/esm/ArrowLeft.js 1.44 kB
packages/icon/dist/esm/ArrowRight.js 1.43 kB
packages/icon/dist/esm/ArrowUp.js 1.43 kB
packages/icon/dist/esm/Beaker.js 1.86 kB
packages/icon/dist/esm/Bell.js 1.4 kB
packages/icon/dist/esm/Biometric.js 1.96 kB
packages/icon/dist/esm/Boolean.js 1.24 kB
packages/icon/dist/esm/Building.js 1.39 kB
packages/icon/dist/esm/Bulb.js 1.44 kB
packages/icon/dist/esm/Calendar.js 1.39 kB
packages/icon/dist/esm/Camera.js 1.48 kB
packages/icon/dist/esm/Cap.js 1.59 kB
packages/icon/dist/esm/CaretDown.js 1.26 kB
packages/icon/dist/esm/CaretLeft.js 1.26 kB
packages/icon/dist/esm/CaretRight.js 1.26 kB
packages/icon/dist/esm/CaretUp.js 1.26 kB
packages/icon/dist/esm/ChartFilled.js 1.35 kB
packages/icon/dist/esm/Charts.js 1.33 kB
packages/icon/dist/esm/Checkmark.js 1.4 kB
packages/icon/dist/esm/CheckmarkWithCircle.js 1.46 kB
packages/icon/dist/esm/ChevronDown.js 1.36 kB
packages/icon/dist/esm/ChevronLeft.js 1.36 kB
packages/icon/dist/esm/ChevronRight.js 1.38 kB
packages/icon/dist/esm/ChevronUp.js 1.35 kB
packages/icon/dist/esm/Circle.js 1.13 kB
packages/icon/dist/esm/Clock.js 1.42 kB
packages/icon/dist/esm/ClockWithArrow.js 1.7 kB
packages/icon/dist/esm/Clone.js 1.29 kB
packages/icon/dist/esm/Cloud.js 1.47 kB
packages/icon/dist/esm/Code.js 1.68 kB
packages/icon/dist/esm/CodeBlock.js 1.61 kB
packages/icon/dist/esm/Coin.js 1.72 kB
packages/icon/dist/esm/Colon.js 1.25 kB
packages/icon/dist/esm/Config.js 1.55 kB
packages/icon/dist/esm/Connect.js 1.72 kB
packages/icon/dist/esm/Copy.js 1.67 kB
packages/icon/dist/esm/CreditCard.js 1.22 kB
packages/icon/dist/esm/CurlyBraces.js 1.82 kB
packages/icon/dist/esm/Cursor.js 1.35 kB
packages/icon/dist/esm/Dashboard.js 1.36 kB
packages/icon/dist/esm/Database.js 1.81 kB
packages/icon/dist/esm/Diagram.js 1.44 kB
packages/icon/dist/esm/Diagram2.js 1.44 kB
packages/icon/dist/esm/Diagram3.js 1.42 kB
packages/icon/dist/esm/Disconnect.js 1.65 kB
packages/icon/dist/esm/Download.js 1.57 kB
packages/icon/dist/esm/Drag.js 1.41 kB
packages/icon/dist/esm/Edit.js 1.31 kB
packages/icon/dist/esm/Ellipsis.js 1.29 kB
packages/icon/dist/esm/Email.js 1.5 kB
packages/icon/dist/esm/EmptyDatabase.js 4.07 kB
packages/icon/dist/esm/EmptyFolder.js 1.88 kB
packages/icon/dist/esm/Eraser.js 1.56 kB
packages/icon/dist/esm/Escalation.js 1.46 kB
packages/icon/dist/esm/Export.js 1.57 kB
packages/icon/dist/esm/Favorite.js 1.52 kB
packages/icon/dist/esm/Federation.js 1.84 kB
packages/icon/dist/esm/File.js 1.33 kB
packages/icon/dist/esm/Filter.js 1.32 kB
packages/icon/dist/esm/Folder.js 1.23 kB
packages/icon/dist/esm/Format.js 1.65 kB
packages/icon/dist/esm/FullScreenEnter.js 1.48 kB
packages/icon/dist/esm/FullScreenExit.js 1.49 kB
packages/icon/dist/esm/Function.js 2.53 kB
packages/icon/dist/esm/Gauge.js 1.52 kB
packages/icon/dist/esm/GlobeAmericas.js 1.44 kB
packages/icon/dist/esm/GovernmentBuilding.js 1.47 kB
packages/icon/dist/esm/Guide.js 1.78 kB
packages/icon/dist/esm/Hash.js 1.62 kB
packages/icon/dist/esm/HiddenSecondaryNode.js 2.89 kB
packages/icon/dist/esm/Highlight.js 1.67 kB
packages/icon/dist/esm/Home.js 1.58 kB
packages/icon/dist/esm/HorizontalDrag.js 1.41 kB
packages/icon/dist/esm/Import.js 1.56 kB
packages/icon/dist/esm/ImportantWithCircle.js 1.33 kB
packages/icon/dist/esm/index.js 35.2 kB
packages/icon/dist/esm/InfoWithCircle.js 1.36 kB
packages/icon/dist/esm/InternalEmployee.js 1.65 kB
packages/icon/dist/esm/InviteUser.js 1.67 kB
packages/icon/dist/esm/Key.js 1.47 kB
packages/icon/dist/esm/Laptop.js 1.46 kB
packages/icon/dist/esm/LightningBolt.js 1.33 kB
packages/icon/dist/esm/Link.js 1.83 kB
packages/icon/dist/esm/List.js 1.47 kB
packages/icon/dist/esm/Lock.js 1.43 kB
packages/icon/dist/esm/LogIn.js 1.5 kB
packages/icon/dist/esm/LogOut.js 1.56 kB
packages/icon/dist/esm/MagnifyingGlass.js 1.4 kB
packages/icon/dist/esm/Megaphone.js 1.37 kB
packages/icon/dist/esm/Menu.js 1.28 kB
packages/icon/dist/esm/Minus.js 1.23 kB
packages/icon/dist/esm/Mobile.js 1.23 kB
packages/icon/dist/esm/Moon.js 1.41 kB
packages/icon/dist/esm/MultiDirectionArrow.js 1.45 kB
packages/icon/dist/esm/MultiLayers.js 2.4 kB
packages/icon/dist/esm/NavCollapse.js 1.47 kB
packages/icon/dist/esm/NavExpand.js 1.48 kB
packages/icon/dist/esm/NoFilter.js 1.46 kB
packages/icon/dist/esm/NotAllowed.js 1.35 kB
packages/icon/dist/esm/Note.js 1.38 kB
packages/icon/dist/esm/NumberedList.js 2.28 kB
packages/icon/dist/esm/OpenNewTab.js 1.66 kB
packages/icon/dist/esm/OutlineFavorite.js 1.79 kB
packages/icon/dist/esm/Package.js 1.64 kB
packages/icon/dist/esm/Pause.js 1.28 kB
packages/icon/dist/esm/Pending.js 1.26 kB
packages/icon/dist/esm/Person.js 1.45 kB
packages/icon/dist/esm/PersonGroup.js 1.65 kB
packages/icon/dist/esm/PersonWithLock.js 1.66 kB
packages/icon/dist/esm/Pin.js 1.39 kB
packages/icon/dist/esm/Play.js 1.27 kB
packages/icon/dist/esm/Plus.js 1.29 kB
packages/icon/dist/esm/PlusWithCircle.js 1.32 kB
packages/icon/dist/esm/Primary.js 1.34 kB
packages/icon/dist/esm/Project.js 1.38 kB
packages/icon/dist/esm/QuestionMarkWithCircle.js 1.69 kB
packages/icon/dist/esm/Read.js 1.98 kB
packages/icon/dist/esm/Recommended.js 2.16 kB
packages/icon/dist/esm/Redo.js 1.63 kB
packages/icon/dist/esm/Refresh.js 1.7 kB
packages/icon/dist/esm/Relationship.js 1.39 kB
packages/icon/dist/esm/ReplicaSet.js 1.54 kB
packages/icon/dist/esm/Resize.js 1.36 kB
packages/icon/dist/esm/Resource.js 1.69 kB
packages/icon/dist/esm/Return.js 1.46 kB
packages/icon/dist/esm/Revert.js 1.5 kB
packages/icon/dist/esm/Router.js 2.16 kB
packages/icon/dist/esm/Save.js 1.89 kB
packages/icon/dist/esm/SearchIndex.js 2.02 kB
packages/icon/dist/esm/Secondary.js 1.58 kB
packages/icon/dist/esm/Serverless.js 1.53 kB
packages/icon/dist/esm/Settings.js 1.96 kB
packages/icon/dist/esm/ShardedCluster.js 1.91 kB
packages/icon/dist/esm/Shell.js 1.45 kB
packages/icon/dist/esm/Shirt.js 1.4 kB
packages/icon/dist/esm/SMS.js 1.41 kB
packages/icon/dist/esm/SortAscending.js 1.49 kB
packages/icon/dist/esm/SortDescending.js 1.48 kB
packages/icon/dist/esm/Sparkle.js 1.81 kB
packages/icon/dist/esm/SplitHorizontal.js 1.25 kB
packages/icon/dist/esm/SplitVertical.js 1.25 kB
packages/icon/dist/esm/Stitch.js 1.29 kB
packages/icon/dist/esm/Stop.js 1.14 kB
packages/icon/dist/esm/Streaming.js 2.28 kB
packages/icon/dist/esm/String.js 1.4 kB
packages/icon/dist/esm/Sun.js 1.62 kB
packages/icon/dist/esm/Support.js 1.48 kB
packages/icon/dist/esm/Sweep.js 1.5 kB
packages/icon/dist/esm/Table.js 1.28 kB
packages/icon/dist/esm/Tag.js 1.31 kB
packages/icon/dist/esm/TemporaryTable.js 1.51 kB
packages/icon/dist/esm/ThumbsDown.js 1.6 kB
packages/icon/dist/esm/ThumbsUp.js 1.6 kB
packages/icon/dist/esm/TimeSeries.js 1.64 kB
packages/icon/dist/esm/TimeSeriesCollection.js 1.78 kB
packages/icon/dist/esm/Trash.js 1.31 kB
packages/icon/dist/esm/Undo.js 1.62 kB
packages/icon/dist/esm/University.js 1.81 kB
packages/icon/dist/esm/Unlock.js 1.5 kB
packages/icon/dist/esm/Unsorted.js 1.53 kB
packages/icon/dist/esm/UpDownCarets.js 1.38 kB
packages/icon/dist/esm/Upload.js 1.59 kB
packages/icon/dist/esm/VerticalEllipsis.js 1.3 kB
packages/icon/dist/esm/View.js 1.44 kB
packages/icon/dist/esm/Visibility.js 1.61 kB
packages/icon/dist/esm/VisibilityOff.js 2.01 kB
packages/icon/dist/esm/Warning.js 1.38 kB
packages/icon/dist/esm/Wizard.js 1.72 kB
packages/icon/dist/esm/Wrench.js 1.72 kB
packages/icon/dist/esm/Write.js 1.99 kB
packages/icon/dist/esm/X.js 1.42 kB
packages/icon/dist/esm/XWithCircle.js 1.36 kB
packages/icon/dist/Export.js 1.78 kB
packages/icon/dist/Favorite.js 1.73 kB
packages/icon/dist/Federation.js 2.05 kB
packages/icon/dist/File.js 1.53 kB
packages/icon/dist/Filter.js 1.52 kB
packages/icon/dist/Folder.js 1.43 kB
packages/icon/dist/Format.js 1.85 kB
packages/icon/dist/FullScreenEnter.js 1.68 kB
packages/icon/dist/FullScreenExit.js 1.69 kB
packages/icon/dist/Function.js 2.74 kB
packages/icon/dist/Gauge.js 1.72 kB
packages/icon/dist/GlobeAmericas.js 1.64 kB
packages/icon/dist/GovernmentBuilding.js 1.67 kB
packages/icon/dist/Guide.js 1.99 kB
packages/icon/dist/Hash.js 1.83 kB
packages/icon/dist/HiddenSecondaryNode.js 3.1 kB
packages/icon/dist/Highlight.js 1.87 kB
packages/icon/dist/Home.js 1.79 kB
packages/icon/dist/HorizontalDrag.js 1.61 kB
packages/icon/dist/Import.js 1.77 kB
packages/icon/dist/ImportantWithCircle.js 1.53 kB
packages/icon/dist/index.js 35.5 kB
packages/icon/dist/InfoWithCircle.js 1.56 kB
packages/icon/dist/InternalEmployee.js 1.86 kB
packages/icon/dist/InviteUser.js 1.87 kB
packages/icon/dist/Key.js 1.67 kB
packages/icon/dist/Laptop.js 1.65 kB
packages/icon/dist/LightningBolt.js 1.53 kB
packages/icon/dist/Link.js 2.04 kB
packages/icon/dist/List.js 1.67 kB
packages/icon/dist/Lock.js 1.63 kB
packages/icon/dist/LogIn.js 1.7 kB
packages/icon/dist/LogOut.js 1.76 kB
packages/icon/dist/MagnifyingGlass.js 1.6 kB
packages/icon/dist/Megaphone.js 1.57 kB
packages/icon/dist/Menu.js 1.48 kB
packages/icon/dist/Minus.js 1.43 kB
packages/icon/dist/Mobile.js 1.43 kB
packages/icon/dist/Moon.js 1.62 kB
packages/icon/dist/MultiDirectionArrow.js 1.65 kB
packages/icon/dist/MultiLayers.js 2.62 kB
packages/icon/dist/NavCollapse.js 1.67 kB
packages/icon/dist/NavExpand.js 1.68 kB
packages/icon/dist/NoFilter.js 1.66 kB
packages/icon/dist/NotAllowed.js 1.55 kB
packages/icon/dist/Note.js 1.58 kB
packages/icon/dist/NumberedList.js 2.48 kB
packages/icon/dist/OpenNewTab.js 1.87 kB
packages/icon/dist/OutlineFavorite.js 2 kB
packages/icon/dist/Package.js 1.84 kB
packages/icon/dist/Pause.js 1.49 kB
packages/icon/dist/Pending.js 1.46 kB
packages/icon/dist/Person.js 1.65 kB
packages/icon/dist/PersonGroup.js 1.86 kB
packages/icon/dist/PersonWithLock.js 1.86 kB
packages/icon/dist/Pin.js 1.59 kB
packages/icon/dist/Play.js 1.47 kB
packages/icon/dist/Plus.js 1.49 kB
packages/icon/dist/PlusWithCircle.js 1.52 kB
packages/icon/dist/Primary.js 1.54 kB
packages/icon/dist/Project.js 1.58 kB
packages/icon/dist/QuestionMarkWithCircle.js 1.9 kB
packages/icon/dist/Read.js 2.19 kB
packages/icon/dist/Recommended.js 2.37 kB
packages/icon/dist/Redo.js 1.84 kB
packages/icon/dist/Refresh.js 1.9 kB
packages/icon/dist/Relationship.js 1.59 kB
packages/icon/dist/ReplicaSet.js 1.75 kB
packages/icon/dist/Resize.js 1.56 kB
packages/icon/dist/Resource.js 1.89 kB
packages/icon/dist/Return.js 1.66 kB
packages/icon/dist/Revert.js 1.7 kB
packages/icon/dist/Router.js 2.37 kB
packages/icon/dist/Save.js 2.09 kB
packages/icon/dist/SearchIndex.js 2.22 kB
packages/icon/dist/Secondary.js 1.78 kB
packages/icon/dist/Serverless.js 1.74 kB
packages/icon/dist/Settings.js 2.16 kB
packages/icon/dist/ShardedCluster.js 2.12 kB
packages/icon/dist/Shell.js 1.65 kB
packages/icon/dist/Shirt.js 1.6 kB
packages/icon/dist/SMS.js 1.6 kB
packages/icon/dist/SortAscending.js 1.69 kB
packages/icon/dist/SortDescending.js 1.69 kB
packages/icon/dist/Sparkle.js 2.02 kB
packages/icon/dist/SplitHorizontal.js 1.45 kB
packages/icon/dist/SplitVertical.js 1.45 kB
packages/icon/dist/Stitch.js 1.49 kB
packages/icon/dist/Stop.js 1.33 kB
packages/icon/dist/Streaming.js 2.49 kB
packages/icon/dist/String.js 1.6 kB
packages/icon/dist/Sun.js 1.81 kB
packages/icon/dist/Support.js 1.69 kB
packages/icon/dist/Sweep.js 1.7 kB
packages/icon/dist/Table.js 1.48 kB
packages/icon/dist/Tag.js 1.51 kB
packages/icon/dist/TemporaryTable.js 1.72 kB
packages/icon/dist/ThumbsDown.js 1.81 kB
packages/icon/dist/ThumbsUp.js 1.8 kB
packages/icon/dist/TimeSeries.js 1.86 kB
packages/icon/dist/TimeSeriesCollection.js 1.99 kB
packages/icon/dist/Trash.js 1.51 kB
packages/icon/dist/Undo.js 1.83 kB
packages/icon/dist/University.js 2.02 kB
packages/icon/dist/Unlock.js 1.7 kB
packages/icon/dist/Unsorted.js 1.74 kB
packages/icon/dist/UpDownCarets.js 1.59 kB
packages/icon/dist/Upload.js 1.79 kB
packages/icon/dist/VerticalEllipsis.js 1.5 kB
packages/icon/dist/View.js 1.64 kB
packages/icon/dist/Visibility.js 1.81 kB
packages/icon/dist/VisibilityOff.js 2.22 kB
packages/icon/dist/Warning.js 1.58 kB
packages/icon/dist/Wizard.js 1.93 kB
packages/icon/dist/Wrench.js 1.92 kB
packages/icon/dist/Write.js 2.2 kB
packages/icon/dist/X.js 1.62 kB
packages/icon/dist/XWithCircle.js 1.56 kB
packages/info-sprinkle/dist/esm/index.js 1.83 kB
packages/info-sprinkle/dist/index.js 2.02 kB
packages/inline-definition/dist/esm/index.js 1.69 kB
packages/inline-definition/dist/index.js 1.85 kB
packages/input-option/dist/esm/index.js 2.67 kB
packages/input-option/dist/index.js 2.81 kB
packages/leafygreen-provider/dist/esm/index.js 1.86 kB
packages/leafygreen-provider/dist/index.js 2.02 kB
packages/lib/dist/esm/index.js 2.54 kB
packages/lib/dist/index.js 2.7 kB
packages/loading-indicator/dist/esm/index.js 3.38 kB
packages/loading-indicator/dist/index.js 3.55 kB
packages/logo/dist/esm/index.js 39 kB
packages/logo/dist/index.js 39.3 kB
packages/marketing-modal/dist/esm/index.js 3.49 kB
packages/marketing-modal/dist/index.js 3.69 kB
packages/menu/dist/esm/index.js 7.94 kB
packages/menu/dist/index.js 8.18 kB
packages/modal/dist/esm/index.js 3.4 kB
packages/modal/dist/index.js 3.61 kB
packages/number-input/dist/esm/index.js 5.64 kB
packages/number-input/dist/index.js 5.82 kB
packages/ordered-list/dist/esm/index.js 1.32 kB
packages/ordered-list/dist/index.js 1.49 kB
packages/pagination/dist/esm/index.js 1.68 kB
packages/pagination/dist/index.js 1.88 kB
packages/palette/dist/esm/index.js 411 B
packages/palette/dist/index.js 562 B
packages/password-input/dist/esm/index.js 4.42 kB
packages/password-input/dist/index.js 4.64 kB
packages/pipeline/dist/esm/index.js 7.85 kB
packages/pipeline/dist/index.js 8.1 kB
packages/polymorphic/dist/esm/index.js 1.27 kB
packages/polymorphic/dist/index.js 1.4 kB
packages/popover/dist/esm/index.js 4.98 kB
packages/popover/dist/index.js 5.14 kB
packages/portal/dist/esm/index.js 929 B
packages/portal/dist/index.js 1.09 kB
packages/radio-box-group/dist/esm/index.js 2.87 kB
packages/radio-box-group/dist/index.js 2.99 kB
packages/radio-group/dist/esm/index.js 3.25 kB
packages/radio-group/dist/index.js 3.38 kB
packages/ripple/dist/esm/index.js 956 B
packages/ripple/dist/index.js 1.05 kB
packages/search-input/dist/esm/index.js 5.89 kB
packages/search-input/dist/index.js 6.1 kB
packages/segmented-control/dist/esm/index.js 5.44 kB
packages/segmented-control/dist/index.js 5.57 kB
packages/select/dist/esm/index.js 8.9 kB
packages/select/dist/index.js 9.11 kB
packages/side-nav/dist/esm/index.js 7.46 kB
packages/side-nav/dist/index.js 7.7 kB
packages/skeleton-loader/dist/esm/index.js 3.19 kB
packages/skeleton-loader/dist/index.js 3.39 kB
packages/split-button/dist/esm/index.js 3.46 kB
packages/split-button/dist/index.js 3.63 kB
packages/stepper/dist/esm/index.js 3.47 kB
packages/stepper/dist/index.js 3.67 kB
packages/table/dist/esm/index.js 8.3 kB
packages/table/dist/index.js 8.55 kB
packages/tabs/dist/esm/index.js 5.42 kB
packages/tabs/dist/index.js 5.56 kB
packages/testing-lib/dist/esm/index.js 4.52 kB
packages/testing-lib/dist/index.js 4.74 kB
packages/testing-lib/dist/renderHookServer.js 391 B
packages/testing-lib/dist/renderHookServerV17.js 239 B
packages/text-area/dist/esm/index.js 2.38 kB
packages/text-area/dist/index.js 2.54 kB
packages/text-input/dist/esm/index.js 2.7 kB
packages/text-input/dist/index.js 2.86 kB
packages/toast/dist/esm/index.js 8.22 kB
packages/toast/dist/index.js 8.49 kB
packages/toggle/dist/esm/index.js 3.05 kB
packages/toggle/dist/index.js 3.23 kB
packages/tokens/dist/esm/index.js 2.5 kB
packages/tokens/dist/index.js 2.62 kB
packages/toolbar/dist/esm/index.js 3.29 kB
packages/toolbar/dist/index.js 3.45 kB
packages/tooltip/dist/esm/index.js 4.3 kB
packages/tooltip/dist/index.js 4.58 kB
packages/typography/dist/esm/index.js 5.64 kB
packages/typography/dist/index.js 5.8 kB
tools/build/dist/esm/index.js 5.95 kB
tools/build/dist/index.js 6.18 kB
tools/cli/dist/esm/index.js 2.19 kB
tools/cli/dist/index.js 2.35 kB
tools/codemods/dist/_virtual/_rollupPluginBabelHelpers.js 940 B
tools/codemods/dist/codemods/popover-v12/transform.js 1.11 kB
tools/codemods/dist/constants.js 148 B
tools/codemods/dist/esm/_virtual/_rollupPluginBabelHelpers.mjs 935 B
tools/codemods/dist/esm/codemods/popover-v12/transform.mjs 1.09 kB
tools/codemods/dist/esm/constants.mjs 148 B
tools/codemods/dist/esm/index.js 4.58 kB
tools/codemods/dist/esm/types.mjs 765 B
tools/codemods/dist/esm/utils/imports/getImportSpecifiersForDeclaration.mjs 280 B
tools/codemods/dist/esm/utils/jsx/getJSXAttributes.mjs 161 B
tools/codemods/dist/esm/utils/jsx/insertJSXComment/insertJSXComment.mjs 373 B
tools/codemods/dist/esm/utils/transformations/addJSXAttributes/addJSXAttributes.mjs 414 B
tools/codemods/dist/esm/utils/transformations/consolidateJSXAttributes/consolidateJSXAttributes.mjs 666 B
tools/codemods/dist/esm/utils/transformations/removeJSXAttributes/removeJSXAttributes.mjs 362 B
tools/codemods/dist/esm/utils/transformations/replaceJSXAttributes/replaceJSXAttributes.mjs 280 B
tools/codemods/dist/index.js 4.8 kB
tools/codemods/dist/types.js 765 B
tools/codemods/dist/utils/imports/getImportSpecifiersForDeclaration.js 283 B
tools/codemods/dist/utils/jsx/getJSXAttributes.js 165 B
tools/codemods/dist/utils/jsx/insertJSXComment/insertJSXComment.js 373 B
tools/codemods/dist/utils/transformations/addJSXAttributes/addJSXAttributes.js 412 B
tools/codemods/dist/utils/transformations/consolidateJSXAttributes/consolidateJSXAttributes.js 664 B
tools/codemods/dist/utils/transformations/removeJSXAttributes/removeJSXAttributes.js 366 B
tools/codemods/dist/utils/transformations/replaceJSXAttributes/replaceJSXAttributes.js 283 B
tools/create/dist/esm/index.js 3.6 kB
tools/create/dist/index.js 3.76 kB
tools/install/dist/esm/index.js 2.14 kB
tools/install/dist/index.js 2.29 kB
tools/link/dist/esm/index.js 5.04 kB
tools/link/dist/index.js 5.15 kB
tools/lint/dist/esm/index.js 5.33 kB
tools/lint/dist/index.js 5.47 kB
tools/meta/dist/esm/index.js 1.68 kB
tools/meta/dist/index.js 1.84 kB
tools/slackbot/dist/esm/index.js 6.1 kB
tools/slackbot/dist/index.js 6.27 kB
tools/storybook-addon/dist/esm/index.js 2.24 kB
tools/storybook-addon/dist/esm/main.js 2.2 kB
tools/storybook-addon/dist/esm/manager.js 554 B
tools/storybook-addon/dist/esm/preview.js 1.6 kB
tools/storybook-addon/dist/index.js 2.36 kB
tools/storybook-addon/dist/main.js 2.31 kB
tools/storybook-addon/dist/manager.js 686 B
tools/storybook-addon/dist/preview.js 1.69 kB
tools/storybook-decorators/dist/esm/index.js 3.29 kB
tools/storybook-decorators/dist/index.js 3.56 kB
tools/storybook-utils/dist/esm/index.js 4.01 kB
tools/storybook-utils/dist/index.js 4.13 kB
tools/test-harnesses/dist/esm/index.js 1.79 kB
tools/test-harnesses/dist/index.js 1.92 kB
tools/test/dist/esm/index.js 1.69 kB
tools/test/dist/index.js 1.82 kB
tools/update/dist/esm/index.js 730 B
tools/update/dist/index.js 896 B
tools/validate/dist/esm/index.js 6.96 kB
tools/validate/dist/index.js 7.19 kB

compressed-size-action

@shaneeza shaneeza requested a review from a team as a code owner April 16, 2025 19:56
@shaneeza shaneeza requested review from stephl3 and removed request for a team April 16, 2025 19:56
@shaneeza shaneeza requested a review from sandynguyenn April 16, 2025 20:48
Copy link
Collaborator

@sandynguyenn sandynguyenn left a comment

Choose a reason for hiding this comment

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

lgtm

* update webpack

* findStories args

* changeset

* Update index.ts

* revert to getLGConfig
Copy link
Collaborator

@stephl3 stephl3 left a comment

Choose a reason for hiding this comment

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

completed a first pass of ToolbarIconButton and continuing to review

Comment on lines +10 to +13
/**
* The LG Icon that will render in the button
*/
glyph: GlyphName;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like this approach better but wonder if we should also build this directly into IconButton. This seems like a better experience for consumers and not sure why we'd need to diverge with 2 different methods

<IconButton>
  <IconName />
</IconButton>

<ToolbarIconButton glyph="IconName" />

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This might be because you can create a custom glyph component , which you can then pass as a child to IconButton. With ToolbarIconButton, you can only use our glyphs.

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh I see, I wasn't aware we allow that for IconButton

Comment on lines +15 to +18
/**
* The text that will render in the tooltip on hover
*/
label: React.ReactNode;
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to be opinionated about requiring a label? could consumers instead rely on an aria-label without rendering a tooltip?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I confirmed with Sandy that Tooltips are required.

Comment on lines 21 to 24
/**
* LGIDs for Toolbar components.
*/
lgids: GetLgIdsReturnType;
Copy link
Collaborator

Choose a reason for hiding this comment

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

lgIds*?

&:hover,
&[data-hover='true'],
&::before {
border-radius: 6px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
border-radius: 6px;
border-radius: ${borderRadius[150]}px;

Comment on lines +18 to +20
background: ${theme === Theme.Light
? palette.green.light3
: palette.green.dark3};
Copy link
Collaborator

Choose a reason for hiding this comment

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

tokens?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't have component-specific tokens as yet. Were you thinking that we should already have tokens for these?

The closest token background tokens we have are for a success state, but I wouldn't consider this a success state.
https://github.com/mongodb/leafygreen-ui/blob/main/packages/tokens/src/color/darkModeColors.ts#L39
https://github.com/mongodb/leafygreen-ui/blob/main/packages/tokens/src/color/lightModeColors.ts#L39

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah these were the ones I was thinking of, but you're right that these aren't quite right for success state. I guess I'm wondering if we should carve out a separate semantic token for this and the color. looks similar to what's used for active menu items

Copy link
Collaborator Author

@shaneeza shaneeza Apr 23, 2025

Choose a reason for hiding this comment

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

If the tokens involve updating other components, I'd rather we do that work in a separate PR.

Comment on lines 62 to 85
trigger={
<div className={triggerStyles}>
<IconButton
aria-label={getNodeTextContent(label)}
active={active}
className={getIconButtonStyles({
theme,
active,
disabled,
className,
})}
tabIndex={isFocusable ? 0 : -1}
onClick={handleOnClick}
disabled={disabled}
data-testid={lgids?.iconButton}
data-lgid={lgids?.iconButton}
data-active={active}
ref={ref}
{...(rest as ComponentPropsWithoutRef<'button'>)}
>
<Icon glyph={glyph} />
</IconButton>
</div>
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

From the figma, it looks like the left/right borders are included in the 48x48 and that is implemented correctly. However, it looks like the 48x48 should also include the top border which doesn't seem to be included currently. Can that be double-checked?

figma storybook
Screenshot 2025-04-18 at 10 07 31 AM Screenshot 2025-04-18 at 10 08 58 AM

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Confirmed with Sandy that the engineering implementation is fine.

trigger={
<div className={triggerStyles}>
<IconButton
aria-label={getNodeTextContent(label)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

if we always render a tooltip, should we instead define an aria-labelledby?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

whats the advantage of this?

Copy link
Collaborator

@stephl3 stephl3 Apr 21, 2025

Choose a reason for hiding this comment

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

From reading up on the MDN docs on aria-label and aria-labelledby, I was thinking that aria-labelledby made more sense thinking that the label could be referenced, but I forget that it's not actually visible in the DOM until triggered

However, a separate thing I'm wondering now is: does this label provide proper context about what this IconButton does? I seem to recall that design wanted the label text to be short, but was that only for the design where the text was rendered vertically below the icon? What do you think providing some contextual details about the label? Probably something like Go to ${label} or Open drawer for ${label}

If consumers don't like the interpolated string, we can treat it as a default value and allow them to specify their own aria-label

aria-label={ariaLabelProp || `Go to ${getNodeTextContent(label)}`}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@sandynguyenn what do you think about this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Spoke with Sandy, and shes ok with providing a default and letting people customize it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a little tricky. Toolbar should not be linked to Drawer, since it can be used anywhere, and we won't always know what the action will be. It can open a Drawer, open a Modal, or some other action. This is why we don't control the active state. Therefore, I think that we should not add more content, and if the consumer wants context, they can provide it themselves.

The G Suite toolbar also features extremely short labels.
Screenshot 2025-04-23 at 3 06 01 PM

Copy link
Collaborator

Choose a reason for hiding this comment

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

Gotcha, this might be a case where we want good guidelines around providing enough context for screen readers. G Suite has short one-word labels for specific Google products while also using more detailed labels for non-product cases like Report Phish and Get Add-ons

I think it would be helpful to consumers if our examples took a similar approach, and we do what we can to ensure consumers set these up properly given there is no visible label

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sg, i'll update the examples

Comment on lines 59 to 60
data-testid={lgids?.tooltip}
data-lgid={lgids?.tooltip}
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should be unique if we want to enable targeting specific ToolbarIconButton instances. We can do so by destructuring id from the useDescendant call and interpolating it here

Comment on lines 76 to 77
data-testid={lgids?.iconButton}
data-lgid={lgids?.iconButton}
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should be unique if we want to enable targeting specific ToolbarIconButton instances. We can do so by destructuring id from the useDescendant call and interpolating it here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The consumer can get a specific instance if they use the test harness, but I also can't think of any negative side effects of making the ids unique as well. We usually keep them the same for dropdown options, but this component serves a different purpose. I can update these.

Comment on lines 51 to 55
const handleOnClick = (event: React.MouseEvent<HTMLButtonElement>) => {
onClick?.(event);
// This ensures that on click, the buttons tabIndex is set to 0 so that when the up/down arrows are pressed, the correct button is focused
setFocusedIndex?.(index);
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

can this be defined once in Toolbar instead as opposed to in each separate ToolbarIconButton instance?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you mean create the function in Toolbar and pass it to the context?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes, so it's not recreated for each ToolBarIconButton instance

cx(
css`
height: 100%;
width: ${spacing[1200]}px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

similar note to icon button height: I think it's better to avoid using spacing tokens for height/width and instead define a separate constant for magic numbers like this. e.g. const TOOLBAR_WIDTH = 48;

Comment on lines +22 to +25
// Show the focus ring on the toolbar itself when a child element is focused and only when navigating with a keyboard
&:has(:focus-visible) {
box-shadow: ${focusRing[theme].default};
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

was this a specific design request? it looks strange to me to have the focus ring apply to the full toolbar

Copy link
Collaborator Author

Choose a reason for hiding this comment

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


const Template: StoryFn<typeof Toolbar> = props => <Toolbar {...props} />;

export const LiveExample = Template.bind({});
Copy link
Collaborator

Choose a reason for hiding this comment

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

wondering if it makes sense to enable controlling the active ToolbarIconButton instance in the live example? it's difficult to test all the interactions without that

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What interaction would you test if there were an active control? Or do you want the ability to click on an icon and set that icon to active?

Copy link
Collaborator

@stephl3 stephl3 Apr 22, 2025

Choose a reason for hiding this comment

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

yes being able to change the active instance seems useful for the live example story

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since this isn't a controlled component, I'm hesitant to add the ability to change the active state, as it might give the consumer the impression that this component is controlled. SideNav is a similar component that has an active state, but we don't have an option to control it in the story.

I also found an example from the telerik design system, and they don't update the active state in the live example.

However, we could add an example updating the active state in a codesandbox.

import { getTestUtils, Toolbar, ToolbarIconButton, ToolbarProps } from '.';

export default {
title: 'Components/Toolbar/Ineractions',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
title: 'Components/Toolbar/Ineractions',
title: 'Components/Toolbar/Interactions',

);
const [focusedIndex, setFocusedIndex] = useState(0);
const childrenLength = descendants?.length ?? 0;
const [isUsingKeyboard, setIsUsingKeyboard] = useState(false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we use the existing UsingKeyboardContext in place of this state?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried that, but the initial value for UsingKeyboardContext is true, which means it was causing this component to hijack the focus.

const ids = {
root,
iconButton: `${DEFAULT_LGID_ROOT}-icon_button`,
tooltip: `${DEFAULT_LGID_ROOT}-tooltip`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

wondering if this might be more explicit as iconButtonTooltip. something like:

Suggested change
tooltip: `${DEFAULT_LGID_ROOT}-tooltip`,
iconButtonTooltip: `${DEFAULT_LGID_ROOT}-icon_button-tooltip`,

Comment on lines 6 to 12
export {
DEFAULT_LGID_ROOT,
getLgIds,
type GetLgIdsReturnType,
getTestUtils,
type TestUtilsReturnType,
} from './utils';
Copy link
Collaborator

Choose a reason for hiding this comment

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

pending the status of the new */testing package subdirectory approach, can we start using that here or add a ticket to refactor this before shipping v1?

### Usage

```tsx
import { getTestUtils } from '@leafygreen-ui/gallery-indicator';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
import { getTestUtils } from '@leafygreen-ui/gallery-indicator';
import { getTestUtils } from '@leafygreen-ui/toolbar';

I also wonder if we can start using the new */testing package subdir approach or mark a todo with ticket to refactor these when that approach is vetted and ready to use

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can create a ticket for it. We should wait until it's ready to use.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually, creating the testing directory should be doable

Comment on lines 52 to 60
#### Props

| Prop | Type | Description | Default |
| ---------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `active` | `boolean` | Determines if the icon button is in an active state | `false` |
| `glyph` | `Glyph` | Name of the icon glyph to display in the button. List of available glyphs can be found in the [Icon README](https://github.com/mongodb/leafygreen-ui/blob/main/packages/icon/README.md#properties). | |
| `label` | `string` | Text that appears in the tooltip on hover/focus | |
| `onClick` | `(event: React.MouseEvent) => void` | Callback fired when the button is clicked | |
| `disabled` | `boolean` | Determines if the icon is disabled | `false` |
Copy link
Collaborator

Choose a reason for hiding this comment

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

what do you think about listing the explicit props that are added in ToolbarIconButton and linking to the IconButton read me for other props? Also can add a note about which props are omitted from that set

I worry about docs getting out of sync if IconButton props change because it requires that the future eng who works on IconButton changes also know that they need to make updates here. I'm flexible on the final approach

TheSonOfThomp and others added 12 commits April 21, 2025 20:53
* updates lg install script

* updates meta

* adds --dry option to install command

* changesets

* adds package set flags

* cli minor

* fix install pkg prebuild

* adds tests

* updates lint scrips

* lint all_packages file on write

* run lint

* Update getLGConfig.ts

* Update getPackagesToInstall.ts

* Update getPackagesToInstall.spec.ts

* fix mocks

* update flags to be additive

* push not concat

* Update getLGConfig.spec.ts

* Update package.json

* adds separate files for ESSENTIALS & BASIC

* --ui

* readonly<>

* fix tests

* Update pnpm-lock.yaml

* add missing lodash
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@shaneeza shaneeza requested a review from stephl3 April 23, 2025 19:48
@@ -0,0 +1,7 @@
export { getTestUtils, type TestUtilsReturnType } from './testing';
Copy link
Collaborator

Choose a reason for hiding this comment

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

awesome, thanks for using the new /testing entry point. we should be able to drop this from this index.ts file now

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think we should drop this as yet, since the entry points work is still being worked on

ToolbarIconButton,
type ToolbarIconButtonProps,
} from './ToolbarIconButton';
export { DEFAULT_LGID_ROOT, getLgIds, type GetLgIdsReturnType } from './utils';
Copy link
Collaborator

Choose a reason for hiding this comment

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

similarly, I don't think we need to include these in the root package exports

### Usage

```tsx
import { getTestUtils } from '@leafygreen-ui/toolbar';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
import { getTestUtils } from '@leafygreen-ui/toolbar';
import { getTestUtils } from '@leafygreen-ui/toolbar/testing';

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The entry points PR has not been published, so I don't think we should update this as yet.

```tsx
import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { Toolbar, ToolbarIconButton, getTestUtils } from '@leafygreen-ui/toolbar';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
import { Toolbar, ToolbarIconButton, getTestUtils } from '@leafygreen-ui/toolbar';
import { Toolbar, ToolbarIconButton } from '@leafygreen-ui/toolbar';
import { getTestUtils } from '@leafygreen-ui/toolbar/testing';

```tsx
import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { Toolbar, ToolbarIconButton, getTestUtils } from '@leafygreen-ui/toolbar';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
import { Toolbar, ToolbarIconButton, getTestUtils } from '@leafygreen-ui/toolbar';
import { Toolbar, ToolbarIconButton } from '@leafygreen-ui/toolbar';
import { getTestUtils } from '@leafygreen-ui/toolbar/testing';

@shaneeza shaneeza requested a review from stephl3 May 2, 2025 21:02
@shaneeza shaneeza changed the base branch from main to LG-5026-drawer-integration May 22, 2025 15:24
@shaneeza shaneeza merged commit e458c7a into LG-5026-drawer-integration May 22, 2025
11 checks passed
@shaneeza shaneeza deleted the LG-5027-toolbar branch May 22, 2025 15:25
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