cms-dev / cms

Contest Management System
http://cms-dev.github.io/
GNU Affero General Public License v3.0
896 stars 362 forks source link

Scrollable RWS #191

Open giomasce opened 11 years ago

giomasce commented 11 years ago

Add an option the make RWS automatically scrolling. Useful for showing the whole page on public monitors.

lucach commented 10 years ago

I'm making some attempts about this, but I have some design questions:

lw commented 10 years ago

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! ;-)

lucach commented 10 years ago

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?

lw commented 10 years ago

Yes, it is.

lucach commented 10 years ago

I've done a small work in 7787d9a and I'd like to ask some help:

What do you think? Do you see other solutions?

lw commented 10 years ago

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?

lucach commented 10 years ago

The differences were:

I'm not sure I've understood what you meant with "tampering", but I've pushed a new commit (d1f805b) which:

lw commented 10 years ago

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.)

lucach commented 10 years ago

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. :)