serge-web / serge

Serious Gaming, Evolved - web interface
https://sites.google.com/deepbluec.com/serge/
Apache License 2.0
14 stars 4 forks source link

Fix to notifications plugin #1940

Closed IanMayo closed 1 year ago

IanMayo commented 2 years ago

I wish to show user guidance when players are adding shapes using the "GeoMan" control.

I've found the Leaflet.Notifications plugin.

I've added it to components\package.json, and run yarn install in this PR. But it fails at runtime, saying L.control.notifications() does not exist. This makes it look like the notifications control isn't getting initialised.

So, I had to comment out the code that tried to create the notification object.

This task is to uncomment the code, and get the notifications control working. There is a console.log call a right below the commented code. This is the text that will be used in the notification.info call.

Update

I managed to fix the plugin in #1941 by updating a css dependency, and tricking the compiler. It feels a bit of a kludge, but it works.

I haven't been able to correctly integrate the CSS for the leaflet.notifications - see Area Strike in the screenshot below. We need to do that for both storybook and client please. Note: may be difficult to test under client, since it may not have all the data it needs in order to show the new-orders button. You can "drive the issue" by:

image

IanMayo commented 1 year ago

Now that we've got the tailored text in the popups, I think we no longer need the notifications panel support.