Skip to content

Commit

Permalink
Merge branch 'dev' into feature/DesignSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
syss220211 authored Jun 18, 2024
2 parents e0a195a + 1698f76 commit dbba07b
Show file tree
Hide file tree
Showing 40 changed files with 1,812 additions and 25 deletions.
10 changes: 5 additions & 5 deletions .github/issue-branch.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
branchName: short
branches:
- label: '*'
prefix: feature/
autoCloseIssue: true
# branchName: short
# branches:
# - label: '*'
# prefix: feature/
# autoCloseIssue: true
28 changes: 14 additions & 14 deletions .github/workflows/create_branch.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Create Issue Branch
on:
issues:
types: [ assigned ]
# name: Create Issue Branch
# on:
# issues:
# types: [ assigned ]

jobs:
create_issue_branch_job:
runs-on: ubuntu-latest
steps:
- name: Create Branch From Issue
uses: robvanderleek/create-issue-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Echo branch name
run: echo ${{ steps.Create_Issue_Branch.outputs.branchName }}
# jobs:
# create_issue_branch_job:
# runs-on: ubuntu-latest
# steps:
# - name: Create Branch From Issue
# uses: robvanderleek/create-issue-branch@main
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Echo branch name
# run: echo ${{ steps.Create_Issue_Branch.outputs.branchName }}
6 changes: 3 additions & 3 deletions Projects/App/Sources/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import DesignSystem

struct ContentView: View {
var body: some View {
Text("Hello, World!")
.applyFont(font: .heading1)
Text("Hello, World!")
RouterView {
TabbarMainView()
}
}
}

Expand Down
15 changes: 15 additions & 0 deletions Projects/App/Sources/Extension/Common.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Common.swift
// App
//
// Created by 박서연 on 2024/06/08.
// Copyright © 2024 iOS. All rights reserved.
//

import Foundation
import SwiftUI

struct Size {
static let width = UIScreen.main.bounds.width
static let height = UIScreen.main.bounds.height
}
32 changes: 32 additions & 0 deletions Projects/App/Sources/Presentation/Categoery/CategoeryMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// CategoryMain.swift
// App
//
// Created by 박서연 on 2024/06/06.
// Copyright © 2024 iOS. All rights reserved.
//

import DesignSystem
import SwiftUI

struct CategoryMain: View {

var body: some View {
ScrollView {
Text("카테고리")
CategoryGridView(data: ZeroDrinkSampleData.dirnkType, type: "카페 음료",
last: false, pageSpacing: 22, gridSpacing: 17)
CategoryGridView(data: ZeroDrinkSampleData.cafeType, type: "과자/아이스크림",
last: false, pageSpacing: 22, gridSpacing: 17)
CategoryGridView(data: ZeroDrinkSampleData.snackType, type: "과자/아이스크림",
last: false, pageSpacing: 22, gridSpacing: 17)


CategoryDetailView(data: ZeroDrinkSampleData.categoryDetail)
}
}
}

#Preview {
CategoryMain()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
//
// CateogeoryView.swift
// App
//
// Created by 박서연 on 2024/06/06.
// Copyright © 2024 iOS. All rights reserved.
//

import SwiftUI

// MARK: - 디자인시스엠으로 이동 완료
//struct CateogeoryComponent: View {
//
// let columns: [GridItem] = Array(repeating: GridItem(.flexible()), count: 4)
// let data: [String]
// let type: String
// let last: Bool
// let pageSpacing: CGFloat
// let gridSpacing: CGFloat
//
// init(data: [String],
// type: String,
// last: Bool,
// pageSpacing: CGFloat,
// gridSpacing: CGFloat
// ) {
// self.data = data
// self.type = type
// self.last = last
// self.pageSpacing = pageSpacing
// self.gridSpacing = gridSpacing
// }
//
// var body: some View {
// VStack(alignment: .leading, spacing: 12) {
// let size = (UIScreen.main.bounds.width - (pageSpacing * 2) - (gridSpacing * 3)) / 4
//
// Text(type)
// .applyFont(font: .heading2)
//
// LazyVGrid(columns: columns, spacing: 20) {
// ForEach(data, id: \.self) { type in
// VStack(spacing: 6) {
// Rectangle()
// .fill(Color.neutral50)
// .frame(width: size, height: size)
// .clipShape(RoundedRectangle(cornerRadius: 8))
// Text(type)
// .applyFont(font: .body2)
// .foregroundStyle(Color.neutral900)
// }
// }
// }
// }
// .padding(.horizontal, 22)
//
// if last {
// EmptyView()
// } else {
// Rectangle()
// .frame(maxWidth: .infinity)
// .frame(height: 12)
// .foregroundStyle(Color.neutral50)
// .padding(.vertical, 30)
// }
// }
//}

//#Preview {
// CateogeoryComponent(data: ZeroDrinkSampleData.cafeType, type: "카페", last: false, pageSpacing: 22, gridSpacing: 17)
//}
52 changes: 52 additions & 0 deletions Projects/App/Sources/Presentation/Detail/NoneZeroView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// NoneZeroView.swift
// App
//
// Created by 박서연 on 2024/06/08.
// Copyright © 2024 iOS. All rights reserved.
//

import SwiftUI

struct NoneZeroView: View {
private let sample = ["영양성분1", "영양성분2", "영양성분3"]

var body: some View {
VStack {
Text("제로가 아닌 상품을 먹었다면?")
.applyFont(font: .heading2)
.frame(maxWidth: .infinity, alignment: .leading)
Rectangle()
.fill(Color.neutral200)
.frame(width: 116, height: 116)
.padding(.vertical, 32)
.padding(.bottom, 54)

LazyVStack(spacing: 10) {
ForEach(sample, id: \.self) { index in
HStack {
Text(index)
Spacer()
Text(index)
}
.applyFont(font: .body2)
.foregroundStyle(Color.neutral600)
.padding(.vertical, 14)

Rectangle()
.fill(Color.neutral50)
.frame(maxWidth: .infinity)
.frame(height: 1)
.opacity(index == sample.last! ? 0 : 1)
}
.padding(.bottom, 6)
}
}
.padding(.top, 30)
.background(Color.neutral50)
}
}

#Preview {
NoneZeroView()
}
67 changes: 67 additions & 0 deletions Projects/App/Sources/Presentation/Detail/ProductDetailView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
//
// ProductDetailView.swift
// App
//
// Created by 박서연 on 2024/06/08.
// Copyright © 2024 iOS. All rights reserved.
//

import SwiftUI

struct ProductDetailView: View {
private let storeSample = ["네이버 쇼핑", "쿠팡", "판매처명"]
var body: some View {
ScrollView {
Rectangle()
.fill(Color.neutral500)
.scaledToFit()

Text("브랜드명브랜드명브랜드명")
Text("[상품명상품명상품명상품명상품명]")

ForEach(0..<5) { index in
HStack{
Text("영양성분명1")
Spacer()
Text("영양성분")
}
.padding(.vertical, 14)

Rectangle()
.fill(Color.neutral100)
.frame(maxWidth: .infinity, maxHeight: 1)
.opacity(index == 4 ? 0 : 1)
}

Text("영양 성분 모두 보기")
.padding(.init(top: 8, leading: 24, bottom: 8, trailing: 24))
.applyFont(font: .body2)
.foregroundStyle(Color.neutral400)
.overlay {
RoundedRectangle(cornerRadius: 50)
.stroke(Color.neutral400, lineWidth: 1)
}

Text("오프라인 판매처")

Text("온라인 판매처")
LazyVStack(spacing: 10) {
ForEach(storeSample, id: \.self){ store in
Text(store)
.padding(.init(top: 10, leading: 16, bottom: 10, trailing: 16))
.frame(maxWidth: .infinity, alignment: .leading)
.background(Color.neutral50)
.clipShape(RoundedRectangle(cornerRadius: 8))
}
}

Spacer().frame(height: 30)


}
}
}

#Preview {
ProductDetailView()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
//
// CreateReviewView.swift
// App
//
// Created by 박서연 on 2024/06/09.
// Copyright © 2024 iOS. All rights reserved.
//

import SwiftUI
import DesignSystem
import AutoHeightEditor

struct SampleProduct {
let name: String
let brand: String
let content: String

static let sampleProduct = SampleProduct(name: "파워에이드", brand: "노브랜드", content: "상품입니다상품입니다상품입니다상품입니다")
}

struct CreateReviewView: View {
let data = SampleProduct.sampleProduct
@State var finish = false
@State var test = false
@State var text: String = ""
@State var dynamicHeight: CGFloat = 100

var body: some View {
ScrollView {
VStack(spacing: 30) {
Image(systemName: "heart")
.resizable()
.scaledToFit()

VStack(spacing: 6) {
Text("[\(data.brand)]")
.applyFont(font: .body2)
.foregroundStyle(Color.neutral700)
Text(data.name)
.applyFont(font: .subtitle2)
.foregroundStyle(Color.neutral900)
.lineLimit(1)
}
.padding(.horizontal, 22)

DivideRectangle(height: 1, color: Color.neutral100)

VStack(spacing: 10){
Text("상품은 어떠셨나요?")
.applyFont(font: .subtitle1)
.frame(maxWidth: .infinity, alignment: .center)
HStack(spacing: 2){
ForEach(0..<5) { _ in
Image(systemName: "star")
.font(.system(size: 36))
.foregroundStyle(Color.neutral200)
}
}
}

DynamicHeightTextEditor(text: $text, dynamicHeight: $dynamicHeight,
initialHeight: 100, radius: 10,
font: .body2, backgroundColor: Color.neutral50,
fontColor: Color.neutral700,
placeholder: "리뷰를 남겨주세요",
placeholderColor: Color.neutral500) .padding(.horizontal, 22)


CommonButton(title: "작성 완료", font: .subtitle1)
.enable(
// TODO: - Button 조건 수정
!text.isEmpty
)
.padding(.horizontal, 22)
.padding(.top, -2)
}
}
}
}

#Preview {
CreateReviewView()
}
Loading

0 comments on commit dbba07b

Please sign in to comment.