nathancarter / group-explorer

Group theory visualization software in the browser
http://nathancarter.github.io/group-explorer/index.html
226 stars 26 forks source link

Changing the default representation to a user defined naming scheme breaks the page #7

Closed JohnTasto closed 4 years ago

JohnTasto commented 4 years ago

When I add a new naming scheme, make it the default, then refresh the page, nearly everything breaks and I get the following alert:

Chrome: TypeError: Cannot read property '1' of undefined

Firefox: TypeError: this.group.representations[this.group.representationIndex] is undefined

To restore functionality, I have to clear the site data.

Steps to reproduce:

  1. Go to the A4 Group Info page
  2. Under "Naming Schemes", click the link to create a new representation for this group
  3. Click "Ok"
  4. Under "Naming Schemes" -> "User-defined naming schemes" -> "1.", click the link to make this the default representation
  5. Refresh the page

System:

Side notes on the "Edit naming scheme" modal dialog box:

nathancarter commented 4 years ago

Thank you for the extremely detailed report! I can confirm the behavior on both Chrome and Firefox on my end. One of us will get to this as soon as we can (which may be a little while with volunteers, but as soon as we can).

One question: Could you explain what you mean by the following? Thanks!

To restore functionality, I have to clear the site data.

JohnTasto commented 4 years ago

The easiest way to remove the errant custom representation is to enter into the JavaScript console:

localStorage.clear()

Alternatively, in Chrome, click the lock icon -> "Site settings" -> "Clear data", and in Firefox, click the hamburger -> "Library" -> "History" -> "Show All History" -> right click on a page from Group Explorer -> "Forget About This Site".

Of course, this is a large hammer, but without knowing the specific keys to remove, this is how I got whichever Group Info page working again (A4 was the first I'd tried, but other groups I've tried since are also affected).

rayellis4 commented 4 years ago

Commit b13c9947cc29f8efe292d19b07882f5fac20f27b fixes this, I believe. (I have to apologize:. the commit dates from Jan 5, but I only checked it into a dev branch because I didn't think there was a problem in the public version. My bad.)

I can hardly believe you got as far as you did using Firefox, btw -- my version (73) doesn't scroll the pop-up editor properly, and the 'OK' button is obscured so you can't finish your editing! Gotta fix that. Chrome and Safari (Win10, MacOS, Linux/Ubuntu, IOS) all seem to work ok.

Let me know how this works for you, or if you have any further problems.

rayellis4 commented 4 years ago

Improved the look of the user-defined naming scheme editor across platforms and browsers.

Thanks for bringing this to our attention. Let me know if you have an further problems.

JohnTasto commented 4 years ago

Awesome, looks good! This is indeed working now. Thanks for fixing it. I'll leave it to you to close this issue in case you want to keep it for some reason, but as far as I'm concerned it is resolved.

Thank you for creating this useful tool. It is certainly helping me understand group theory, and I look forward to seeing where it goes from here.