Skip to content

Commit

Permalink
[MBL-16456][Student][Teacher] Pages that import styles through global…
Browse files Browse the repository at this point in the history
… CSS does not load (#1827)

refs: MBL-16456
affects: Student, Teacher
release note: Fixed a bug where pages with global CSS don't load

* Student fix.

* Teacher fix

(cherry picked from commit 347694f)
  • Loading branch information
tamaskozmer committed Jan 16, 2023
1 parent 4ade2bf commit f15601e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,6 @@ class PageDetailsFragment : InternalWebviewFragment(), Bookmarkable {
}
}
}

val layoutParams = getCanvasWebView()?.layoutParams
layoutParams?.let {
it.height = ViewGroup.LayoutParams.WRAP_CONTENT
getCanvasWebView()?.layoutParams = it
}
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
Expand Down
17 changes: 4 additions & 13 deletions apps/student/src/main/res/layout/fragment_webview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,12 @@
app:theme="@style/ToolBarStyle"
tools:targetApi="lollipop" />

<ScrollView
<com.instructure.pandautils.views.CanvasWebViewWrapper
android:id="@+id/canvasWebViewWrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:scrollbarStyle="outsideOverlay"
android:clipToPadding="false"
android:layout_below="@id/toolbar">

<com.instructure.pandautils.views.CanvasWebViewWrapper
android:id="@+id/canvasWebViewWrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/backgroundLightest"/>

</ScrollView>
android:layout_below="@id/toolbar"
android:background="@color/backgroundLightest" />

<ProgressBar
android:id="@+id/webViewLoading"
Expand Down
16 changes: 4 additions & 12 deletions apps/teacher/src/main/res/layout/fragment_page_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,13 @@
app:theme="@style/ToolBarStyle"
tools:ignore="UnusedAttribute" />

<ScrollView
<com.instructure.pandautils.views.CanvasWebViewWrapper
android:id="@+id/canvasWebViewWraper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_below="@id/toolbar"
android:scrollbarStyle="outsideOverlay"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false">

<com.instructure.pandautils.views.CanvasWebViewWrapper
android:id="@+id/canvasWebViewWraper"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</ScrollView>
android:layout_marginBottom="8dp" />

<com.instructure.loginapi.login.view.CanvasLoadingView
android:id="@+id/loading"
Expand Down

0 comments on commit f15601e

Please sign in to comment.