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

Notifications not showing in KDE 5.16 because of hardcoded timeout #2161

Closed
AdrienPoupa opened this issue Jul 16, 2019 · 4 comments
Closed

Comments

@AdrienPoupa
Copy link
Contributor

AdrienPoupa commented Jul 16, 2019

  • Laravel Mix Version: 4.1.2 (npm list --depth=0)
  • Node Version (node -v): v12.6.0
  • NPM Version (npm -v): 6.10.1
  • OS: Kubuntu 19.04 with KDE 5.16

Description:

I can see the notification for 2 ms instead of 2 seconds.

See screencast:

mix

The problem is coming from Mix because if I use WebpackNotifierPlugin directly it works:

var WebpackNotifierPlugin = require('webpack-notifier');

mix.webpackConfig(webpack => {
    return {
        plugins: [
            new WebpackNotifierPlugin({alwaysNotify: true}),
        ]
    };
});

results in

image

After digging further, I understood that for KDE, setting a timeout to 2 is 2ms.

https://github.com/JeffreyWay/laravel-mix/blob/master/src/components/Notifications.js#L18

If I set it to 2000 then I'm getting 2 seconds:

mix.webpackConfig(webpack => {
    return {
        plugins: [
            new WebpackNotifierPlugin({
                title: 'Laravel Mix 2',
                alwaysNotify: Config.notifications.onSuccess,
                hint:
                    process.platform === 'linux'
                        ? 'int:transient:1'
                        : undefined,
                timeout: 2000, // 2000 instead of 2
                contentImage: Mix.paths.root(
                    'node_modules/laravel-mix/icons/laravel.png'
                ),
            }),
        ]
    };
});

Interestingly if I set the title to Laravel Mix and not Laravel Mix 2, then the notification only shows for 2 ms. I guess this is because KDE suppresses duplicate notifications.

This PR is to blame: #1890

Please revert it as it is not working universally, or make it configurable with no value by default.

KDE allows setting a timeout per program so it should not be done there IMO.

Thanks

@AdrienPoupa AdrienPoupa changed the title Notifications not showing on Kubuntu 19.04 with KDE 5.16 because of hardcoded timeout Notifications not showing on KDE 5.16 because of hardcoded timeout Jul 16, 2019
@AdrienPoupa AdrienPoupa changed the title Notifications not showing on KDE 5.16 because of hardcoded timeout Notifications not showing in KDE 5.16 because of hardcoded timeout Jul 16, 2019
@stale
Copy link

stale bot commented Sep 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 14, 2019
@AdrienPoupa
Copy link
Contributor Author

It is not stale, fix is waiting to be merged

@stale stale bot removed the stale label Sep 14, 2019
@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2019
@AdrienPoupa
Copy link
Contributor Author

Still not stale

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 a pull request may close this issue.

1 participant