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

PP-443: Restrict cover widths #225

Merged
merged 4 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README-CHANGES.xml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
<c:change date="2023-08-12T00:00:00+00:00" summary="Fixed crash when time tracking is not enabled."/>
</c:changes>
</c:release>
<c:release date="2023-09-20T12:49:37+00:00" is-open="true" ticket-system="org.nypl.jira" version="1.6.0">
<c:release date="2023-09-20T14:23:59+00:00" is-open="true" ticket-system="org.nypl.jira" version="1.6.0">
<c:changes>
<c:change date="2023-08-24T00:00:00+00:00" summary="Updated Kotlin version to 1.9.0"/>
<c:change date="2023-08-28T00:00:00+00:00" summary="Fixed crash when opening an audiobook with a null manifest."/>
Expand All @@ -315,7 +315,12 @@
<c:ticket id="PP-418"/>
</c:tickets>
</c:change>
<c:change date="2023-09-20T12:49:37+00:00" summary="Changed BasicToken login request method to POST."/>
<c:change date="2023-09-20T00:00:00+00:00" summary="Changed BasicToken login request method to POST."/>
<c:change date="2023-09-20T14:23:59+00:00" summary="Very wide covers have their widths restricted to avoid breaking the UI.">
<c:tickets>
<c:ticket id="PP-443"/>
</c:tickets>
</c:change>
</c:changes>
</c:release>
</c:releases>
Expand Down
1 change: 1 addition & 0 deletions simplified-ui-catalog/src/main/res/layout/book_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
android:id="@+id/bookDetailCoverImage"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:maxWidth="@dimen/catalogBookDetailCoverMaximumWidth"
android:adjustViewBounds="true"
android:contentDescription="@null"
android:scaleType="fitXY"
Expand Down
28 changes: 11 additions & 17 deletions simplified-ui-catalog/src/main/res/layout/feed_lane_item.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical">

<androidx.cardview.widget.CardView
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="@dimen/cover_thumbnail_height"
app:cardCornerRadius="@dimen/cover_corner_radius"
app:cardElevation="2dp">

<ImageView
android:id="@+id/coverImage"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:contentDescription="@null"
android:scaleType="fitXY"
app:srcCompat="@drawable/cover_loading" />
</androidx.cardview.widget.CardView>
</LinearLayout>
android:id="@+id/coverImage"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:contentDescription="@null"
android:maxWidth="@dimen/catalogLaneCoverMaximumWidth"
android:scaleType="fitXY"
app:srcCompat="@drawable/cover_loading" />
</androidx.cardview.widget.CardView>
3 changes: 3 additions & 0 deletions simplified-ui-catalog/src/main/res/values/dimensions.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>

<resources>
<dimen name="catalogLaneCoverMaximumWidth">96dp</dimen>
<dimen name="catalogBookDetailCoverMaximumWidth">128dp</dimen>

<dimen name="catalogBookDetailStatusHeight">64dp</dimen>
<dimen name="catalogBookDetailButtonsHeight">64dp</dimen>
<dimen name="catalogFeedCoversSpace">8dp</dimen>
Expand Down
Loading