Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make Scoreboard logic more efficient #1279

Merged
merged 4 commits into from
Jan 7, 2022
Merged

Conversation

faucomte97
Copy link
Contributor

@faucomte97 faucomte97 commented Jan 6, 2022

This change is Reviewable

@faucomte97 faucomte97 self-assigned this Jan 6, 2022
Copy link
Contributor

@dionizh dionizh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 4 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @faucomte97)


game/templates/game/level_selection.html, line 54 at r2 (raw file):

{% block header %}
<div class="banner banner--rapid-router--background">
    <section class="level_rr_logo">

As section aligns the text to center, can you remove the related css class that does that (level_rr_logo)


game/views/scoreboard.py, line 107 at r2 (raw file):

def scoreboard_data(episode_ids, attempts_per_students):

Good combining these two! I was thinking about it.


game/views/scoreboard.py, line 141 at r2 (raw file):

        total_possible_score = 0
        # Get the best attempts for the specific Episode
        attempts_dict = [

Not a dict, incorrect name.

Copy link
Contributor Author

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dionizh)


game/templates/game/level_selection.html, line 54 at r2 (raw file):

Previously, dionizh (Dioni Zhong) wrote…

As section aligns the text to center, can you remove the related css class that does that (level_rr_logo)

Done.


game/views/scoreboard.py, line 107 at r2 (raw file):

Previously, dionizh (Dioni Zhong) wrote…

Good combining these two! I was thinking about it.

😊


game/views/scoreboard.py, line 141 at r2 (raw file):

Previously, dionizh (Dioni Zhong) wrote…

Not a dict, incorrect name.

Done.

Copy link
Contributor

@dionizh dionizh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r3, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @dionizh and @faucomte97)


game/static/game/css/level_selection.css, line 98 at r3 (raw file):

}

.banner--rapid-router--background img {

Sorry, this is minor, but let's not call it background as it's actually foreground. Just banner--rapid-router is fine I think.


game/static/game/css/scoreboard.css, line 1 at r3 (raw file):

.banner--rapid-router--background img {

Same here.


game/templates/game/level_selection.html, line 53 at r3 (raw file):

{% block header %}
<div class="banner banner--rapid-router--background">

Can we have all these in the section and remove the div?


game/templates/game/scoreboard.html, line 33 at r3 (raw file):

{% block header %}
<div class="banner banner--rapid-router--background">
    <section>

Same here.

Copy link
Contributor Author

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 3 of 7 files reviewed, 5 unresolved discussions (waiting on @dionizh)


game/static/game/css/level_selection.css, line 98 at r3 (raw file):

Previously, dionizh (Dioni Zhong) wrote…

Sorry, this is minor, but let's not call it background as it's actually foreground. Just banner--rapid-router is fine I think.

Done.


game/static/game/css/scoreboard.css, line 1 at r3 (raw file):

Previously, dionizh (Dioni Zhong) wrote…

Same here.

Done.


game/templates/game/level_selection.html, line 53 at r3 (raw file):

Previously, dionizh (Dioni Zhong) wrote…

Can we have all these in the section and remove the div?

Done.


game/templates/game/scoreboard.html, line 33 at r3 (raw file):

Previously, dionizh (Dioni Zhong) wrote…

Same here.

Done.

Copy link
Contributor

@dionizh dionizh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 4 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @faucomte97)

@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #1279 (0ca1ff8) into master (ae8603b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1279      +/-   ##
==========================================
+ Coverage   90.63%   90.65%   +0.01%     
==========================================
  Files          98       98              
  Lines        5318     5318              
==========================================
+ Hits         4820     4821       +1     
+ Misses        498      497       -1     
Impacted Files Coverage Δ
game/views/scoreboard_csv.py 100.00% <ø> (ø)
game/views/scoreboard.py 88.40% <100.00%> (+0.05%) ⬆️
game/random_road.py 91.36% <0.00%> (+0.35%) ⬆️

@faucomte97 faucomte97 merged commit a49414b into master Jan 7, 2022
@faucomte97 faucomte97 deleted the scoreboard_load branch January 7, 2022 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants