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

노드를 이동시킬 때 구조 유지 #330

Merged
merged 47 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
add82bd
release 1.0.1
hegleB Jan 24, 2024
a3e0b7d
chore(#136): JDK 빌드
hegleB Jan 24, 2024
41e102a
chore(#316): keystore, properties 생성
hegleB Jan 24, 2024
aae8e46
chore(#316): google-services.json 생성
hegleB Jan 24, 2024
c31145c
chore(#316): aab 빌드 및 업로드
hegleB Jan 24, 2024
5ca9e61
chore(#316): aab 다운로드
hegleB Jan 24, 2024
229c919
chore(#316): service_account.json 생성
hegleB Jan 24, 2024
9a3f01c
chore(#316): 릴리즈 버전 추출
hegleB Jan 24, 2024
a56131d
chore(#316): google play store 배포
hegleB Jan 24, 2024
4055da8
chore(#316): google-services 설정
hegleB Jan 24, 2024
b3f6763
chore(#316): signingConfigs 설정
hegleB Jan 24, 2024
c8d67a7
release 1.0.1
hegleB Jan 24, 2024
fdc214f
chore(#316): keystore 파일명 변경
hegleB Jan 24, 2024
06192d5
release 1.0.1
hegleB Jan 24, 2024
26206fd
refactor: 프로필 UI 상태 관리를 위한 파라미터 타입 변경
hegleB Feb 17, 2024
7df9dd4
refactor: ProfileContent 파라미터 수정
hegleB Feb 17, 2024
593eae4
refactor: Scaffold에 topBar 추가
hegleB Feb 17, 2024
f1c10ab
refactor: Compose의 ProfileContent 메서드를 통한 프로필 관련 기능 관리
hegleB Feb 17, 2024
df92c53
feat(#327): Preview 컴포저블 함수 추가
hegleB Mar 9, 2024
b9029e7
feat(#327): Custom Button 컴포저블 추가
hegleB Mar 9, 2024
3977784
feat(#327): BackIconButton 컴포저블 추가
hegleB Mar 9, 2024
ffcadfc
feat(#327): MenuIconButton 컴포저블 추가
hegleB Mar 9, 2024
1da17c0
feat(#327): CircleAddIconButton 컴포저블 추가
hegleB Mar 9, 2024
1720595
feat(#327): CopyIconButton 컴포저블 추가
hegleB Mar 9, 2024
e1c03d8
feat(#327): RemoveconButton 컴포저블 추가
hegleB Mar 9, 2024
fe9d9c0
feat(#327): RefreshconButton 컴포저블 추가
hegleB Mar 9, 2024
ab02c2b
feat(#327): EditIconButton 컴포저블 추가
hegleB Mar 9, 2024
ab8880c
feat(#327): FoldIconButton 컴포저블 추가
hegleB Mar 9, 2024
caf0f60
feat(#327): RestoreIconButton 컴포저블 추가
hegleB Mar 9, 2024
ae45f7b
feat(#327): RecycleBinRestoreFloatingButton 컴포저블 추가
hegleB Mar 9, 2024
8730f29
feat(#327): RefreshFloatingButton 컴포저블 추가
hegleB Mar 9, 2024
f98259f
refactor(#327): BackIconButton Composable로 수정
hegleB Mar 9, 2024
8ed324e
refactor(#327): EditIconButton Composable로 수정
hegleB Mar 9, 2024
83839ec
refactor(#327): MSButton Composable로 수정
hegleB Mar 9, 2024
91631d9
feat(#328): rootNode에 따라 위치 조정하고 tree rootNode 설정
hegleB Mar 28, 2024
e161489
feat(#328): 선택한 노드와 자식들이 구조 유지하며 이동
hegleB Mar 28, 2024
8b15274
feat(#328): 움직임 모드에서 선택된 노드와 부모 노드 간의 연결선 해제
hegleB Mar 28, 2024
67cb911
refactor(#328): uiMode에 따른 line paint 함수 분리
hegleB Mar 28, 2024
c1e97d3
refactor(#328): path 생성 함수 분리
hegleB Mar 28, 2024
2b010fe
refactor(#328): 노드 이동 상태 종료 처리 함수 분리
hegleB Mar 28, 2024
35fc001
refactor(#328): 선택된 노드가 다른 노드에 부착되는 함수 분리
hegleB Mar 28, 2024
737ca5a
refactor(#328): 상태 초기화 및 트리 갱신 함수 분리
hegleB Mar 28, 2024
7ba895a
design(#328): 불필요한 undo 버튼 제거
hegleB Mar 28, 2024
8120059
chore(#328): 불필요한 release관련 코드 제거
hegleB Mar 29, 2024
07f3e8b
refactor(#328): traverseMovedNode 메서드에 있는 arrageNode를 moveNode 메서드로 변경
hegleB Mar 29, 2024
75a356c
refactor: ktlint 적용
hegleB Apr 6, 2024
a1b3e37
refactor: 불필요한 local.properties inputStream 코드 제거
hegleB Apr 6, 2024
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
77 changes: 77 additions & 0 deletions .github/workflows/AOS-distribute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: AOS-distribute
on:
push:
branches:
- distribute

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 17

- name: Create Properties File
env:
RELEASE_KEYSTORE: ${{ secrets.KEY_STORE_BASE_64 }}
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: |
echo "$RELEASE_KEYSTORE" | base64 -d > AOS/app/release.keystore
echo "$KEYSTORE_PROPERTIES" > AOS/keystore.properties
echo "$LOCAL_PROPERTIES" > AOS/local.properties

- name: Create google-services.json
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > AOS/app/google-services.json

- name: Build Release AAB
run: ./gradlew bundleRelease
working-directory: ./AOS

- name: Upload AAB
uses: actions/upload-artifact@v2
with:
name: app-release.aab
path: AOS/app/build/outputs/bundle/release/app-release.aab

deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download AAB
uses: actions/download-artifact@v2
with:
name: app-release.aab
path: AOS/app/build/outputs/bundle/release/

- name: Create service_account.json
run: echo '${{ secrets.GOOGLE_PLAY_STORE_SERVICE_ACCOUT }}' > service_account.json

- name: Extract Release Version
run: echo "##[set-output name=version;]$(echo '${{ github.event.head_commit.message }}' | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')"
id: extract_version_name

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.extract_version_name.outputs.version }}
release_name: ${{ steps.extract_version_name.outputs.version }}
files: |
AOS/app/build/outputs/bundle/release/app-release.aab

- name: Deploy to Google Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: boostcamp.and07.mindsync
releaseName: ${{ steps.extract_version_name.outputs.version }}
releaseFiles: AOS/app/build/outputs/bundle/release/app-release.aab
track: production
whatsNewDirectory: AOS/whatsNewDirectory
19 changes: 4 additions & 15 deletions AOS/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import java.util.Properties

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("androidx.navigation.safeargs.kotlin")
kotlin("kapt")
id("com.google.dagger.hilt.android")
id("kotlinx-serialization")
id("com.google.gms.google-services")
}

android {
namespace = "boostcamp.and07.mindsync"
compileSdk = 34

val properties = Properties()
properties.load(project.rootProject.file("local.properties").inputStream())
val url = properties["BASE_URL"] ?: ""
val googleServerClientId = properties["GOOGLE_SERVER_CLIENT_ID"] ?: ""
val kakaoClientId = properties["KAKAO_CLIENT_ID"] ?: ""
Expand All @@ -25,24 +22,16 @@ android {
applicationId = "boostcamp.and07.mindsync"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = 8
versionName = "1.0.1"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
buildConfigField("String", "BASE_URL", "$url")
buildConfigField("String", "GOOGLE_SERVER_CLIENT_ID", "$googleServerClientId")
buildConfigField("String", "KAKAO_CLIENT_ID", "$kakaoClientId")
manifestPlaceholders["KAKAO_CLIENT_ID"] = removeQuotationKakaoClientId
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}

buildFeatures {
viewBinding = true
dataBinding = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,39 @@ sealed class Node(
open val path: NodePath,
open val description: String,
open val children: List<String>,
) : java.io.Serializable
) : java.io.Serializable {
abstract fun adjustPosition(
horizontalSpacing: Dp,
totalHeight: Dp,
): Node
}

data class CircleNode(
override val id: String,
override val parentId: String?,
override val path: CirclePath = CirclePath(Dp(0f), Dp(0f), Dp(0f)),
override val description: String,
override val children: List<String>,
) : Node(id, parentId, path, description, children)
) : Node(id, parentId, path, description, children) {
override fun adjustPosition(
horizontalSpacing: Dp,
totalHeight: Dp,
): Node {
return this.copy(path = path.adjustPath(horizontalSpacing, totalHeight))
}
}

data class RectangleNode(
override val id: String,
override val parentId: String,
override val path: RectanglePath = RectanglePath(Dp(0f), Dp(0f), Dp(0f), Dp(0f)),
override val description: String,
override val children: List<String>,
) : Node(id, parentId, path, description, children)
) : Node(id, parentId, path, description, children) {
override fun adjustPosition(
horizontalSpacing: Dp,
totalHeight: Dp,
): Node {
return this.copy(path = path.adjustPath(horizontalSpacing, totalHeight))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@ import boostcamp.and07.mindsync.ui.util.Dp
import kotlinx.serialization.Serializable

@Serializable
sealed class NodePath(open val centerX: Dp, open val centerY: Dp)
sealed class NodePath(open val centerX: Dp, open val centerY: Dp) {
abstract fun adjustPath(
horizontalSpacing: Dp,
totalHeight: Dp,
): NodePath

protected fun calculateNewCenterY(
horizontalSpacing: Dp,
totalHeight: Dp,
): Dp {
return centerY + totalHeight / 2 + horizontalSpacing
}
}

data class RectanglePath(
override val centerX: Dp,
Expand All @@ -19,10 +31,24 @@ data class RectanglePath(
fun rightX() = centerX + (width / (Dp(2f)))

fun bottomY() = centerY + (height / (Dp(2f)))

override fun adjustPath(
horizontalSpacing: Dp,
totalHeight: Dp,
): RectanglePath {
return this.copy(centerY = calculateNewCenterY(horizontalSpacing, totalHeight))
}
}

data class CirclePath(
override val centerX: Dp,
override val centerY: Dp,
val radius: Dp,
) : NodePath(centerX, centerY)
) : NodePath(centerX, centerY) {
override fun adjustPath(
horizontalSpacing: Dp,
totalHeight: Dp,
): CirclePath {
return this.copy(centerY = calculateNewCenterY(horizontalSpacing, totalHeight))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import androidx.activity.compose.setContent
import androidx.compose.runtime.Composable

abstract class BaseComposeActivity : ComponentActivity() {

@Composable
abstract fun Content()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package boostcamp.and07.mindsync.ui.components

import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.tooling.preview.Preview
import boostcamp.and07.mindsync.ui.theme.Gray3

@Composable
fun MSButton(
modifier: Modifier = Modifier,
text: String = "",
onClick: () -> Unit,
textStyle: TextStyle = TextStyle.Default,
backgroundColor: Color = MaterialTheme.colorScheme.primary,
fontColor: Color = Color.Unspecified,
shape: Shape = CircleShape,
disableColor: Color = Gray3,
isEnabled: Boolean = false,
) {
Button(
modifier = modifier,
onClick = onClick,
shape = shape,
colors =
ButtonDefaults.buttonColors(
containerColor = backgroundColor,
disabledContainerColor = disableColor,
),
enabled = isEnabled,
) {
Text(
text = text,
style = textStyle,
color = fontColor,
)
}
}

@Preview
@Composable
fun ButtonPreview() =
MSPreview {
MSButton(
onClick = { },
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package boostcamp.and07.mindsync.ui.components

import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import boostcamp.and07.mindsync.R

@Composable
fun RecycleBinRestoreFloatingButton(
modifier: Modifier = Modifier,
onClick: () -> Unit,
backgroundColor: Color = Color(0xFFD4BFF9),
) {
FloatingActionButton(
modifier = modifier,
onClick = onClick,
containerColor = backgroundColor,
) {
Icon(
painter = painterResource(id = R.drawable.ic_restore_board),
contentDescription = null,
)
}
}

@Composable
fun RefreshFloatingButton(
modifier: Modifier = Modifier,
onClick: () -> Unit,
backgroundColor: Color = Color(0xFFD4BFF9),
) {
FloatingActionButton(
modifier = modifier,
onClick = onClick,
containerColor = backgroundColor,
) {
Icon(
painter = painterResource(id = R.drawable.ic_restore_board),
contentDescription = null,
)
}
}
Loading
Loading