Giter VIP home page Giter VIP logo

channel-io / bezier-react Goto Github PK

View Code? Open in Web Editor NEW
177.0 177.0 43.0 36.22 MB

React components library that implements Bezier design system.

Home Page: https://main--62bead1508281287d3c94d25.chromatic.com

License: Apache License 2.0

JavaScript 3.13% TypeScript 86.61% Shell 0.01% HTML 0.05% MDX 2.58% SCSS 7.62%
bezier-react component-library design-system figma figma-plugin icons react react-components storybook typescript

bezier-react's People

Contributors

aooen avatar carlos-channel-io avatar chewcheww avatar choichoigang avatar danivelop avatar dependabot[bot] avatar dinohan avatar dogdriip avatar github-actions[bot] avatar groovypark avatar guswnsxodlf avatar hahnlee avatar inhibitor1217 avatar jamie-channel avatar jay-wkjun avatar junbong avatar jwoo0122 avatar kanary159357 avatar kimminkyung94 avatar leejiwoo2002 avatar npbg avatar psi9730 avatar quino0627 avatar renovate[bot] avatar rktguswjd avatar semantic-release-bot avatar seolhun avatar sungik-choi avatar tanney-102 avatar yangwooseong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bezier-react's Issues

Theme 에서 palette 가 아닌 color set 을 가지고 있도록 변경

색상 코드를 사용처에서 그대로 사용하면 디자인이 어긋나는 경우가 있기 때문에, Theme 에 palette 를 주입해서 color set 을 만들고 이를 쓰도록 변경.
예를 들어 텍스트의 경우 black70 등의 색상을 그대로 사용하지 않고, content-color-1 같은 형식으로 사용하게 해야 할 듯

Package 이름 변경

추후 Design System 이름이 정해지면 해당 이름에 '-react' postfix 붙여서 이름 정하기?

ex) Carbon Design System -> @channel.io/carbon-react

createComponent Factory 구성

// 기본 component Props 를 기반으로 prop 정의
interface TextProps extends ComponentProps {
	...
}

// render 에 해당하는 함수, ReactNode 반환
const TextView: React.ReactNode = (props: TextProps) => {
	...
}

// 실제 컴포넌트가 반환되는 지점
export default createComponent({
	displayName: 'Text',
	// 등등, 컴포넌트에 기본적으로 setting 되어야 하는 잡다한 것들을 전부 여기에 집어넣는다. render 는 필수로, props 를 받고 react Node 로 변환하는 부분.
	render: TextView,
})

interface CreateComponentConfig {
	...
	render: (props: ComponentProps) => any
}

// 몇가지 옵션들을 받아서 component 를 만드는 factory
// 각 컴포넌트에서 반복되서 작업될 옵션들 (display name을 비롯)을 여기서 한 번에 처리한다.
function createComponent({
	displayName,
	render,
}: CreateComponentConfig) {
	const ChannelComponent = () => {
		return render({...})
	}

	ChannelComponent.create = createShortHand() // 아래에서 설명함

	ChannelComponent.displayName = displayName

	return ChannelComponent
}

Fluent 의 독특했던 점은 Component 에 create 라는 method 를 따로 붙여주어서, JSX 없이 코드를 작성할 수 있게 함. 이것은 Spreading Panel 이나 Input Group, DropDown 등 내부에 다른 컴포넌트를 포함해야 하는 컴포넌트의 코드를 작성할 때 readability 측면에서 유리하지 않을까 싶음.

// JSX
const InternalContent = <Box {...props} />

// Fluent style
const InternalContent = Box.create({...})

Panel

Desk 에서 사용하고 있는 SpreadingPanel 의 호환. (Large Panel)
유저챗, 팀챗 우측 패널 등도 포함 가능. (Small Panel)

두 가지의 Panel 이 있을 수 있다. Card Base

Foundation

  • Theme
  • Elevation
  • Border
  • Transition
  • Radius
  • Typography

IE 지원

현재 상황

문제점

어떻게 개선할 수 있는지

Reference

Infinite Scroll

현재 상황

문제점

어떻게 개선할 수 있는지

Reference

Icon에 hoverColor 추가

현재 상황

사용처에서 Icon에 따로 hover시 color를 지정해주는 경우가 많음

문제점

추후 다크모드 적용시 Icon별 hover style이 있는지 확인하여 지정해줘야 하는 문제가 있어서 복잡함

어떻게 개선할 수 있는지

Icon에 hoverColor 추가

Reference

Icon

svg static file serving 의 까다로움으로 인해, 좋은 방법을 리서치하고 추후 개발할 것

CSS Houdini

현재 상황

문제점

어떻게 개선할 수 있는지

Reference

Accordion

Related: #108
Expansion Panel 1개 이상을 묶는 개념의 컴포넌트.

Colors 정의 (다크 모드 포함)

현재 상황

Colors 의 property 이름을 임의로 정하고 있음

문제점

어떻게 개선할 수 있는지

디자인 팀과 상의하여, primaryActiveColor 등 네이밍 컨벤션과 팔레트 바인딩을 정해야 함.

Reference

Sidebar Grouping

현재 상황

문제점

어떻게 개선할 수 있는지

Reference

Card

팀챗, 유저챗 우측 패널, ExpansionPanel #108 등에서 사용되는 Wrapper component.

parent width 를 상속받음

현재상황

재현 방법

일회성 메시지 에디터 운영 패널에서 전송 설정 하기 선택 영역 클릭

기대한 동작

글씨만큼만 너비 설정

실제 동작

일회성 메시지 에디터 운영 패널에서 전송 설정 하기 선택 영역이 오른쪽 빈 공간까지 잡힘
image

Reference

styled-components VS @emtion-core

최근 emotion 의 사용 추세가 늘어나는 듯 합니다. 번들 사이즈가 좀 더 작으며 typescript 라는 장점이 있습니다. 사용법은 거의 차이나지 않고 emotion 쪽이 좀 더 유연하게 사용할 수 있어서 emotion 을 사용해보면 어떨까 합니다.

https://www.npmtrends.com/styled-components-vs-@emotion/core

+)
styled-components 도 DefinitlyTyped 가 제공되고는 있습니다만 dependency 에 약간 문제가 있습니다 (@types/react-native 가 @types/styled-components 의 peerDependencies 가 아닌 dependencies 로 분류되어 있음)

Toast

image
image

현재 상황

현재는 고객 연락처에서만 사용중임

문제점

어떻게 개선할 수 있는지

Reference

Dynamic Overlay

현재 상황

Overlay 는 지정된 위치에 고정으로 렌더링됨

문제점

Container 속성에 따라 일부분이 가려지기도 함

어떻게 개선할 수 있는지

container 와의 여백을 계산해서 dynamic 하게 화면 안쪽으로 렌더링 되도록 설정

Reference

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.