Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Typescript retozi #21

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Typescript retozi #21

wants to merge 6 commits into from

Conversation

Retozi
Copy link
Contributor

@Retozi Retozi commented Oct 11, 2015

A Typescript implementation without any external dependencies

simply run the server and open index.html in a browser.

or then

    npm install
    npm start

for a dev server

@staltz
Copy link
Owner

staltz commented Oct 12, 2015

Not working. Check other submissions to see how they work.

@Retozi
Copy link
Contributor Author

Retozi commented Oct 12, 2015

In what sense? I did cross compare and it seems to behave the same way, did it not load at all or did you somehow enter an invalid state with the up and down scrolling?

@Retozi
Copy link
Contributor Author

Retozi commented Oct 12, 2015

I have fixed an issue that leaves you in a semi recoverable state when you get unlucky with the Obi Wans planet, request canceling and scrolling. You might have hit that right when you started testing.

I really cannot find any other difference, I compared it to @tomkis1 solution excessively and I cannot find any difference to it, it behaves exactly the same way except that my solution allows for two scrolldowns.

@staltz
Copy link
Owner

staltz commented Oct 12, 2015

I got stuck like this. Can't let the UI get stuck.

screen shot 2015-10-12 at 22 20 50

@Retozi
Copy link
Contributor Author

Retozi commented Oct 12, 2015

Jesus man I suck. Should have seen that... sorry for wasting your time by only testing when clicking up first :)

@staltz
Copy link
Owner

staltz commented Oct 13, 2015

Some problems still:

  • Up and down buttons are swapped around.
  • I was able to see a request happen while there was a red match. This didn't happen every time, so I think there is some kind of race condition. But I'm sure there was at least one case where a new slot was filled while there was a red match. This should not occur.

@Retozi
Copy link
Contributor Author

Retozi commented Oct 13, 2015

  1. flipped the scroll buttons
  2. prevent queries while sith on obi wan planet. This was by design. I took the requirement too literally, since it does not explicitly state to not refetch, just to simply cancel the ongoing request. Makes more sense like this though...

@staltz
Copy link
Owner

staltz commented Oct 14, 2015

Problem:

Down button should be enabled to click in this situation.
screen shot 2015-10-14 at 19 02 53

@Retozi
Copy link
Contributor Author

Retozi commented Oct 14, 2015

This is done to avoid entering uncharted territory. It is stated that only one request after another should be fired.

If I enable the upscroll here, it would technically mean that two requests could be pending at the same time. (request triggering going up and going down the list would be independent).

From the feel of it, hyperturtle's solution does exactly this (although I have not verified it in the code). If this is okey, I will enable this.

alternatively I could

  1. Avoid the problem by only allowing one scrolldown (like salista)
  2. define a priority (up before down, farthest away from scroll pos) of your choice

please advise

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants