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

fix: Add min-width option on alerts with default value #863

Merged
merged 3 commits into from Jun 11, 2019

Conversation

JKMarkowski
Copy link
Contributor

Please provide a link to the associated issue.

#654

Please provide a brief summary of this pull request.

I included minimum width option to alert component which handles responsive problems. By default right now min-width is set to 300px, which means that it will look good on every device.

If this is a new feature, have you updated the documentation?

I put this option usage into one example

@netlify
Copy link

netlify bot commented Jun 5, 2019

Deploy preview for fundamental-ngx ready!

Built with commit a9da69f

https://deploy-preview-863--fundamental-ngx.netlify.com

@@ -14,6 +14,7 @@ export class AlertComponentAsContentExampleComponent {
openFromComponent() {
this.alertService.open(AlertContentComponent, {
type: 'warning',
minWidth: '400px',
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just put this one down to 300, even if it's the default. 400px will break on some phone screens which defeats the purpose of this feature. The rest seems pretty good to me though. Eventually we'll want to address #865 but that can wait for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @MattL75 I changed 400px to 300px in example.

@@ -51,6 +51,11 @@ export class AlertService {
alertConfig.width = '33vw';
}

// Ensure default minimum width
if (alertConfig && !alertConfig.minWidth) {
Copy link
Contributor

Choose a reason for hiding this comment

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

When your pr #868 is merged you will be able to remove this check 👍

@JKMarkowski JKMarkowski force-pushed the bug/#645-alert-responsive-improve branch from f61784a to a9da69f Compare June 11, 2019 11:30
@MattL75 MattL75 merged commit 536ba06 into SAP:master Jun 11, 2019
@droshev droshev added this to the sprint 13 - Hot Pie milestone Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
board
  
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

3 participants