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

[UI] 미션 생성 과정 UX 개선 #210

Merged
merged 6 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions app/src/main/java/com/lgtm/android/di/NavigatorModule.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.lgtm.android.di

import com.lgtm.android.common_ui.navigator.FakeLgtmNavigator
import com.lgtm.android.navigator.LgtmNavigator
import com.lgtm.android.common_ui.navigator.LgtmNavigator
import com.lgtm.android.navigator.LgtmNavigatorImpl
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
Expand All @@ -13,7 +13,7 @@ import dagger.hilt.components.SingletonComponent
interface NavigatorModule {
@Binds
fun bindsLgtmNavigator(
lgtmNavigator: LgtmNavigator
): FakeLgtmNavigator
lgtmNavigatorImpl: LgtmNavigatorImpl,
): LgtmNavigator

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package com.lgtm.android.navigator

import android.content.Context
import android.content.Intent
import android.net.Uri
import com.lgtm.android.auth.ui.SignInActivity
import com.lgtm.android.common_ui.navigator.FakeLgtmNavigator
import com.lgtm.android.common_ui.navigator.LgtmNavigator
import com.lgtm.android.create_mission.CreateMissionActivity
import com.lgtm.android.main.MainActivity
import com.lgtm.android.main.notification.NotificationCenterActivity
Expand All @@ -14,8 +15,8 @@ import com.lgtm.android.mission_recommendation.ui.SuggestionDashboardActivity
import com.lgtm.android.profile.ProfileActivity
import javax.inject.Inject

class LgtmNavigator @Inject constructor(
) : FakeLgtmNavigator {
class LgtmNavigatorImpl @Inject constructor(
) : LgtmNavigator {
override fun navigateToSignIn(context: Context) {
val intent = Intent(context, SignInActivity::class.java)
context.startActivity(intent)
Expand Down Expand Up @@ -68,4 +69,12 @@ class LgtmNavigator @Inject constructor(
val intent = Intent(context, SuggestionDashboardActivity::class.java)
context.startActivity(intent)
}

override fun openUrlInBrowser(context: Context, url: String) {
val intent = Intent(Intent.ACTION_VIEW).apply {
data = Uri.parse(url)
flags = Intent.FLAG_ACTIVITY_NEW_TASK
}
context.startActivity(intent)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import androidx.annotation.LayoutRes
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import com.lgtm.android.common_ui.navigator.FakeLgtmNavigator
import com.lgtm.android.common_ui.navigator.LgtmInjector
import com.lgtm.android.common_ui.navigator.LgtmNavigator
import dagger.hilt.android.EntryPointAccessors

abstract class BaseActivity<T : ViewDataBinding>(
Expand All @@ -16,7 +16,7 @@ abstract class BaseActivity<T : ViewDataBinding>(
protected lateinit var binding: T
var viewModel: BaseViewModel? = null

val lgtmNavigator: FakeLgtmNavigator by lazy {
val lgtmNavigator: LgtmNavigator by lazy {
EntryPointAccessors.fromActivity(
this, LgtmInjector.LgtmNavigatorInjector::class.java
).lgtmNavigator()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import androidx.annotation.LayoutRes
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import androidx.fragment.app.Fragment
import com.lgtm.android.common_ui.navigator.FakeLgtmNavigator
import com.lgtm.android.common_ui.navigator.LgtmInjector
import com.lgtm.android.common_ui.navigator.LgtmNavigator
import com.lgtm.android.common_ui.util.KeyboardUtil
import dagger.hilt.android.EntryPointAccessors

Expand All @@ -25,7 +25,7 @@ abstract class BaseFragment<T : ViewDataBinding>(

lateinit var viewModel: BaseViewModel

val lgtmNavigator: FakeLgtmNavigator by lazy {
val lgtmNavigator: LgtmNavigator by lazy {
EntryPointAccessors.fromActivity(
requireActivity(), LgtmInjector.LgtmNavigatorInjector::class.java
).lgtmNavigator()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ sealed interface LgtmInjector {
@EntryPoint
@InstallIn(ActivityComponent::class)
interface LgtmNavigatorInjector {
fun lgtmNavigator(): FakeLgtmNavigator
fun lgtmNavigator(): LgtmNavigator
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.lgtm.android.common_ui.navigator

import android.content.Context

interface FakeLgtmNavigator {
interface LgtmNavigator {
fun navigateToSignIn(context: Context)

fun navigateToMain(context: Context)
Expand All @@ -20,4 +20,6 @@ interface FakeLgtmNavigator {
fun navigateToNotificationCenter(context: Context)

fun navigateToRecommendationDashboard(context: Context)
}

fun openUrlInBrowser(context: Context, url: String)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white" />
<stroke
android:width="1dp"
android:color="@color/gray_3" />
<corners android:radius="100dp" />
</shape>
17 changes: 11 additions & 6 deletions common-ui/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@
<string name="need_service_terms_agree">서비스 이용을 위해\n이용약관 동의가 필요합니다.</string>
<string name="login_by_github">Github로 로그인</string>
<string name="nickname_description_main">사용하실 닉네임을\n입력하세요.</string>
<string name="nickname_description_sub">닉네임은 나중에 다시 수정할 수 있습니다.</string>
<string name="nickname_description_sub">닉네임은 내 프로필에서 수정할 수 있습니다.</string>
<string name="introduction_description">프로필에 표시되는 자기소개입니다.</string>
<string name="enter_nickname">닉네임을 입력하세요.</string>
<string name="dash">/</string>
<string name="welcome">님, 환영합니다!</string>
<string name="select_tech_stack">사용하고 있는 기술 스택을\n선택하세요.</string>
<string name="which_role_to_signup">어떤 회원으로 가입하나요?</string>
<string name="choose_role">역할을 골라주세요.</string>
<string name="reviewee">리뷰이</string>
<string name="want_to_learn_develop">개발을 배우고 싶어요.</string>
<string name="choose_role_reviewee_description">미션에 참여하고 코드 리뷰를 받아요.</string>
<string name="reviewer">리뷰어</string>
<string name="want_to_teach_develop">개발을 알려주고 싶어요.</string>
<string name="choose_role_reviewer_description">미션을 출제하고 코드 리뷰를 제공해요.</string>
<string name="select_affiliation">현재 소속을\n선택해주세요.</string>
<string name="high_school_student">고등학생</string>
<string name="undergraduate">대학생</string>
<string name="graduate">대학교 졸업</string>
<string name="office_workers">직장인</string>
<string name="enter_real_name">실명을 입력하세요.</string>
<string name="later_used_by_name_verification">추후에 입금자명 확인에 사용됩니다.</string>
<string name="later_used_by_name_verification">추후에 입금자명 확인에만 사용됩니다.</string>
<string name="signup_complete">회원가입 완료</string>
<string name="enter_company_name">재직중인 회사명을\n입력해주세요.</string>
<string name="enter_position">직책을 입력해주세요.</string>
Expand All @@ -38,7 +39,7 @@
<string name="only_number_allowed">숫자만 사용할 수 있습니다.</string>
<string name="month">개월</string>
<string name="enter_bank_account_num_title">계좌번호를 입력해주세요.</string>
<string name="enter_bank_account_num_description">리뷰 비용이 입금될 계좌입니다.</string>
<string name="enter_bank_account_num_description">리뷰이에게 제공되는 계좌 정보입니다.\n입력한 계좌로 리뷰 비용이 입금됩니다.</string>
<string name="enter_bank_account">계좌번호를 입력하세요</string>
<string name="select_bank">은행을 선택하세요.</string>
<string name="cannot_use_space">띄어쓰기는 사용할 수 없습니다.</string>
Expand All @@ -62,9 +63,11 @@
<!-- 미션 작성 -->
<string name="enter_mission_title">미션 제목을 입력하세요.</string>
<string name="enter_mission_repo_url">미션 레포지토리 URL을 입력하세요.</string>
<string name="enter_mission_repo_url_description">미션 기반 코드리뷰인 경우만 미션 설명 URL을 제출해주세요. 자유로운 코드 리뷰이면 비워주세요.</string>
<string name="github_url_only">전체공개된 github URL만 입력할 수 있습니다.</string>
<string name="see_create_mission_guide">미션 생성 가이드 보기</string>
<string name="which_stack_to_use">어떤 스택을 사용하시나요?</string>
<string name="choose_over_one">한 개 이상 선택하세요.</string>
<string name="choose_tech_stack_description">미션에서 사용되는 기술 스택을 선택하세요. 자유로운 코드 리뷰 시 본인이 리뷰 가능한 기술 스택을 선택하세요.</string>
<string name="what_kind_of_mission">어떤 미션인가요?</string>
<string name="mission_description_example">ex) 미션 소개, 구현 요구 사항, 배울 수 있는 것</string>
<string name="recommend_group">이런 사람에게 추천해요.</string>
Expand All @@ -81,6 +84,8 @@
<string name="optional">*선택</string>
<string name="complete">완료</string>
<string name="until_when_should_you_recruit_reviewers">언제까지 리뷰이를 모집할까요?</string>
<string name="automatically_close_when_recruit_finished">정원이 차면 자동으로 모집이 마감됩니다.</string>
<string name="price_per_reviewee">리뷰이 한 명당 받을 가격입니다.</string>

<!-- 서비스 준비 중 -->
<string name="service_under_preparation">서비스 준비중입니다.</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.lgtm.android.auth.ui.signup.common

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.View
import androidx.fragment.app.activityViewModels
Expand Down Expand Up @@ -48,11 +46,11 @@ class TermsFragment : BaseFragment<FragmentTermsBinding>(R.layout.fragment_terms
private fun setUpTextViewListener() {
binding.tvTermsService.setOnThrottleClickListener {
shotTermsServiceClickLogging()
openUrlInBrowser(TERMS_SERVICE_URL)
lgtmNavigator.openUrlInBrowser(requireContext(), TERMS_SERVICE_URL)
}
binding.tvTermsPrivacy.setOnThrottleClickListener {
shotTermsPrivacyClickLogging()
openUrlInBrowser(TERMS_PRIVACY_URL)
lgtmNavigator.openUrlInBrowser(requireContext(), TERMS_PRIVACY_URL)
}
}

Expand All @@ -72,14 +70,6 @@ class TermsFragment : BaseFragment<FragmentTermsBinding>(R.layout.fragment_terms
signUpViewModel.shotSwmLogging(scheme)
}

private fun openUrlInBrowser(url: String) {
val intent = Intent(Intent.ACTION_VIEW).apply {
data = Uri.parse(url)
flags = Intent.FLAG_ACTIVITY_NEW_TASK
}
startActivity(intent)
}

private fun setupViewModel() {
binding.viewModel = signUpViewModel
}
Expand Down
2 changes: 1 addition & 1 deletion feature/auth/src/main/res/layout/fragment_bank_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
android:layout_width="match_parent"
android:layout_height="42dp"
android:layout_marginHorizontal="24dp"
android:layout_marginTop="57dp"
android:layout_marginTop="36dp"
android:digits="0123456789-"
android:hint="@string/enter_bank_account"
android:maxLength="20"
Expand Down
12 changes: 11 additions & 1 deletion feature/auth/src/main/res/layout/fragment_introduction.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
app:layout_constraintTop_toTopOf="parent"
tools:text="한둘셋넨다여일여아열님을\n한줄로 소개해주세요." />

<TextView
android:id="@+id/tv_introduction_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/introduction_description"
android:textAppearance="@style/Body2"
app:layout_constraintStart_toStartOf="@id/tv_introduction_one_line"
app:layout_constraintTop_toBottomOf="@id/tv_introduction_one_line" />


<com.lgtm.android.common_ui.ui.LGTMEditText
android:id="@+id/et_introduction"
Expand All @@ -41,8 +51,8 @@
android:id="@+id/btn_next"
style="@style/LGTMButtonLightWhiteTheme"
android:layout_width="match_parent"
android:text="@string/next"
android:enabled="@{viewModel.isIntroductionValid, default=false}"
android:text="@string/next"
app:layout_constraintBottom_toBottomOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
Expand Down
2 changes: 1 addition & 1 deletion feature/auth/src/main/res/layout/layout_role_reviewee.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/want_to_learn_develop"
android:text="@string/choose_role_reviewee_description"
android:textAppearance="@style/Body3R"
app:layout_constraintStart_toStartOf="@id/tv_role"
app:layout_constraintTop_toBottomOf="@id/tv_role"
Expand Down
2 changes: 1 addition & 1 deletion feature/auth/src/main/res/layout/layout_role_reviewer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/want_to_teach_develop"
android:text="@string/choose_role_reviewer_description"
android:textAppearance="@style/Body3R"
app:layout_constraintStart_toStartOf="@id/tv_role"
app:layout_constraintTop_toBottomOf="@id/tv_role"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ class CreateMissionStep1Fragment :
onMissionTitleChanged()
onMissionRepoUrlChanged()
setupNextButtonClickListener()
setupMissionGuideClickListener()
}


private fun setupViewModel() {
binding.viewModel = createMissionViewModel
}
Expand Down Expand Up @@ -63,4 +65,19 @@ class CreateMissionStep1Fragment :
(requireActivity() as? CreateMissionActivity)?.setNextPage()
}
}

private fun setupMissionGuideClickListener() {
binding.clCreateMissionGuide.setOnThrottleClickListener {
openCreateMissionGuideNotion()
}
}

private fun openCreateMissionGuideNotion() {
lgtmNavigator.openUrlInBrowser(requireContext(), CREATE_MISSION_GUIDE_NOTION_URL)
}

companion object {
const val CREATE_MISSION_GUIDE_NOTION_URL =
"https://waiting-keyboard-1b3.notion.site/LGTM-Mission-ec7bc4313a7142a1acab3c9cb5fc3d65?pvs=4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@
app:layout_constraintStart_toStartOf="@id/tv_mission_title"
app:layout_constraintTop_toBottomOf="@id/et_mission_title" />

<TextView
android:id="@+id/tv_mission_repo_url_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/base_guideline"
android:layout_marginTop="10dp"
android:text="@string/enter_mission_repo_url_description"
android:textAppearance="@style/Body2"
android:textColor="@color/gray_6"
app:layout_constraintTop_toBottomOf="@id/tv_mission_repo_url" />

<com.lgtm.android.common_ui.ui.LGTMEditText
android:id="@+id/et_mission_repo_url"
android:layout_width="match_parent"
Expand All @@ -65,8 +76,40 @@
android:layout_marginTop="30dp"
android:layout_marginBottom="92dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_mission_repo_url" />
app:layout_constraintTop_toBottomOf="@id/tv_mission_repo_url_description" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_create_mission_guide"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginEnd="@dimen/base_guideline"
android:background="@drawable/rectangle_white_stroke_gray_3_radius_100"
android:padding="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/et_mission_repo_url">

<TextView
android:id="@+id/tv_create_mission_guide"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/see_create_mission_guide"
android:textAppearance="@style/Body3M"
android:textColor="@color/gray_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<androidx.appcompat.widget.AppCompatImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:rotationY="180"
android:src="@drawable/ic_back"
app:layout_constraintBottom_toBottomOf="@id/tv_create_mission_guide"
app:layout_constraintStart_toEndOf="@id/tv_create_mission_guide"
app:layout_constraintTop_toTopOf="@id/tv_create_mission_guide" />

</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@

<TextView
android:id="@+id/tv_choose_over_one"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/base_guideline"
android:layout_marginTop="5dp"
android:text="@string/choose_over_one"
android:text="@string/choose_tech_stack_description"
android:textAppearance="@style/Body2"
android:textColor="@color/gray_6"
app:layout_constraintStart_toStartOf="@id/tv_stack_to_use"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_stack_to_use" />


<com.google.android.material.chip.ChipGroup
android:id="@+id/chip_tech_tag"
android:layout_width="match_parent"
Expand Down
Loading
Loading