icykoneko / ff14-fish-tracker-app

FF14 Fish Tracker App
https://ff14fish.carbuncleplushy.com
MIT License
63 stars 22 forks source link

Unable to import completion list after catching too many fish #14

Closed icykoneko closed 4 years ago

icykoneko commented 5 years ago

From the Discuss forum http://disq.us/p/210arvj:

Hi, I'm having problems saving my fish list. I've selected "Export Fish Checklist" and saved the copied info to pastebin, it worked a couple of times, but now I'm getting the message "Error: Malformed fishing checklist." It seemed to work fine when I needed lots of fish, but now that I'm down to 8 fish it doesn't seem to accept the data at all.

Most likely, the string has become too long for the standard JavaScript alert and input controls.

icykoneko commented 5 years ago

Perhaps a solution similar to http://ffxivsquadron.com/ would work?

icykoneko commented 5 years ago

I was looking around for compression libraries, and came across pako. It can even be used inside the browser!

So, I could JSONify the settings first, deflate it using pako, convert the binary string into Base64 for output. The result appears to be ~66% smaller, meaning it will likely hold a lot more settings info!

I still think I need to also make a custom UI for export/import using a textarea for the "code" so that it's not bound by the native JavaScript alert control.

icykoneko commented 5 years ago

Okay, got another message from the user. Turned out, they made a mistake when copying the data to pastebin, causing the corruption.

I'd still like to have the save stream be able to take on more data though. So I'm going to leave this issue open for now.

Fenrirthviti commented 5 years ago

Would also recommend looking in to localStorage as an option to avoid having to deal with import/export entirely.

icykoneko commented 5 years ago

It's already stored there. This is about exporting that information for say, syncing with other devices.

Akurosia commented 5 years ago

As a little note on this: I just tested this with all numbers from 1 - 10000 in both pinned and completed arrays and import still worked fine. So for the moment this will not affect the site at all currently

icykoneko commented 5 years ago

Sounds good, I'm gonna close this out then.

icykoneko commented 5 years ago

Reopening this issue. Apparently there are problems importing the data. I'd like to improve this anyways because window.alert and window.prompt are ugly...

icykoneko commented 4 years ago

This is still an ongoing problem, and I'm getting more and more requests to fix it now. I don't think it's dependent on the data refactor milestone though.