Repository: oppia/oppia

Issue:
The side navbar doesn't seem to open above 770px width
<!--
  - Thanks for taking the time to report a bug in the Oppia project.
  - Before filing a new issue, please do a quick search to check that it hasn't
  - already been filed on the [issue tracker](https://github.com/oppia/oppia/issues)._
  -->

**Describe the bug**
The sidebar doesn't seem to open above 770px width even though there is a button to open it.

**To Reproduce**
Steps to reproduce the behavior:
 1. Go Topics and skill dashboard
 2. Go to the mobile view and try clicking the hamburger button at top left corner.

**Observed behavior**
No side nav bar doesn't open.

**Expected behavior**
Either the button should be hidden or the side nav bar should open.

**Screenshots**
![side bar not opening](https://user-images.githubusercontent.com/42460632/84849846-db962800-b073-11ea-96a9-2bb860154aa0.gif)


**Desktop (please complete the following information; delete this section if the issue does not arise on desktop):**
 - OS: Ubunut
- Browser: Chrome Mobile view.


The side navbar doesn't seem to open above 770px width
<!--
  - Thanks for taking the time to report a bug in the Oppia project.
  - Before filing a new issue, please do a quick search to check that it hasn't
  - already been filed on the [issue tracker](https://github.com/oppia/oppia/issues)._
  -->

**Describe the bug**
The sidebar doesn't seem to open above 770px width even though there is a button to open it.

**To Reproduce**
Steps to reproduce the behavior:
 1. Go Topics and skill dashboard
 2. Go to the mobile view and try clicking the hamburger button at top left corner.

**Observed behavior**
No side nav bar doesn't open.

**Expected behavior**
Either the button should be hidden or the side nav bar should open.

**Screenshots**
![side bar not opening](https://user-images.githubusercontent.com/42460632/84849846-db962800-b073-11ea-96a9-2bb860154aa0.gif)


**Desktop (please complete the following information; delete this section if the issue does not arise on desktop):**
 - OS: Ubunut
- Browser: Chrome Mobile view.




Discussion:
Just a note, this only happens for the scenario the screen is resized from < 700px to >700 px (eg. changing from portrait mode to landscape on a tablet device). Does not happen if the page was was loaded in > 700 px orientation.
Just a note, this only happens for the scenario the screen is resized from < 700px to >700 px (eg. changing from portrait mode to landscape on a tablet device). Does not happen if the page was was loaded in > 700 px orientation.

Resolving patch:
diff --git a/core/domain/skill_services.py b/core/domain/skill_services.py
--- a/core/domain/skill_services.py
+++ b/core/domain/skill_services.py
@@ -248,11 +248,12 @@ def get_multi_skill_summaries(skill_ids):
     return skill_summaries
 
 
-def get_multi_skills(skill_ids):
+def get_multi_skills(skill_ids, strict=True):
     """Returns a list of skills matching the skill IDs provided.
 
     Args:
         skill_ids: list(str). List of skill IDs to get skills for.
+        strict: bool. Whether to raise an error if a skill doesn't exist.
 
     Returns:
         list(Skill). The list of skills matching the provided IDs.
@@ -260,7 +261,7 @@ def get_multi_skills(skill_ids):
     local_skill_models = skill_models.SkillModel.get_multi(skill_ids)
     for skill_id, skill_model in python_utils.ZIP(
             skill_ids, local_skill_models):
-        if skill_model is None:
+        if strict and skill_model is None:
             raise Exception('No skill exists for ID %s' % skill_id)
     skills = [
         get_skill_from_model(skill_model)
@@ -279,12 +280,13 @@ def get_rubrics_of_skills(skill_ids):
         dict, list(str). The skill rubrics of skills keyed by their
             corresponding ids and the list of deleted skill ids, if any.
     """
-    backend_skill_models = skill_models.SkillModel.get_multi(skill_ids)
+    skills = get_multi_skills(skill_ids, strict=False)
     skill_id_to_rubrics_dict = {}
 
-    for skill_model in backend_skill_models:
-        if skill_model is not None:
-            skill_id_to_rubrics_dict[skill_model.id] = skill_model.rubrics
+    for skill in skills:
+        if skill is not None:
+            rubric_dicts = [rubric.to_dict() for rubric in skill.rubrics]
+            skill_id_to_rubrics_dict[skill.id] = rubric_dicts
 
     deleted_skill_ids = []
     for skill_id in skill_ids:
@@ -305,13 +307,13 @@ def get_descriptions_of_skills(skill_ids):
         dict, list(str). The skill descriptions of skills keyed by their
             corresponding ids and the list of deleted skill ids, if any.
     """
-    skill_summary_models = skill_models.SkillSummaryModel.get_multi(skill_ids)
+    skill_summaries = get_multi_skill_summaries(skill_ids)
     skill_id_to_description_dict = {}
 
-    for skill_summary_model in skill_summary_models:
-        if skill_summary_model is not None:
-            skill_id_to_description_dict[skill_summary_model.id] = (
-                skill_summary_model.description)
+    for skill_summary in skill_summaries:
+        if skill_summary is not None:
+            skill_id_to_description_dict[skill_summary.id] = (
+                skill_summary.description)
 
     deleted_skill_ids = []
     for skill_id in skill_ids:


Test patch: