vantage-sh / ec2instances.info

Amazon EC2 instance comparison site
https://ec2instances.info
MIT License
5.19k stars 585 forks source link

Feature: Remember Columns Selected between visits #599

Closed AndrewFarley closed 2 years ago

AndrewFarley commented 2 years ago

Feature Request: I would like a persistent cookie to remember your columns selected between visits. I find that most people using this tool really only want to see a specific sub-set of columns, and this is likely to stay the same in your role (eg: you only care about Windows pricing, or you always want to see the GPU column, or you don't care about network performance or EBS volume columns/features).

Reasoning: I use this tool multiple times daily to do my job, every time I re-load this I have to re-select/unselect the desired columns I wish to see to figure out the recommended instances for a specific task. Since typically these columns are the same for any one individual, it seems annoying to always default to some pre-defined generic column-set and would be more ideal to allow users to persist their desired columns.

Optionally, allow a user to disable this feature.

Note: I would happy to sponsor this feature request with a bounty. I'd gladly send a couple hundred dollars to the implementer of this feature, either via something like Paypal, Crypto, or some gift card somewhere. This feature would save me time, and effort and would be happy to support having this.

brookemckim commented 2 years ago

Hey @AndrewFarley this is currently a supported feature and relies on the built in stateSave (https://datatables.net/reference/option/stateSave) feature in DataTables. It uses localStorage and sessionStorage APIs. Can you let me know what browser you are using and if you are blocking any access to localStorage?

AndrewFarley commented 2 years ago

@brookemckim Is there some timeout on this setting? I use this at least once a day, and I usually close the window afterwards, and as much as I can recall, every day I have to go un-check all the Windows columns. I do notice if I immediately refresh, or close and reopen after the list and site completely loads then it seems to load the state and change the columns visible after like 5-7 seconds. But, if I open this later today or tomorrow, it'll have those columns I don't need again.

Since i 99% of the time do not use windows, and this bugs me enough I almost feel like making a mirror, and a patch to strip all the columns I don't use, and re-publishing this on a different URL to prevent this from continuing to happen. That feels.. a bit drastic if this is supposed to not occur, the wasted time unchecking columns adds up though.

brookemckim commented 2 years ago

@AndrewFarley thank you for that debug info. I believe I found the issue. DataTables by default only accepts state less than 7200 seconds old. I am going to change this to permanent and it should resolve this for you.

AndrewFarley commented 2 years ago

@brookemckim Amazing! Going to save me and I assume many others so much time. Thanks much, please close this when you fix it, and I'll keep an eye on this over a period after and confirm the fix. Cheers!

brookemckim commented 2 years ago

Closing, as I have confirmed this is working.