Giter Site home page Giter Site logo

Comments (9)

ajaypratap003 avatar ajaypratap003 commented on August 23, 2024

@redallen Can you please have a look into this issue.

from frontend-components.

redallen avatar redallen commented on August 23, 2024

Looks like a redux problem somewhere around here: https://github.com/RedHatInsights/frontend-components/blob/master/packages/notifications/src/NotificationPortal/NotificationPortal.js#L10

I don't know redux well nor a workflow to quickly test Notifications changes. This is better suited for @rvsia or @Hyperkid123 .

from frontend-components.

Hyperkid123 avatar Hyperkid123 commented on August 23, 2024

I will check it out tomorrow.

from frontend-components.

rvsia avatar rvsia commented on August 23, 2024

@Hyperkid123 Have you checked it yet? If not, I can take a look tomorrow.

from frontend-components.

Hyperkid123 avatar Hyperkid123 commented on August 23, 2024

@Hyperkid123 Have you checked it yet? If not, I can take a look tomorrow.

No sorry, I haven't had the time 🙁 If you have time to spare please take it over.

from frontend-components.

rvsia avatar rvsia commented on August 23, 2024

@ajaypratap003

dismissable in this context mean that users have to close it manually. Set dismissable to false and it will close automatically.

If you want to have an alert that is automatically closed and users can close it manually at that same time, use config like this:

        dismissable: true,
        title: 'title',
        variant: 'danger',
        autoDismiss: true,

Please see this documentation.

If you have more issues, please feel free to reopen.

from frontend-components.

ajaypratap003 avatar ajaypratap003 commented on August 23, 2024

@ajaypratap003

dismissable in this context mean that users have to close it manually. Set dismissable to false and it will close automatically.

If you want to have an alert that is automatically closed and users can close it manually at that same time, use config like this:

        dismissable: true,
        title: 'title',
        variant: 'danger',
        autoDismiss: true,

Please see this documentation.

If you have more issues, please feel free to reopen.

@rvsia Thanks for the clarification.
We want to have an alert that is automatically closed and users can close it manually at the same time. We are already using the same config as you mentioned but It's not working.
Automatically closed works if we pass dismissable as false.

 dispatch(
      addNotification({
        title,
        variant,
        description,
        dataTestId,
        autoDismiss:  true,
        dismissable:  true,
        dismissDelay:  8000,
        requestId,
        sentryId,
      })
    );

Please let me know if something I'm doing wrong.

from frontend-components.

rvsia avatar rvsia commented on August 23, 2024

@ajaypratap003 I tested it now in Sources-UI and it works well for me.

See here:

(8s dismiss + close button)

Kapture 2021-08-05 at 11 31 37

code:

    dispatch(
      addMessage({
        title: 'title',
        variant: 'danger',
        description: 'description',
        dataTestId: 'test-id',
        autoDismiss: true,
        dismissable: true,
        dismissDelay: 8000,
        requestId: '1232232',
        sentryId: '22323',
      })
    );

version:

    "@redhat-cloud-services/frontend-components-notifications": "3.2.2",

from frontend-components.

ajaypratap003 avatar ajaypratap003 commented on August 23, 2024

@ajaypratap003 I tested it now in Sources-UI and it works well for me.

See here:

(8s dismiss + close button)

Kapture 2021-08-05 at 11 31 37

code:

    dispatch(
      addMessage({
        title: 'title',
        variant: 'danger',
        description: 'description',
        dataTestId: 'test-id',
        autoDismiss: true,
        dismissable: true,
        dismissDelay: 8000,
        requestId: '1232232',
        sentryId: '22323',
      })
    );

version:

    "@redhat-cloud-services/frontend-components-notifications": "3.2.2",

@rvsia Thank you so much for providing details. I think we have older version that's why it's not working oin our code. I'll update latest version.

from frontend-components.

Related Issues (20)

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.