Skip to content

Commit

Permalink
Merge pull request #842 from hyperskill/release/1.49
Browse files Browse the repository at this point in the history
Release 1.49
  • Loading branch information
XanderZhu authored Jan 15, 2024
2 parents 880a94a + eebf20c commit 0f3e822
Show file tree
Hide file tree
Showing 59 changed files with 674 additions and 214 deletions.
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ _Before Code Review:_
- [ ] View analytics events are added for new screens;
- [ ] New analytics events are documented;
- [ ] All checks have been passed;
- [ ] Changes have been checked locally.
- [ ] Changes have been checked locally;
- [ ] Saved in the cache models serialization checked locally.

**Description**
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
working-directory: './iosHyperskillApp'

- name: Cache Pods
uses: actions/cache@v3.3.2
uses: actions/cache@v3.3.3
id: cache-pods
with:
path: './iosHyperskillApp/Pods'
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/gpt_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: GPT Code Review

on:
pull_request:
types: [opened, reopened, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write

jobs:
code-review:
if: ${{ contains(github.event.*.labels.*.name, 'gpt-review') }}
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: anc95/ChatGPT-CodeReview@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
LANGUAGE: English
OPENAI_API_ENDPOINT: https://api.openai.com/v1
MODEL: gpt-3.5-turbo-16k # https://platform.openai.com/docs/models
PROMPT: 'Provide suggestions for improving the changes in this PR. If the PR has no clear issues, mention that no suggestions are needed. You must look at the code to see if there are any bugs, improvements, or optimizations. You must praise good changes. You must ask questions if something is not clear. This PR is for the Kotlin Multiplatform Mobile project, where the main languages are Kotlin and Swift.'
top_p: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p
temperature: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature
max_tokens: 10000
MAX_PATCH_LENGTH: 10000 # if the patch/diff length is large than MAX_PATCH_LENGTH, will be ignored and won't review.
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
In the new version of My Hyperskill:
• Added a retry button for problems
• Bug fixes and improvements using your feedback

We are working hard to bring even more Hyperskill features to your mobile phone. Currently, My Hyperskill app is in beta, so we would love to hear any feedback from you. Feel free to contact us at hello@hyperskill.org and share your thoughts!
Bug fixes, minor improvements, and more.
2 changes: 1 addition & 1 deletion androidHyperskillApp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:maxSdkVersion="26"/>

<application
android:label="@string/app_name"
android:label="@string/android_app_name"
android:name=".HyperskillApp"
android:allowBackup="false"
android:supportsRtl="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import ru.nobird.android.view.base.ui.extension.showIfNotExists
import ru.nobird.android.view.base.ui.extension.snackbar
import ru.nobird.android.view.redux.ui.extension.reduxViewModel
import ru.nobird.app.presentation.redux.container.ReduxView
import org.hyperskill.app.R as SharedRes

class AuthSocialFragment :
Fragment(R.layout.fragment_auth_social),
Expand Down Expand Up @@ -130,13 +131,18 @@ class AuthSocialFragment :
}
}

viewBinding.signInToTextView.setText(
viewBinding.signInToTextView.text =
if (isInSignUpMode) {
org.hyperskill.app.R.string.auth_sign_up_title
getString(
SharedRes.string.auth_sign_up_title,
getString(SharedRes.string.android_app_name)
)
} else {
org.hyperskill.app.R.string.auth_log_in_title
getString(
SharedRes.string.auth_log_in_title,
getString(SharedRes.string.android_app_name)
)
}
)

authMaterialCardViewsAdapter.items = listOf(
AuthSocialCardInfo.JETBRAINS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@ object StreakRecoveryViewActionDelegate {
when (viewAction) {
is StreakRecoveryFeature.Action.ViewAction.ShowRecoveryStreakModal -> {
StreakRecoveryDialogFragment
.newInstance(
StreakRecoveryDialogFragment.Params(
recoveryPriceAmountLabel = viewAction.recoveryPriceAmountLabel,
recoveryPriceGemsLabel = viewAction.recoveryPriceGemsLabel,
modalText = viewAction.modalText
)
).showIfNotExists(fragmentManager, StreakRecoveryDialogFragment.TAG)
.newInstance(viewAction)
.showIfNotExists(fragmentManager, StreakRecoveryDialogFragment.TAG)
}
StreakRecoveryFeature.Action.ViewAction.HideStreakRecoveryModal -> {
fragmentManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,31 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.view.isVisible
import androidx.fragment.app.viewModels
import by.kirich1409.viewbindingdelegate.viewBinding
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import kotlinx.serialization.Serializable
import org.hyperskill.app.android.R
import org.hyperskill.app.android.core.extensions.argument
import org.hyperskill.app.android.databinding.FragmentStreakRecoveryBinding
import org.hyperskill.app.android.view.base.ui.extension.wrapWithTheme
import org.hyperskill.app.main.presentation.AppFeature
import org.hyperskill.app.main.presentation.MainViewModel
import org.hyperskill.app.streak_recovery.presentation.StreakRecoveryFeature
import org.hyperskill.app.streak_recovery.presentation.StreakRecoveryFeature.Action.ViewAction.ShowRecoveryStreakModal

class StreakRecoveryDialogFragment : BottomSheetDialogFragment() {
companion object {
const val TAG: String = "StreakRecoveryDialogFragment"
fun newInstance(params: Params): StreakRecoveryDialogFragment =
fun newInstance(params: ShowRecoveryStreakModal): StreakRecoveryDialogFragment =
StreakRecoveryDialogFragment().apply {
this.params = params
}
}

private var params: Params by argument(Params.serializer())
private var params: ShowRecoveryStreakModal by argument(ShowRecoveryStreakModal.serializer())

private val viewModel: MainViewModel by viewModels(ownerProducer = ::requireActivity)

Expand Down Expand Up @@ -72,6 +73,11 @@ class StreakRecoveryDialogFragment : BottomSheetDialogFragment() {
streakRecoverySubtitle.text = params.modalText
streakRecoveryGemsTextView.text = params.recoveryPriceGemsLabel
streakRecoveryGemsAmountTextView.text = params.recoveryPriceAmountLabel
streakRecoveryFirstTimeBadge.isVisible = params.isFirstTimeOffer
streakRecoveryNextRecoveryPrice.isVisible = params.nextRecoveryPriceText != null
if (params.nextRecoveryPriceText != null) {
streakRecoveryNextRecoveryPrice.text = params.nextRecoveryPriceText
}
streakRecoveryBuyButton.setOnClickListener {
viewModel.onNewMessage(
AppFeature.Message.StreakRecoveryMessage(
Expand All @@ -97,11 +103,4 @@ class StreakRecoveryDialogFragment : BottomSheetDialogFragment() {
)
)
}

@Serializable
data class Params(
val recoveryPriceAmountLabel: String,
val recoveryPriceGemsLabel: String,
val modalText: String
)
}
Binary file modified androidHyperskillApp/src/main/res/drawable-hdpi/ic_subtitle.webp
Binary file not shown.
Binary file modified androidHyperskillApp/src/main/res/drawable-mdpi/ic_subtitle.webp
Binary file not shown.
Binary file modified androidHyperskillApp/src/main/res/drawable-xhdpi/ic_subtitle.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="20dp"
android:paddingHorizontal="20dp"
>

<ImageView
Expand All @@ -25,7 +26,6 @@
android:layout_height="wrap_content"
android:src="@drawable/img_streak_recovery"
android:layout_marginTop="40dp"
android:layout_marginStart="20dp"
app:layout_constraintTop_toBottomOf="@+id/streakRecoverySwipeIndicator"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="ContentDescription"
Expand All @@ -38,7 +38,6 @@
android:text="@string/streak_recovery_modal_title"
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
android:textSize="34sp"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="40dp"
app:layout_constraintTop_toBottomOf="@+id/streakRecoveryImage"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -51,7 +50,6 @@
android:layout_height="wrap_content"
tools:text="@string/streak_recovery_modal_text"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="20dp"
app:layout_constraintTop_toBottomOf="@+id/streakRecoveryModalTitle"
/>
Expand All @@ -66,7 +64,6 @@
android:gravity="center_vertical"
android:drawablePadding="6dp"
android:layout_marginTop="20dp"
android:layout_marginStart="20dp"
app:layout_constraintTop_toBottomOf="@+id/streakRecoverySubtitle"
app:layout_constraintStart_toStartOf="parent"
app:drawableStartCompat="@drawable/ic_gems_count"
Expand All @@ -86,16 +83,39 @@
app:layout_constraintStart_toEndOf="@+id/streakRecoveryGemsAmountTextView"
/>

<TextView
android:id="@+id/streakRecoveryFirstTimeBadge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Badge.Green"
android:text="@string/badge_first_time_offer_text"
android:layout_marginStart="8dp"
app:layout_constraintTop_toTopOf="@+id/streakRecoveryGemsTextView"
app:layout_constraintBottom_toBottomOf="@+id/streakRecoveryGemsTextView"
app:layout_constraintStart_toEndOf="@+id/streakRecoveryGemsTextView"
/>

<TextView
android:id="@+id/streakRecoveryNextRecoveryPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@color/color_on_surface_alpha_38"
android:layout_marginTop="20dp"
app:layout_constraintTop_toBottomOf="@+id/streakRecoveryGemsAmountTextView"
app:layout_constraintStart_toStartOf="parent"
tools:text="Then for 25 gems"
/>

<TextView
android:id="@+id/streakRecoveryUndoDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/streak_recovery_modal_warning"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@color/color_on_surface_alpha_38"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="32dp"
app:layout_constraintTop_toBottomOf="@+id/streakRecoveryGemsAmountTextView"
app:layout_constraintTop_toBottomOf="@+id/streakRecoveryNextRecoveryPrice"
/>

<com.google.android.material.button.MaterialButton
Expand All @@ -104,7 +124,6 @@
android:layout_height="wrap_content"
android:text="@string/streak_recovery_modal_restore_streak"
android:layout_marginTop="12dp"
android:layout_marginHorizontal="20dp"
app:layout_constraintTop_toBottomOf="@+id/streakRecoveryUndoDescription"
/>

Expand All @@ -116,7 +135,6 @@
app:strokeColor="@color/color_primary_alpha_38"
android:text="@string/streak_recovery_modal_no_thanks"
android:layout_marginTop="8dp"
android:layout_marginHorizontal="20dp"
app:layout_constraintTop_toBottomOf="@+id/streakRecoveryBuyButton"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_max="@dimen/auth_button_max_width"
android:text="@string/onboarding_title" />
android:text="@string/android_onboarding_title" />

<TextView
android:id="@+id/welcomeDescriptionTextView"
Expand Down
3 changes: 0 additions & 3 deletions androidHyperskillApp/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<!-- App name -->
<string name="app_name">My Hyperskill</string>

<string name="loading">Loading</string>
<string name="loading_message">Please wait…</string>
<string name="internet_problem">Oops! It seems like the network error.</string>
Expand Down
4 changes: 2 additions & 2 deletions gradle/app.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
minSdk = '24'
targetSdk = '33'
compileSdk = '33'
versionName = '1.48'
versionCode = '296'
versionName = '1.49'
versionCode = '305'
4 changes: 2 additions & 2 deletions iosHyperskillApp/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleVersion</key>
<string>298</string>
<string>306</string>
<key>CFBundleShortVersionString</key>
<string>1.48</string>
<string>1.49</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleExecutable</key>
Expand Down
2 changes: 1 addition & 1 deletion iosHyperskillApp/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ platform :ios do
load_app_store_connect_api_token
end

# sync_device_info()
sync_device_info()
match_adhoc()

# Disable automatic code signing -> build -> enable again
Expand Down
9 changes: 1 addition & 8 deletions iosHyperskillApp/fastlane/metadata/en-US/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
In the new version of My Hyperskill:
• Added a retry button for problems
• Updated appearance of the daily study reminders time picker on the Profile screen
• Authorization session forwarding on continuing in the Web-Version
• Meet hints for problems. On the Problem screen, you will see "See hint" button, tap on it to see hints.
• Bug fixes and improvements using your feedback

We are working hard to bring even more Hyperskill features to your mobile phone. Currently, My Hyperskill app is in beta, so we would love to hear any feedback from you. Feel free to contact us at hello@hyperskill.org and share your thoughts!
Bug fixes, minor improvements, and more.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 0f3e822

Please sign in to comment.