Open giomasce opened 11 years ago
I'm making some attempts about this, but I have some design questions:
Thanks! I appreciate your effort but I ask you to wait a moment before rushing into it because I might do some radical changes to RWS soon (I started porting it to AngularJS as an experiment, but it may become something serious).
As for your design questions, the way I'm thinking this could be implemented is by setting some query parameters (i.e. ?scroll=true&scroll_speed=2
) that are ignored by the server but read and used by the client.
I also suggest you take a look at the proposal that's currently last in our list of contribution ideas, the one called "Non-interactive scoreboard for public screening". It's an "extension" of this issue: provide an entirely different client for public displays, instead of just adding features to the current one. Think about it! ;-)
Just to be sure we're speaking the same language: a new Ranking.html (using some existing javascript files and some new ones) is considered a new client, isn't it?
Yes, it is.
I've done a small work in 7787d9a and I'd like to ask some help:
Scrolling*
much)ScrollingScoreboard.js
due to the fact that the original version produces HTML in its inner parts. I thought I could modify Scoreboard.js
to make its behavior depending on a variable (whether to print some HTML for interactive version). The fact is that this new variable needs to be passed likely everywhere or needs to be global (!).What do you think? Do you see other solutions?
I just gave a quick glance to the code. What's the difference between your ScrollingScoreboard.js
and the original Scoreboard.js
? Could it be achieved by "tampering" with the HTML produced by the latter?
The differences were:
I'm not sure I've understood what you meant with "tampering", but I've pushed a new commit (d1f805b) which:
.hide()
)I understand why you want to hide the sel
column, but that can be best done with a CSS override, right?
Yet, I don't understand why you want to avoid callbacks being added. Your version is supposed to be shown on public screens, where there is no interaction. Thus the callbacks will never be fired, and will remain set but "inert" forever. It would be surely more "clean" not to have them at all, but I prefer to keep them to reduce code complexity. (They could also be useful, for example to admins that want to show a scoreboard sorted by something other than the global score.)
It would be surely more "clean" not to have them at all
That was the reason; however I agree with your proposals (while keeping in mind that only sort will work as UserDetail.js
isn't initialized).
A new commit (e15a1d1) matches your requests.
Sorry for the time you're spending on it. :)
Add an option the make RWS automatically scrolling. Useful for showing the whole page on public monitors.