Skip to content

Commit

Permalink
Merge pull request #367 from hyperskill/release/1.10
Browse files Browse the repository at this point in the history
Release 1.10
  • Loading branch information
ivan-magda authored Feb 28, 2023
2 parents e4bf45c + 0352ef0 commit 6ea12f0
Show file tree
Hide file tree
Showing 117 changed files with 983 additions and 413 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ runs:
working-directory: './androidHyperskillApp'

- name: Setup Java JDK
uses: actions/setup-java@v3.6.0
uses: actions/setup-java@v3.10.0
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

# Cache Gradle dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/setup-ios/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ runs:
working-directory: './iosHyperskillApp'

- name: Setup Java JDK
uses: actions/setup-java@v3.6.0
uses: actions/setup-java@v3.10.0
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

# Cache Gradle dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android_beta_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/[email protected]

- name: Gradle Wrapper Validation
uses: gradle/[email protected].5
uses: gradle/[email protected].6

# Build and submit to the Firebase App Distribution
deployment:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android_release_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/[email protected]

- name: Gradle Wrapper Validation
uses: gradle/[email protected].5
uses: gradle/[email protected].6

# Build and submit to the Google Play
deployment:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/gradle_wrapper_validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Gradle Wrapper Validation

on:
push:
branches:
- 'dependabot/github_actions/gradle/wrapper-validation-action-**'
workflow_dispatch:

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

jobs:
gradle-wrapper-validation:
name: Gradle Wrapper Validation
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/[email protected]

- name: Gradle Wrapper Validation
uses: gradle/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/ios_beta_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/[email protected]

- name: Gradle Wrapper Validation
uses: gradle/[email protected].5
uses: gradle/[email protected].6

# Build, archive for ad-hoc and submit to Firebase App Distribution
deployment:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios_release_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/[email protected]

- name: Gradle Wrapper Validation
uses: gradle/[email protected].5
uses: gradle/[email protected].6

# Build, archive for app-store and submit to App Store Connect
deployment:
Expand Down
2 changes: 1 addition & 1 deletion androidHyperskillApp/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"
ruby "3.1.0"

gem "fastlane", "2.211.0"
gem "fastlane", "2.212.0"

eval_gemfile("fastlane/Pluginfile")
20 changes: 10 additions & 10 deletions androidHyperskillApp/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.704.0)
aws-partitions (1.714.0)
aws-sdk-core (3.170.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
Expand All @@ -17,7 +17,7 @@ GEM
aws-sdk-kms (1.62.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.119.0)
aws-sdk-s3 (1.119.1)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
Expand All @@ -36,7 +36,7 @@ GEM
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.98.0)
excon (0.99.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -66,7 +66,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.6)
fastlane (2.211.0)
fastlane (2.212.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -105,11 +105,11 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-firebase_app_distribution (0.4.2)
fastlane-plugin-firebase_app_distribution (0.5.0)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.33.0)
google-apis-androidpublisher_v3 (0.34.0)
google-apis-core (>= 0.9.1, < 2.a)
google-apis-core (0.10.0)
google-apis-core (0.11.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
Expand All @@ -118,8 +118,8 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.16.0)
google-apis-core (>= 0.9.1, < 2.a)
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.12.0)
google-apis-core (>= 0.9.1, < 2.a)
google-apis-storage_v1 (0.19.0)
Expand Down Expand Up @@ -215,7 +215,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
fastlane (= 2.211.0)
fastlane (= 2.212.0)
fastlane-plugin-firebase_app_distribution

RUBY VERSION
Expand Down
2 changes: 1 addition & 1 deletion androidHyperskillApp/fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fastlane_version "2.211.0"
fastlane_version "2.212.0"

default_platform(:android)

Expand Down
12 changes: 6 additions & 6 deletions androidHyperskillApp/fastlane/release-notes.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
What to Test:
1. Debug menu ALTAPPS-510
2. Show code blocks with line numbers in Step text <pre><code ALTAPPS-536
3. Send step view and send context for submissions ALTAPPS-577
4. Fix incorrect 1-day streak freeze state ALTAPPS-594
5. Fix switch environment not applied at application restarting ALTAPPS-615
6. Fix content not loading on Home screen ALTAPPS-616
1. Fix Daily notification won't disappear after going into the app ALTAPPS-514
2. Problem and theory screens improvements ALTAPPS-571
3. Fix Sign in with Google not working ALTAPPS-575
4. Topic completion bottom sheet add continue with next topic button ALTAPPS-600
5. Fix can't enter symbols for number problem ALTAPPS-603
6. Fix different next topics in web and mobile ALTAPPS-609
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ class AuthSocialWebViewFragment :
provider,
networkEndpointConfigInfo
)
it.settings.javaScriptEnabled = true
it.settings.apply {
javaScriptEnabled = true

/**
* Google disable authentication from webView
* Remove "wv" substring (means "webView") from userAgent to be able to login via Google
* */
userAgentString = userAgentString?.replace("wv", "")
}
}
}
webView?.let { binding.containerView.addView(it) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ import org.hyperskill.app.step_quiz_hints.injection.StepQuizHintsComponentImpl
import org.hyperskill.app.streaks.injection.StreakFlowDataComponentImpl
import org.hyperskill.app.streaks.injection.StreaksDataComponent
import org.hyperskill.app.streaks.injection.StreaksDataComponentImpl
import org.hyperskill.app.study_plan.injection.StudyPlanDataComponent
import org.hyperskill.app.study_plan.injection.StudyPlanDataComponentImpl
import org.hyperskill.app.topics.injection.TopicsDataComponent
import org.hyperskill.app.topics.injection.TopicsDataComponentImpl
import org.hyperskill.app.topics_repetitions.injection.PlatformTopicsRepetitionComponent
Expand Down Expand Up @@ -409,4 +411,7 @@ class AndroidAppComponentImpl(

override fun buildStepCompletionComponent(stepRoute: StepRoute): StepCompletionComponent =
StepCompletionComponentImpl(this, stepRoute)

override fun buildStudyPlanDataComponent(): StudyPlanDataComponent =
StudyPlanDataComponentImpl(this)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.lifecycle.ViewModelProvider
import androidx.transition.AutoTransition
import androidx.transition.TransitionManager
import by.kirich1409.viewbindingdelegate.viewBinding
import com.google.android.material.snackbar.Snackbar
import org.hyperskill.app.SharedResources
import org.hyperskill.app.android.HyperskillApp
import org.hyperskill.app.android.R
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class DailyStudyReminderNotificationDelegate(
.setColor(ContextCompat.getColor(context, org.hyperskill.app.R.color.color_primary))
.setContentIntent(pendingIntent)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setAutoCancel(true)

showNotification(NotificationId, notification.build())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.view.ContextThemeWrapper
import androidx.core.view.isVisible
import by.kirich1409.viewbindingdelegate.viewBinding
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
Expand All @@ -22,13 +23,18 @@ class TopicPracticeCompletedBottomSheet : BottomSheetDialogFragment() {
companion object {
const val Tag = "TopicPracticeCompletedBottomSheet"

fun newInstance(title: String): TopicPracticeCompletedBottomSheet =
fun newInstance(
title: String,
isNextStepAvailable: Boolean
): TopicPracticeCompletedBottomSheet =
TopicPracticeCompletedBottomSheet().apply {
this.title = title
this.isNextStepAvailable = isNextStepAvailable
}
}

private var title: String by argument()
private var isNextStepAvailable: Boolean by argument()

private val viewBinding: FragmentTopicPracticeCompletedBinding by viewBinding(FragmentTopicPracticeCompletedBinding::bind)

Expand Down Expand Up @@ -66,9 +72,30 @@ class TopicPracticeCompletedBottomSheet : BottomSheetDialogFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
with(viewBinding) {
completedDailyStepDescriptionTextView.text = title

completedDailyStepGoBackButton.isVisible = isNextStepAvailable
completedDailyStepGoBackButton.setOnClickListener {
dismiss()
onNewMessage(StepCompletionFeature.Message.TopicCompletedModalGoToHomeScreenClicked)
}

completedDailyStepPrimaryButton.setText(
if (isNextStepAvailable) {
org.hyperskill.app.R.string.step_quiz_topic_completed_continue_with_next_topic_button_text
} else {
org.hyperskill.app.R.string.go_to_homescreen
}
)
completedDailyStepPrimaryButton.setOnClickListener {
dismiss()
onNewMessage(
if (isNextStepAvailable) {
StepCompletionFeature.Message.TopicCompletedModalContinueNextTopicClicked
} else {
StepCompletionFeature.Message.TopicCompletedModalGoToHomeScreenClicked
}
)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import by.kirich1409.viewbindingdelegate.viewBinding
import org.hyperskill.app.android.HyperskillApp
import org.hyperskill.app.android.R
import org.hyperskill.app.android.core.extensions.argument
import org.hyperskill.app.android.core.view.ui.dialog.dismissDialogFragmentIfExists
import org.hyperskill.app.android.core.view.ui.fragment.setChildFragment
import org.hyperskill.app.android.core.view.ui.navigation.requireMainRouter
import org.hyperskill.app.android.core.view.ui.navigation.requireRouter
Expand Down Expand Up @@ -96,8 +95,6 @@ class StepFragment :
StepCompletionFeature.Action.ViewAction.NavigateTo.HomeScreen -> {
requireRouter().backTo(MainScreen)
parentFragmentManager.requireMainRouter().switch(HomeScreen)
childFragmentManager
.dismissDialogFragmentIfExists(TopicPracticeCompletedBottomSheet.Tag)
}

is StepCompletionFeature.Action.ViewAction.ReloadStep -> {
Expand All @@ -109,8 +106,15 @@ class StepFragment :
}

is StepCompletionFeature.Action.ViewAction.ShowTopicCompletedModal -> {
TopicPracticeCompletedBottomSheet.newInstance(stepCompletionAction.modalText)
.showIfNotExists(childFragmentManager, TopicPracticeCompletedBottomSheet.Tag)
TopicPracticeCompletedBottomSheet
.newInstance(
stepCompletionAction.modalText,
stepCompletionAction.isNextStepAvailable
)
.showIfNotExists(
childFragmentManager,
TopicPracticeCompletedBottomSheet.Tag
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.view.View
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import by.kirich1409.viewbindingdelegate.viewBinding
import org.hyperskill.app.android.HyperskillApp
import org.hyperskill.app.android.R
import org.hyperskill.app.android.core.extensions.argument
import org.hyperskill.app.android.core.view.ui.fragment.setChildFragment
Expand All @@ -18,7 +17,6 @@ import org.hyperskill.app.android.step_quiz.view.factory.StepQuizFragmentFactory
import org.hyperskill.app.android.step_quiz_hints.fragment.StepQuizHintsFragment
import org.hyperskill.app.step.domain.model.Step
import org.hyperskill.app.step.domain.model.StepRoute
import org.hyperskill.app.step_quiz.view.mapper.StepQuizStatsTextMapper
import org.hyperskill.app.step_quiz_hints.presentation.StepQuizHintsFeature

class StepPracticeFragment : Fragment(R.layout.fragment_step_practice), StepCompletionView {
Expand All @@ -34,18 +32,11 @@ class StepPracticeFragment : Fragment(R.layout.fragment_step_practice), StepComp
}
}

private var stepQuizStatsTextMapper: StepQuizStatsTextMapper? = null

private val viewBinding: FragmentStepPracticeBinding by viewBinding(FragmentStepPracticeBinding::bind)

private var step: Step by argument(serializer = Step.serializer())
private var stepRoute: StepRoute by argument(serializer = StepRoute.serializer())

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
injectComponent()
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
with(viewBinding.stepPracticeAppBar.stepQuizToolbar) {
Expand All @@ -62,21 +53,11 @@ class StepPracticeFragment : Fragment(R.layout.fragment_step_practice), StepComp
}
stepQuizToolbarTitle.text = step.title
}
with(viewBinding.stepPracticeCompletion) {
val stepQuizStats =
stepQuizStatsTextMapper?.getFormattedStepQuizStats(step.solvedBy, step.millisSinceLastCompleted)
this.text = stepQuizStats
isVisible = stepQuizStats != null
}
initStepTheoryFragment(step)
setStepQuizFragment(step, stepRoute)
setStepHintsFragment(step)
}

private fun injectComponent() {
stepQuizStatsTextMapper = StepQuizStatsTextMapper(HyperskillApp.graph().commonComponent.resourceProvider)
}

private fun initStepTheoryFragment(step: Step) {
setChildFragment(R.id.stepTheoryContainer, STEP_CONTENT_FRAGMENT_TAG) {
TextStepContentFragment.newInstance(step)
Expand Down
Loading

0 comments on commit 6ea12f0

Please sign in to comment.