GithubHelp home page GithubHelp logo

predixdesignsystem / px-alert-message Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 13.0 4.08 MB

To view a demo of this component, go to :

Home Page: http://www.predix-ui.com/#/modules/px-alert-message

License: Apache License 2.0

JavaScript 29.47% CSS 7.79% HTML 62.74%
predix-ui

px-alert-message's People

Contributors

arongraham-ge avatar benjaminliugang avatar benoitjchevalier avatar davidrleonard avatar evanjd avatar haoruiqian avatar iamcap avatar katemenkhaus avatar liuziyuan avatar mdwragg avatar randyaskin avatar runn-vermel avatar stevewinkler avatar talimarcus avatar yashdoshi89 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

px-alert-message's Issues

Regression in localization behavior change causes component to fail

Looks like 076be13 may have introduced a regression in the localization behavior that causes the component to fail to load in some browsers. (Failing tests here.)

@benoitjchevalier or @randyaskin - could either of you take a look when you have a chance? Think you two have been deep into the localization switch, right? Thanks.

Expected behavior and actual behavior:

Component should load correctly in Safari. Right now it fails to load because of a thrown TypeError coming from the _computeLocalize method.

Steps to reproduce the problem:

Open the px-alert-message demo page in Safari 9 or Safari 10. The page will fail to load correctly and an error will be logged to the console:

image

Environment:

  • Mac OS X 10.11.6
  • Safari 9.1.2
  • px-alert-message v0.9.6

notify clients when alert-message is dismissed

I'd like to use the px-alert-message in a dynamic way where the app will do something that should result in displaying the alert message. I guess that use case should be pretty common.

Generating and adding px-alert-message dynamically to the DOM is not a problem.
I was wondering however how to get rid of the elements from the tree once the user dismisses the component.

Is there any particular reason why those elements are left in the DOM tree after being dismissed/closed/hidden? Are there any use cases where they would be shown again after being dismissed?

What would allow to remove the element from the tree by the clients is some kind of event fired when the message is dismissed. I assume that the clients should be able to get a handle of the element containing the message that was dismissed - that should be catered for if a standard event mechanism is used. Could you please add such an event (maybe named 'alert-dismissed' or something along the lines) ?

Type="Custom" is replacing icon with additional px-alert-message

This is inside an Angular App. Not able to use type="custom" and input unique icons/images.

Expected behavior and actual behavior:

Expected: ability to provide custom icons on left-hand side of message
Actual: Repeated px-alert-message on top trying to fit in the icon div

Steps to reproduce the problem:

Copied custom type demo html from GitHub

Environment (component version number, Browser (including version), operating system, hardware, etc):

component version: "px-alert-message": "^0.5.4",
Browser: Chrome Version 52.0.2743.116 (64-bit)
Mac Os

Screenshots (optional, but very helpful):

screen shot 2016-08-18 at 12 45 13 pm

Code examples help us better understand the issue - follow the CodePen or jsfiddle, templates, which both use polygit, to help explain the issue.



Add support of message disappearing callback

Hi!

For integration with other frameworks (for instance, AngularJS) I think it would be really helpful to provide callback for message disappearing. It allow to track state and remove elements from DOM when needed.

Navigate to different route on Open button click

Hi,

Is there a way I can pass a relative route of the application to the 'action' property ? Also instead of having the button text as 'Open', I would like to have the text 'View'. The url passed is a relative path of the application and when clicked, it should open in the same window.

Thanks,
Anirban

Specifying 2 different actions in the message

Hi,
We have requirement to show 2 different actions in the toast message e.g ok & cancel. Where one action will continue the state and the other will stop the state of the action. Could not find a way to support it with current implementation.

Also, would like to provide the text to the buttons as input to override the default texts.

Thanks,
Priyabrat

Action button blank

Using the dismiss or any other action will sometimes give a blank box as the action button. So if there is no auto dismiss the alert message never goes away. This happens intermittently. Sometimes to works, sometimes it doesn't. I have the most up to date version of px-alert-message.
<px-alert-message type="custom" message-title="title" message="message" action="dismiss">

Callback on button click

Is there any way to have a callback function associated on the button click within the alert message ?

Fullscreen demo broken on predix-ui.com

Expected behavior and actual behavior:

https://www.predix-ui.com/#/elements/px-alert-message has a link to https://www.predix-ui.com/bower_components/px-alert-message/demo/demo.html which should show "Full-screen demo with several px-alert-messages in a queue." as per link title.

In reality, the linked page appears incomplete and upon inspecting the console, is ridden with errors.

Steps to reproduce the problem:

open this link: https://www.predix-ui.com/bower_components/px-alert-message/demo/demo.html

Environment (component version number, Browser (including version), operating system, hardware, etc):

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36

Screenshots (optional, but very helpful):

screen shot 2019-03-07 at 5 54 10 pm

Vulcanizing break action button.

Hi,

Vulcanizing break action button (no action after click, no icon on button). Does anyone noticed this or it's issue related only to my app (i.e. conflicts with other components, styles) or to vulcanizing itself?

Thanks

Setting "expanded" property has no effect

Expected behavior and actual behavior:

If the message is long, I may want to default the px-alert-message to "expanded" mode. This doesn't work as I expected. I don't want my user to have to click "Show more".

Steps to reproduce the problem:

Set expanded property in HTML or JS. Set message to a long string.

Environment (component version number, Browser (including version), operating system, hardware, etc):

Chrome 63 on Mac

Code example

https://codepen.io/anon/pen/jYWjaN?&editors=1001

visible property not working as expected

Hi There,

visible: boolean = false property is not working as expected.

visible=true or visible=false both are showing the alert box. only removing visible property to hide the alert box on load.

Is there anyway to make visible =false so that we can update true/false dynamically when needed ?

The alert message fires px-alert-message-hidden when auto-dismiss is set to some number(only on first show)

Submit an Issue

Hi,

Thanks for helping us improve the Predix UI platform by submitting an issue.

Before you begin, please check the list of existing issues to avoid submitting a duplicate issue.

To help us solve this issue as fast as possible, please fill out the following sections:

Expected behavior and actual behavior:

Steps to reproduce the problem:

Environment (component version number, Browser (including version), operating system, hardware, etc):

Screenshots (optional, but very helpful):

Code examples help us better understand the issue - follow the appropriate codepen for the component by going to https://predix-ui.com, finding the component in question, and clicking on the pencil icon under the demo.

    Once you've created your code example, you can save it under a new url.
    Please note that you should NOT use the same methods for production as the ones used in codepen - these methods are not production ready.

Message is truncated in chrome and firefox

Message is truncated in firefox if the message-title and message are long. Chrome is fine.

e.g.

        <px-alert-message
            type="error"
            message-title="A configuration package must be deployed to the device before you can deploy software packages."
            message="Schedule configuration package deployments earlier than software package deployments.">
        </px-alert-message>

screen shot 2016-01-28 at 12 33 13 pm

Line break at sentences' end in a single toast of px-alert-message

Hi,
in px-alert-message is there a way to insert line break at the end of the sentence, when 2 sentences with a line break are passed a string to messageTitle property?
Currently it doesn't seem to read the new line in the string.
If i pass:
'ABcsdf
sdfk'
in message Title, it shows 'ABcsdf sdfk' itself is shown.
Is there a support in px-alert-message to break the string at full stop or read the newline break in message inserted in messageTitle property?
If not, is there going to be any provision in the future?
Need urgent help on this issue. Thanks in advance.

No 'OK' text when I have the acknowledge action specified

Submit an Issue

Hi,

Thanks for helping us improve the Predix UI platform by submitting an issue.

Before you begin, please check the list of existing issues to avoid submitting a duplicate issue.

To help us solve this issue as fast as possible, please fill out the following sections:

Expected behavior and actual behavior:

screen shot 2017-03-21 at 2 16 47 pm

Steps to reproduce the problem:

Step 1: component fixture is as follows:

<div class="alert-message-div"> <template is="dom-if" if="{{noDropdownSelectionMsg}}"> <px-alert-message id="error-noDropDown-Select" type="important" message-title="[[errors.noDropdownTitle]]" message="[[errors.noDropdownMessage]]" action="acknowledge" language="en"> </px-alert-message> </template> </div>

but I get this

screen shot 2017-03-21 at 2 17 06 pm

I wanted to find out if this can be addressed so I can get the 'OK' text back.

Thanks

px-alert-message will hang in Windows Firefox

The following loop is running forever in Win Firefox and cause firefox to show the stop long running script popup.

// the following code is always true in Window Firefox
while(messageDiv.scrollHeight > messageDiv.offsetHeight) {
....
}

I think adding a threshold will stop the compare
while((messageDiv.scrollHeight - messageDiv.offsetHeight) >=** this._threshold**) {
.....
}

Message truncation is not dynamic

The expected behavior is that the button 'show more' would only show on alert messages that have text longer than 3 lines.

  1. Open new-demo branch and run the demo.
  2. select 'long message' tab
  3. select other tab and the 'show more' button does not disappear

Branch new-demo

Expected:
screen shot 2017-02-08 at 10 21 10 am

Bug:
screen shot 2017-02-08 at 10 21 01 am

possible problem:
We suspect that there are life-cycle issues with when _checkMessageLength function is being called/implemented. https://github.com/PredixDev/px-alert-message/blob/master/px-alert-message.html#L352

Trigger alert message by event

For firing an alert message triggered by an event, the component itself does not take a property that replicates behavior like ng-show. Do we have an demo for such kind of implementation for this component ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.