Conversation
… if no 'other' button is provided
Contributor
|
Visit the preview URL for this PR (updated for commit 6f6c79f): https://zeta-web-main--pr-167-ux-1561-m7melfbu.web.app (expires Fri, 06 Feb 2026 11:18:32 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: cc82fb52ba05c9ecc7f0b92ab81ac4a31b88d893 |
Contributor
PR Checks Complete✅ Analysis✅ Formatting✅ Testing➡️ See Details
|
thelukewalton
approved these changes
Jan 30, 2026
thelukewalton
approved these changes
Jan 30, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds functionality to make the dialog's leading icon optional and ensures buttons stay aligned to the right when no "other" button is provided.
Changes:
- Added
showLeadingIconandleadingIconproperties to control header icon display - Added CSS rules to right-align buttons when only two buttons are present (no "other" button)
- Updated stories to expose the new properties in Storybook
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/stories/components/dialog.stories.ts | Added new properties (showLeadingIcon, leadingIcon) to story configuration and templates for testing the optional icon feature |
| src/components/dialog/dialog.ts | Implemented new properties with documentation, added conditional icon rendering based on showLeadingIcon, and fallback logic for icon selection |
| src/components/dialog/dialog.styles.js | Added CSS rules to control footer button alignment based on button count |
Comments suppressed due to low confidence (2)
src/components/dialog/dialog.ts:41
- The
leadingIconproperty documentation should clarify the fallback behavior. WhenshowLeadingIconis true andleadingIconis not provided, the component falls back to displaying an icon based on theflavorproperty. Consider updating the documentation to: "Icon to display in the header. If not provided, a flavor-based icon will be displayed when showLeadingIcon is true."
* @cssproperty --dialog-title-font-size - Font size of the dialog title. Defaults to 1.25rem.
src/components/dialog/dialog.ts:118
- The JSDoc comment for
leadingIconproperty should clarify the fallback behavior. When this property is not provided andshowLeadingIconis true, the component will display an icon based on theflavorproperty. Consider updating the comment to: "Icon to display in the header. If not provided, displays a flavor-based icon when showLeadingIcon is true."
* - `success`: Shows green verified icon.
* - `warning`: Shows yellow warning icon.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aygurs
pushed a commit
that referenced
this pull request
Jan 30, 2026
🤖 I have created a release *beep* *boop* --- ## [1.1.0](zeta-web-v1.0.1...zeta-web-v1.1.0) (2026-01-30) ### ✨ New Features * **UX-1553:** Chart Card Component ([#159](#159)) ([623ad7f](623ad7f)) * **UX-1556:** Shimmer component for Zeta Web ([#163](#163)) ([999be10](999be10)) * **UX-1561:** Make leading icon optional, make buttons stay to right ([#167](#167)) ([319135b](319135b)) ### 📈 Documentation * Add image to readme ([6d562b4](6d562b4)) ### ⛓️ Dependencies * Update deps ([c510447](c510447)) ### 🧹 Miscellaneous Chores * **deps-dev:** bump storybook from 8.6.14 to 8.6.15 ([#160](#160)) ([c8342fb](c8342fb)) * **deps:** bump qs from 6.14.0 to 6.14.1 ([#161](#161)) ([b7ea2e8](b7ea2e8)) * **deps:** bump tar from 7.5.2 to 7.5.4 ([#164](#164)) ([a45c558](a45c558)) * **deps:** bump tar from 7.5.4 to 7.5.7 ([#166](#166)) ([69cd255](69cd255)) ### 💄 Styles * **HMX-5599:** Update In Page Banner ([#165](#165)) ([5a4b003](5a4b003)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Leading icon is now optional. If no 'other' button is provided, make other two buttons stay on the right.