ddsnowboard / FantasyStocks

A website where you play a game of fantasy stocks.
http://fantasystocks.herokuapp.com
Apache License 2.0
0 stars 1 forks source link

Improve Create Floor Page #17

Closed ddsnowboard closed 8 years ago

ddsnowboard commented 8 years ago

The spec details a fancier (though not in a technically difficult way) version of the Create Floor page than the one that is currently implemented. This won't really be a big deal, but I need to do this before the Alpha release.

ddsnowboard commented 8 years ago

So, I'm having some issues with the newly necessary error handling. You can see 4deee4123d82a8c61b72b62e99ad8b1f474b811a for a little more info, but basically, I need to handle errors on the Received Trade page now, and that is proving difficult because I didn't really account for that necessity when I was writing it. I need to have the form handle errors like it usually does, but I can't really do that normally because the form is only for show on this page. It never gets submitted.

So I guess I should start by enumerating what it would do in a perfect world. I guess it would show on the page that you can't accept the trade, and just grey out the buttons. I think I could manage that somehow. It probably wouldn't be that hard. If you go into the HTML and set it back, I guess I don't really have to worry about what you see because you're deadset on breaking things anyway, so I could just tell the server to check whether the trade is good before it accepts, and if the trade isn't good, I can just throw an error and have the user see a 404. I don't think there would be any problem with that.

So I guess that's my plan. I'll make a JavaScript that makes the buttons grey if they shouldn't be clicked, and I'll keep the error I have from the last commit so that the user knows what's going on, and then I'll just leave everything else as-is and if a user wants to break everything, it's his funeral.

ddsnowboard commented 8 years ago

This was pretty much finished in 4500dafbe310331cd6f384e555f230a813366274, but I need to do more testing. Testing things is really getting out of hand, and now that I've done most of the UI stuff and I'm just doing backend. I missed like 4 huge, massive bugs somehow and just stumbled into them while I was working on this. I think testing might catch these easier and faster, so I should get going on that. Maybe I write a test for every thing that I do. There would be a backlog, but it would be better than nothing. Tomorrow, maybe.

ddsnowboard commented 8 years ago

I wrote a bunch of unit tests, so those are nice to have. I think that everything should be good to go. I'm going to play with it once more, and then I'm going to merge and move on. I haven't done much real coding for too long, and I need to fix that.