etchteam / storybook-addon-marker

A Storybook Addon to add a Marker.io feedback button in Storybook
MIT License
2 stars 0 forks source link

Marker app duplicating on each storybook page navigation #1

Closed tremby closed 9 months ago

tremby commented 2 years ago

I'm running @storybook/* 6.5.9, next 12.1.6, storybook-addon-next 1.6.7,@mdx-js/react 2.1.2, and @etchteam/storybook-addon-marker 2.0.2.

For the purpose of this ticket, I'm building a static storybook and serving it with a regular static web server.

I sometimes notice when opening Storybook that Marker does not load. This seems particularly common when I load the Storybook home page, which in my case is an MDX2 page.

When navigating to other pages, Marker does load -- I see its icon pop in at the bottom right. This happens again when navigating again. I'm somewhat sure that sometimes I see one Marker button slide in over top of another.

If I look at the web inspector, I see several .marker-app divs, each containing the marker button.

It looks like a new copy of Marker is getting loaded in on each navigation, without the previous one being cleared up. I imagine this will lead to performance and memory issues with longer sessions.