Skip to content

🐛 fix(dialog): remove hardcoded max-width for dialog variants#503

Merged
Luizgomess merged 1 commit intozard-ui:masterfrom
viniciuscigma:fix/#491-hardcoded-width-dialog
Mar 27, 2026
Merged

🐛 fix(dialog): remove hardcoded max-width for dialog variants#503
Luizgomess merged 1 commit intozard-ui:masterfrom
viniciuscigma:fix/#491-hardcoded-width-dialog

Conversation

@viniciuscigma
Copy link
Copy Markdown
Contributor

@viniciuscigma viniciuscigma commented Mar 24, 2026

What was done? 📝

Removida a classe sm:max-w-[425px] hardcoded do dialogVariants (no arquivo .ts e na documentação). Isso evita o travamento da largura em telas maiores e permite que o tamanho do modal seja sobrescrito e customizado livremente via class externa.

Screenshots or GIFs 📸

|-----Figma-----|
|-----Implementation-----|
| N/A | N/A |

Link to Issue 🔗

Closes #491

Type of change 🏗

  • New feature (non-breaking change that adds functionality)
  • Bug fix (non-breaking change that fixes an issue)
  • Refactor (non-breaking change that improves the code or technical debt)
  • Chore (none of the above, such as upgrading libraries)

Breaking change 🚨

Nenhuma.

Checklist 🧐

  • Tested on Chrome
  • Tested on Safari
  • Tested on Firefox
  • No errors in the console

Summary by CodeRabbit

  • Style
    • Modified dialog width behavior on smaller screens and above for improved layout consistency.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 2026

📝 Walkthrough

Walkthrough

Removed the sm:max-w-[425px] responsive max-width constraint from the dialog component's Tailwind styling in the dialogVariants CVA configuration. This eliminates the fixed width limitation on small screens and above, allowing the dialog layout to respond more flexibly to its container.

Changes

Cohort / File(s) Summary
Dialog Variants Styling
libs/zard/src/lib/shared/components/dialog/dialog.variants.ts
Removed sm:max-w-[425px] responsive max-width constraint from the CVA-based dialogVariants, allowing dialog width to be determined by other factors or overrides.

Possibly related issues

  • [Bug] Dialog width hardcoded #491 — Directly addresses the removal of the hardcoded sm:max-w-[425px] width constraint that was preventing dialogs from responding appropriately to layout requirements.

Poem

🎭 A dialog unbound, no longer confined,
The constraint removed, freedom redefined,
Widths now adapt with grace and ease,
Layout's horizons expand to please! 📦✨

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: removing hardcoded max-width styling from dialog variants, enabling flexible customization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed PR description covers all essential template sections with appropriate detail: objective is clear, issue link provided, change type selected, and testing checklist completed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@mikij mikij left a comment

Choose a reason for hiding this comment

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

LGTM

@Luizgomess Luizgomess merged commit 7ba3f51 into zard-ui:master Mar 27, 2026
6 checks passed
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.

[Bug] Dialog width hardcoded

3 participants