Skip to content

Commit

Permalink
Merge pull request #1159 from hyperskill/release/1.69
Browse files Browse the repository at this point in the history
Release 1.69
  • Loading branch information
ivan-magda authored Aug 28, 2024
2 parents 6b458e6 + 2d82dcb commit ac33a4b
Show file tree
Hide file tree
Showing 40 changed files with 1,175 additions and 324 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class SortingOptionAdapterDelegate(
private val onMoveItemClicked: (position: Int, direction: SortingDirection) -> Unit
) : AdapterDelegate<SortingOption, DelegateViewHolder<SortingOption>>() {

companion object {
private const val INACTIVE_ARROW_ALPHA = .38f
}

override fun isForViewType(position: Int, data: SortingOption): Boolean =
true

Expand Down Expand Up @@ -47,10 +51,10 @@ class SortingOptionAdapterDelegate(
stepQuizSortingOption.setText(data.option)

stepQuizSortingOptionUp.isEnabled = data.isEnabled && adapterPosition != 0
stepQuizSortingOptionUp.alpha = if (stepQuizSortingOptionUp.isEnabled) 1f else 0.2f
stepQuizSortingOptionUp.alpha = if (stepQuizSortingOptionUp.isEnabled) 1f else INACTIVE_ARROW_ALPHA

stepQuizSortingOptionDown.isEnabled = data.isEnabled && adapterPosition + 1 != adapter.items.size
stepQuizSortingOptionDown.alpha = if (stepQuizSortingOptionDown.isEnabled) 1f else 0.2f
stepQuizSortingOptionDown.alpha = if (stepQuizSortingOptionDown.isEnabled) 1f else INACTIVE_ARROW_ALPHA

val elevation =
if (data.isEnabled) context.resources.getDimension(R.dimen.step_quiz_sorting_item_elevation) else 0f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class TableSelectionItemAdapterDelegate(
) : AdapterDelegate<TableSelectionItem, DelegateViewHolder<TableSelectionItem>>() {
companion object {
private const val SEPARATOR = ", "
private const val INACTIVE_ARROW_ALPHA = .38f
}

override fun isForViewType(position: Int, data: TableSelectionItem): Boolean =
Expand Down Expand Up @@ -50,7 +51,7 @@ class TableSelectionItemAdapterDelegate(

override fun onBind(data: TableSelectionItem) {
viewOverlay.isEnabled = data.isEnabled
stepQuizTableChevron.alpha = if (data.isEnabled) 1f else 0.2f
stepQuizTableChevron.alpha = if (data.isEnabled) 1f else INACTIVE_ARROW_ALPHA
stepQuizTableTitle.setText(data.titleText)
val selectedChoices = data.tableChoices.filter { it.answer }

Expand Down
12 changes: 12 additions & 0 deletions androidHyperskillApp/src/main/res/drawable/ic_sorting_down.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="17dp"
android:viewportWidth="24"
android:viewportHeight="17">
<path
android:pathData="M3,3.243L12.243,12.485L21.485,3.243"
android:strokeWidth="5"
android:fillColor="#00000000"
android:strokeColor="@color/color_primary"
android:strokeLineCap="round"/>
</vector>
12 changes: 12 additions & 0 deletions androidHyperskillApp/src/main/res/drawable/ic_sorting_up.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M21.485,15.243L12.243,6L3,15.243"
android:strokeWidth="5"
android:fillColor="#00000000"
android:strokeColor="@color/color_primary"
android:strokeLineCap="round"/>
</vector>
12 changes: 12 additions & 0 deletions androidHyperskillApp/src/main/res/drawable/ic_table_arrow.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="25dp"
android:viewportWidth="24"
android:viewportHeight="25">
<path
android:pathData="M7,3.029L16.243,12.272L7,21.514"
android:strokeWidth="5"
android:fillColor="#00000000"
android:strokeColor="@color/color_primary"
android:strokeLineCap="round"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@

app:layout_constraintVertical_chainStyle="packed"

app:tint="?colorControlNormal"
app:srcCompat="@drawable/ic_arrow_top" />
app:srcCompat="@drawable/ic_sorting_up" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/stepQuizSortingOptionDown"
Expand All @@ -81,8 +80,7 @@

app:layout_constraintVertical_chainStyle="packed"

app:tint="?colorControlNormal"
app:srcCompat="@drawable/ic_arrow_bottom" />
app:srcCompat="@drawable/ic_sorting_down" />

</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@

app:layout_constraintVertical_chainStyle="packed"

app:srcCompat="@drawable/ic_chevron_forward"
app:tint="?colorControlNormal" />
app:srcCompat="@drawable/ic_table_arrow" />

<View
android:id="@+id/viewOverlay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
android:id="@+id/stepQuizDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/color_on_surface_alpha_38"
android:textSize="12sp"
style="@style/TextAppearance.AppCompat.Title"
android:textColor="@color/color_on_surface"
android:textSize="17sp"
tools:text="@string/step_quiz_code_write_program_text"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
9 changes: 6 additions & 3 deletions config/detekt/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<ID>CyclomaticComplexMethod:StepQuizActionDispatcher.kt$StepQuizActionDispatcher$override suspend fun doSuspendableAction(action: Action)</ID>
<ID>CyclomaticComplexMethod:StepQuizCodeBlanksReducer.kt$StepQuizCodeBlanksReducer$private fun handleDeleteButtonClicked( state: State ): StepQuizCodeBlanksReducerResult?</ID>
<ID>CyclomaticComplexMethod:StepQuizCodeBlanksReducer.kt$StepQuizCodeBlanksReducer$private fun handleSuggestionClicked( state: State, message: Message.SuggestionClicked ): StepQuizCodeBlanksReducerResult?</ID>
<ID>CyclomaticComplexMethod:StepQuizCodeBlanksViewStateMapper.kt$StepQuizCodeBlanksViewStateMapper$private fun mapContentState( state: StepQuizCodeBlanksFeature.State.Content ): StepQuizCodeBlanksViewState.Content</ID>
<ID>CyclomaticComplexMethod:StepQuizHintsReducer.kt$StepQuizHintsReducer$override fun reduce(state: State, message: Message): StepQuizHintsReducerResult</ID>
<ID>CyclomaticComplexMethod:StepQuizReducer.kt$StepQuizReducer$override fun reduce(state: State, message: Message): StepQuizReducerResult</ID>
<ID>CyclomaticComplexMethod:StepQuizReplyValidator.kt$StepQuizReplyValidator$fun validate(dataset: Dataset?, reply: Reply, stepBlockName: String): ReplyValidationResult</ID>
Expand Down Expand Up @@ -67,7 +68,9 @@
<ID>LongMethod:ProfileBadges.kt$@Composable fun ProfileBadges( viewState: BadgesViewState, windowWidthSizeClass: WindowWidthSizeClass, onBadgeClick: (BadgeKind) -&gt; Unit, onExpandButtonClick: (ProfileFeature.Message.BadgesVisibilityButton) -&gt; Unit, modifier: Modifier = Modifier )</ID>
<ID>LongMethod:ProfileSettingsDialogFragment.kt$ProfileSettingsDialogFragment$override fun onViewCreated(view: View, savedInstanceState: Bundle?)</ID>
<ID>LongMethod:StepQuizCodeBlanksReducer.kt$StepQuizCodeBlanksReducer$private fun handleDeleteButtonClicked( state: State ): StepQuizCodeBlanksReducerResult?</ID>
<ID>LongMethod:StepQuizCodeBlanksReducer.kt$StepQuizCodeBlanksReducer$private fun handleSpaceButtonClicked( state: State ): StepQuizCodeBlanksReducerResult?</ID>
<ID>LongMethod:StepQuizCodeBlanksReducer.kt$StepQuizCodeBlanksReducer$private fun handleSuggestionClicked( state: State, message: Message.SuggestionClicked ): StepQuizCodeBlanksReducerResult?</ID>
<ID>LongMethod:StepQuizCodeBlanksViewStateMapper.kt$StepQuizCodeBlanksViewStateMapper$private fun mapContentState( state: StepQuizCodeBlanksFeature.State.Content ): StepQuizCodeBlanksViewState.Content</ID>
<ID>LongMethod:StreakFreezeDialogFragment.kt$StreakFreezeDialogFragment$override fun onViewCreated(view: View, savedInstanceState: Bundle?)</ID>
<ID>LongMethod:TrackProgressContent.kt$@Composable fun TrackProgressContent( viewState: ProgressScreenViewState.TrackProgressViewState.Content, onNewMessage: (ProgressScreenFeature.Message) -&gt; Unit, modifier: Modifier = Modifier )</ID>
<ID>LongParameterList:AppInteractor.kt$AppInteractor$( private val appRepository: AppRepository, private val authInteractor: AuthInteractor, private val currentProfileStateRepository: CurrentProfileStateRepository, private val userStorageInteractor: UserStorageInteractor, private val analyticInteractor: AnalyticInteractor, private val progressesRepository: ProgressesRepository, private val trackRepository: TrackRepository, private val providersRepository: ProvidersRepository, private val projectsRepository: ProjectsRepository, private val shareStreakRepository: ShareStreakRepository, private val pushNotificationsInteractor: PushNotificationsInteractor )</ID>
Expand Down Expand Up @@ -116,7 +119,6 @@
<ID>MagicNumber:LeaderboardSkeletonItem.kt$5</ID>
<ID>MagicNumber:LinearProgressIndicator.kt$2</ID>
<ID>MagicNumber:LoadingView.kt$LoadingView$2</ID>
<ID>MagicNumber:MatchingItemOptionAdapterDelegate.kt$MatchingItemOptionAdapterDelegate.ViewHolder$0.2f</ID>
<ID>MagicNumber:NotificationCacheDataSourceImpl.kt$NotificationCacheDataSourceImpl$10</ID>
<ID>MagicNumber:NotificationCacheDataSourceImpl.kt$NotificationCacheDataSourceImpl$11</ID>
<ID>MagicNumber:NotificationCacheDataSourceImpl.kt$NotificationCacheDataSourceImpl$12</ID>
Expand Down Expand Up @@ -149,15 +151,14 @@
<ID>MagicNumber:SharedDateFormatter.kt$SharedDateFormatter$3</ID>
<ID>MagicNumber:SharedDateFormatter.kt$SharedDateFormatter$60</ID>
<ID>MagicNumber:SharedDateFormatter.kt$SharedDateFormatter$9</ID>
<ID>MagicNumber:SortingOptionAdapterDelegate.kt$SortingOptionAdapterDelegate.ViewHolder$0.2f</ID>
<ID>MagicNumber:StepDelegate.kt$StepDelegate$10</ID>
<ID>MagicNumber:StepDelegate.kt$StepDelegate$100</ID>
<ID>MagicNumber:StepDelegate.kt$StepDelegate$25</ID>
<ID>MagicNumber:StepDelegate.kt$StepDelegate$5</ID>
<ID>MagicNumber:StepDelegate.kt$StepDelegate$50</ID>
<ID>MagicNumber:StepQuizCodeBlanksReducer.kt$StepQuizCodeBlanksReducer$47580L</ID>
<ID>MagicNumber:StudyPlanActivityAdapterDelegate.kt$StudyPlanActivityAdapterDelegate.ViewHolder$100f</ID>
<ID>MagicNumber:SubscriptionSyncLoading.kt$0.5f</ID>
<ID>MagicNumber:TableSelectionItemAdapterDelegate.kt$TableSelectionItemAdapterDelegate.ViewHolder$0.2f</ID>
<ID>MagicNumber:TimeIntervalPickerDialogFragment.kt$TimeIntervalPickerDialogFragment$50f</ID>
<ID>MagicNumber:TimeIntervalUtil.kt$TimeIntervalUtil$24</ID>
<ID>MagicNumber:ToolbarTrackProgressView.kt$ToolbarTrackProgressView$2</ID>
Expand Down Expand Up @@ -202,6 +203,7 @@
<ID>ModifierReused:LeaderboardPlaceInfo.kt$Row( modifier = modifier, horizontalArrangement = Arrangement.SpaceBetween ) { Text( text = placeNumber.toString(), style = MaterialTheme.typography.body2, color = colorResource(id = R.color.color_on_surface_alpha_60), modifier = Modifier.align(Alignment.CenterVertically) ) if (placeNumber in 1..3) { Image( painter = painterResource( id = when (placeNumber) { 1 -&gt; org.hyperskill.app.android.R.drawable.ic_leaderboard_first_place 2 -&gt; org.hyperskill.app.android.R.drawable.ic_leaderboard_second_place 3 -&gt; org.hyperskill.app.android.R.drawable.ic_leaderboard_third_place else -&gt; error("Place icon should not be visible for the place number $placeNumber") } ), contentDescription = null, modifier = modifier .requiredSize(24.dp) .align(Alignment.CenterVertically) ) } }</ID>
<ID>ModifierWithoutDefault:BadgeImage.kt$modifier</ID>
<ID>NestedBlockDepth:AuthSocialWebViewClient.kt$AuthSocialWebViewClient$override fun shouldOverrideUrlLoading( view: WebView?, request: WebResourceRequest? ): Boolean</ID>
<ID>NestedBlockDepth:StepQuizCodeBlanksReducer.kt$StepQuizCodeBlanksReducer$private fun setCodeBlockIsActive(codeBlock: CodeBlock, isActive: Boolean): CodeBlock</ID>
<ID>PreviewPublic:BadgeCard.kt$BadgeCardPreview</ID>
<ID>PreviewPublic:BadgeCard.kt$LastLevelBadgeCardPreview</ID>
<ID>PreviewPublic:BadgeGrid.kt$PhoneBadgeGridPreview</ID>
Expand Down Expand Up @@ -247,6 +249,7 @@
<ID>ReturnCount:SharedDateFormatter.kt$SharedDateFormatter$fun formatTimeDistance(millis: Long): String</ID>
<ID>ReturnCount:StateExtentions.kt$internal fun ChallengeWidgetFeature.State.Content.setCurrentChallengeIntervalProgressAsCompleted(): Challenge?</ID>
<ID>ReturnCount:StepQuizCodeBlanksReducer.kt$StepQuizCodeBlanksReducer$private fun handleDeleteButtonClicked( state: State ): StepQuizCodeBlanksReducerResult?</ID>
<ID>ReturnCount:StepQuizCodeBlanksReducer.kt$StepQuizCodeBlanksReducer$private fun handleSpaceButtonClicked( state: State ): StepQuizCodeBlanksReducerResult?</ID>
<ID>ReturnCount:StepQuizCodeBlanksReducer.kt$StepQuizCodeBlanksReducer$private fun handleSuggestionClicked( state: State, message: Message.SuggestionClicked ): StepQuizCodeBlanksReducerResult?</ID>
<ID>ReturnCount:StepQuizHintsInteractor.kt$StepQuizHintsInteractor$suspend fun getLastSeenHint(stepId: Long): Comment?</ID>
<ID>ReturnCount:StepQuizHintsInteractor.kt$StepQuizHintsInteractor$suspend fun getNotSeenHintsIds(stepId: Long): List&lt;Long&gt;</ID>
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 = '34'
compileSdk = '34'
versionName = '1.68'
versionCode = '527'
versionName = '1.69'
versionCode = '534'
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>556</string>
<string>562</string>
<key>CFBundleShortVersionString</key>
<string>1.68.1</string>
<string>1.69</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleExecutable</key>
Expand Down
Loading

0 comments on commit ac33a4b

Please sign in to comment.