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

The Settings menu option continues to disappear #152

Open
sekerob opened this issue Jan 26, 2025 · 12 comments
Open

The Settings menu option continues to disappear #152

sekerob opened this issue Jan 26, 2025 · 12 comments

Comments

@sekerob
Copy link

sekerob commented Jan 26, 2025

Better-OSM-org show loaded in the Tampericon menu but the setting menu where regularly toggling the 'show geometry' option at times disappears. Screenshot below.

Image

@deevroman
Copy link
Owner

Judging by ❌ Enabled, you turned off Tampermonkey, not the script. To disable only this script, you need to click on the toggle. (If I understood your problem correctly)

@sekerob
Copy link
Author

sekerob commented Jan 26, 2025

Yes, to test if it would come back if enabled again. Then discovered that if disabled, the script of Better-osm-org sometimes gets disabled too on the TM Dashboard, the little switch turned grey and moved left. Only when re enabling and hitting Ctrl+F5 on a OSM website tab does BOO show up again,
Image

Image

It's a bit puzzling to me, sometime there being a red 1 over the TamperMonkey icon on the toolbar,, sometimes not like here

Image

Then when hitting Ctrl+F5 on an OSM page the red 1 reappears and the BOO entry shows up again.

Image

All the more reason for me to talk up a toggle switch on the OSM Change Set header to have the Show the view with and without the geometry highlights.

@deevroman
Copy link
Owner

deevroman commented Jan 26, 2025

Do you see errors in the console (F12) at such times?

All the more reason for me to talk up a toggle switch on the OSM Change Set header

I remember that. Extracted it as a separate issue #153

@sekerob
Copy link
Author

sekerob commented Jan 26, 2025

Only use F12 by accident when looking for F11. I'm clueless what to see in the console but see a few lines standing out

Image

@deevroman
Copy link
Owner

I would expect to see red lines with errors in it.

But I saw a place in the code that might hide errors when loading the script. In the next version, I'll add more logs and see if we see anything useful.

@sekerob
Copy link
Author

sekerob commented Jan 26, 2025

As an aside suspect the red 1 over the TamperMonkey icon coming and going means the number of scripts active on a viewed web page. Switching back and forth between any other tab and OSM, it only shows if on the OSM site.

@sekerob
Copy link
Author

sekerob commented Jan 28, 2025

Just an update of what happens now that I've figured the steps in a reproducible way. When I go into the BOO settings and deselect the geometry bit, Save, then hit Ctrl F5 to refresh the OSM page, the BOO entry sometimes completely disappears from the TamperMonkey menu. On it's dashboard the switch for BOO is moved left and grey. When then moving the switch, it turning green and hitting Ctrl+F5 the BOO entry and/or the settings menu options reappear and the geometry enhancements show again. The selection of Geometry on or off shows as per the last change of on/off when BOO is reactivated on the dashboard. At any rate now know to go directly to the dashboard to get BOO back. In effect I see 3 states. One with BOO left bar and main screen enhancement, one with BOO enhancements only in the left bar and one with BOO nowhere.

@deevroman
Copy link
Owner

better-osm-org — BOO, LOL, it took me a while to figure it out :))


TLDR; I think the update will be on the weekend. It's almost ready, you can try it here https://github.com/deevroman/better-osm-org/raw/refs/heads/dev/better-osm-org.user.js To remove a geometry from the map, press `


It seems I'm starting to get confused. Let's in order.

  1. Does the switch become gray without you explicitly clicking on it (or the script name)?

  2. Do you consider it a bug when you don't see the Settings button after clicking on the gray switch? Unfortunately, reloading the page after enabling the script is mandatory.

  3. I also have three theories about how problems can arise with the display of the Settings button

3.1

  1. Click on the Tampermonkey icon
  2. Click Settings
  3. Click on Better osm.org in the same menu (the switch turns gray with a delay)
  4. The settings window is still open, but the settings are not saved when you click Save.

Maybe points 2 and 3 occur simultaneously due to an interface bug, I don't know.

3.2 I know that sometimes after updating the script, the geometry display breaks. I didn't notice that the Settings button disappeared, but there are definitely a lot of errors in the console like Please, reload page. It is possible to enable/disable the script also leads to this bug.

3.3 The error occurs when the Settings button is added. Unfortunately, logs are disabled in this location. I'll include them in the next update. If you're interested, then you can also switch Logging Level: to Debug in the Tampermonkey settings. (probably don't turn it on forever)

@sekerob
Copy link
Author

sekerob commented Jan 30, 2025

I'll try your pre-release in a little. The issue in a nutshell is that initially the TamperMonkey menu looses the settings option both directly below the BOO line and on the BOO sub menu. The switch is only on the TamperMonkey Dashboard, and is grey when BOO is off. When hitting the switch it goes green and then when doing Ctrl+F5 the OSM site is enhanced again, remembering if the geometry option was on or off at last save. The Geometry option is truly the only one I flip flop, particularly on dense landscape edits to see if all renders as mapped. The screenshot below is when BOO is entirely gone, usually after doing a number of Ctrl+F5. It may also be when then launching a CS view from JOSM (second screen capture). Can't reproduce that at will though... BOO just goes at some point.

Image

Image

PS. Is there a place where one see which version is installed? Would that be 0.71 now as visible in the TM dashboard?

@sekerob
Copy link
Author

sekerob commented Jan 31, 2025

Updt: The good news is, since installing the 0.71 release no more BOO loss, a steady red '1' over the TamperMonkey icon when on OSM and HDYC sites. 👍

@deevroman
Copy link
Owner

fyi: update 0.8 released for all

@deevroman
Copy link
Owner

It looks like I met this bug in Tampermonkey + Google Chrome. I was switching between Tampermonkey and Violentmonkey and somehow got this situation. Only restarting the browser helped, the logs were empty, so this is not a problem in the script.

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

No branches or pull requests

2 participants