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 #6962: Remove jinja interaction templates and integrate css file into webpack #7286

Merged
merged 10 commits into from
Aug 12, 2019

Conversation

jameesjohn
Copy link
Contributor

@jameesjohn jameesjohn commented Aug 3, 2019

Explanation

This PR removes the use of the jinja interaction template construct which currently holds css imports.
The css files are imported into their respective bundles via the webpack css-loader and style loader and hence fixes #6962

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The linter/Karma presubmit checks have passed.
    • These should run automatically, but if not, you can manually trigger them locally using python scripts/pre_commit_linter.py and bash scripts/run_frontend_tests.sh.
  • The PR is made from a branch that's not called "develop".
  • The PR has an appropriate "PROJECT: ..." label (Please add this label for the first-pass review of the PR).
  • The PR has an appropriate "CHANGELOG: ..." label (If you are unsure of which label to add, ask the reviewers for guidance).
  • The PR follows the style guide.
  • The PR addresses the points mentioned in the codeowner checks for the files/folders changed. (See the codeowner's wiki page.)
  • The PR is assigned to an appropriate reviewer.
    • If you're a new contributor, please ask on Gitter for someone to assign a reviewer and don't tick this checkbox.
    • If you're not sure who the appropriate reviewer is, please assign to the issue's "owner" -- see the "talk-to" label on the issue. Do not only request the review but also add the reviewer as an assignee.

@kevinlee12
Copy link
Contributor

@Jamesjay4199, ptal at the frontend tests, they are failing.

@codecov
Copy link

codecov bot commented Aug 4, 2019

Codecov Report

Merging #7286 into develop will increase coverage by 9.39%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #7286      +/-   ##
==========================================
+ Coverage     89.4%   98.8%   +9.39%     
==========================================
  Files         1208     381     -827     
  Lines        98111   64554   -33557     
  Branches      2637       0    -2637     
==========================================
- Hits         87719   63781   -23938     
+ Misses        9755     773    -8982     
+ Partials       637       0     -637
Flag Coverage Δ
#backend ?
#frontend ?
Impacted Files Coverage Δ
core/controllers/reader.py 100% <ø> (ø) ⬆️
core/controllers/practice_sessions.py 100% <ø> (ø) ⬆️
core/controllers/review_tests.py 100% <ø> (ø) ⬆️
core/controllers/creator_dashboard.py 95.91% <ø> (+0.64%) ⬆️
core/controllers/topic_editor.py 100% <ø> (ø) ⬆️
core/controllers/skill_editor.py 100% <ø> (ø) ⬆️
core/controllers/editor.py 100% <ø> (ø) ⬆️
core/domain/interaction_registry.py 97.36% <0%> (-2.64%) ⬇️
extensions/interactions/base.py 97.75% <0%> (-2.25%) ⬇️
main.py 87.61% <0%> (-0.12%) ⬇️
... and 853 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb601c5...723ffac. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 4, 2019

Codecov Report

Merging #7286 into develop will decrease coverage by 0.01%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #7286      +/-   ##
===========================================
- Coverage    82.54%   82.53%   -0.01%     
===========================================
  Files         1042     1042              
  Lines        57560    57558       -2     
  Branches      2643     2643              
===========================================
- Hits         47511    47505       -6     
- Misses        9407     9411       +4     
  Partials       642      642
Flag Coverage Δ
#backend 98.41% <ø> (-0.01%) ⬇️
#frontend 71.07% <100%> (ø) ⬆️
Impacted Files Coverage Δ
core/controllers/reader.py 100% <ø> (ø) ⬆️
core/controllers/practice_sessions.py 100% <ø> (ø) ⬆️
core/controllers/review_tests.py 100% <ø> (ø) ⬆️
core/controllers/creator_dashboard.py 100% <ø> (ø) ⬆️
core/controllers/topic_editor.py 100% <ø> (ø) ⬆️
core/controllers/skill_editor.py 100% <ø> (ø) ⬆️
core/controllers/editor.py 100% <ø> (ø) ⬆️
...eractions/ItemSelectionInput/ItemSelectionInput.ts 100% <100%> (ø) ⬆️
...ns/interactions/MusicNotesInput/MusicNotesInput.ts 100% <100%> (ø) ⬆️
...actions/MultipleChoiceInput/MultipleChoiceInput.ts 100% <100%> (ø) ⬆️
... and 9 more

Copy link
Contributor

@vojtechjelinek vojtechjelinek left a comment

Choose a reason for hiding this comment

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

Thanks! One comment.

webpack.dev.config.ts Show resolved Hide resolved
Copy link
Contributor

@vinitamurthi vinitamurthi left a comment

Choose a reason for hiding this comment

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

Looks good! Just want to confirm that practice sessions and review tests were manually tested as well?

@vinitamurthi vinitamurthi removed their assignment Aug 5, 2019
@sophiewu6 sophiewu6 removed their assignment Aug 5, 2019
@jameesjohn
Copy link
Contributor Author

@Jamesjay4199 please confirm: you tested each interaction manually, including submitting answers to it in both the editor and player pages?

Yes @seanlip, I created an exploration with multiple choice and I played it without any change in style.

Looks good! Just want to confirm that practice sessions and review tests were manually tested as well?

@vinitamurthi, the interaction that got affected in review_test and practice_session is the multiple-choice input and I tested it while testing the exploration editor and player and it worked fine.

@jameesjohn
Copy link
Contributor Author

PTAL @nithusha21, @aks681 as code owner. thanks

@aks681
Copy link
Contributor

aks681 commented Aug 7, 2019

@Jamesjay4199 Did you try creating 'questions' in the topic and skill editors?

@jameesjohn
Copy link
Contributor Author

@Jamesjay4199 Did you try creating 'questions' in the topic and skill editors?

No I did not.
I will do this and give you a response asap.

@nithusha21
Copy link
Contributor

Yes @seanlip, I created an exploration with multiple choice and I played it without any change in style.

I don't think that is enough. You would need to manually try every single one of the interactions as you have touched all those files. (The easiest, in dev env, is probably to load all_interactions exploration, and view it in both explore/ and create/ views).

Copy link
Contributor

@nithusha21 nithusha21 left a comment

Choose a reason for hiding this comment

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

Approving as I am going to be out this weekend and don't want this to block you. Once you confirm testing with all the interactions, I am ok with this PR.

@nithusha21 nithusha21 removed their assignment Aug 9, 2019
@jameesjohn
Copy link
Contributor Author

The easiest, in dev env, is probably to load all_interactions exploration, and view it in both explore/ and create/ views

@nithusha21, I tried loading all_interactions exploration, but I had an error: Full proto too large to save, cleared variables.
Other explorations loaded successfully and I tested them and they worked as expected.

@jameesjohn
Copy link
Contributor Author

@Jamesjay4199 Did you try creating 'questions' in the topic and skill editors?

I've tried it and it's working fine.
Thanks

@seanlip
Copy link
Member

seanlip commented Aug 10, 2019

@nithusha21, I tried loading all_interactions exploration, but I had an error: Full proto too large to save, cleared variables.

Does this error occur repeatedly if you try loading again? Normally that error message you mentioned is transient.

Other explorations loaded successfully and I tested them and they worked as expected.

Could you catalog which interactions you've tested, and then manually test the remaining ones (if you can't load the "all interactions" exploration? You need to make sure no bugs get through and that you've manually examined the entire surface area.

@seanlip seanlip assigned jameesjohn and unassigned aks681 Aug 10, 2019
@jameesjohn
Copy link
Contributor Author

Could you catalog which interactions you've tested.

Okay. But, this PR is more of loading css with webpack since the bulk of the work was already done by @vojtechjelinek in #6939

@seanlip
Copy link
Member

seanlip commented Aug 10, 2019

Please still test all interactions comprehensively, and report the results back explicitly. We have had regressions in the past with the PRs for this project, and we should take steps to avoid that in the future.

@jameesjohn
Copy link
Contributor Author

Okay.
I should be done with the testing tomorrow.

@jameesjohn jameesjohn changed the title Remove jinja interaction templates Remove jinja interaction templates and integrate css file into webpack Aug 11, 2019
@jameesjohn jameesjohn changed the title Remove jinja interaction templates and integrate css file into webpack Fix #6962: Remove jinja interaction templates and integrate css file into webpack Aug 11, 2019
@vojtechjelinek
Copy link
Contributor

I confirm that I have tested this PR, I tried the all interactions explorations and everything works correctly.

@seanlip
Copy link
Member

seanlip commented Aug 12, 2019

Thanks! Merging.

@seanlip seanlip merged commit 68c4a4a into oppia:develop Aug 12, 2019
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.

Integrate CSS files into webpack
9 participants