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

Refactor <ColumnView> and <Modal> #224

Merged
merged 14 commits into from
Sep 2, 2019
Merged

Refactor <ColumnView> and <Modal> #224

merged 14 commits into from
Sep 2, 2019

Conversation

zhusee2
Copy link
Contributor

@zhusee2 zhusee2 commented Aug 30, 2019

Purpose

The primary goal is to replace the inner layout of <Modal> with <ColumnView>.
It should turn on momentum scrolling on iPads, as well as a default bottom padding.

Changes

Breaking

  • [Core] The bottomPadding prop is removed. Please use bodyPadding prop and pass an object instead.
  • [Core] <Modal> is refactored to render a <ColumnView> as its inner layout.
  • [Core] <Modal> no longer takes size and bodyClassName props.
  • [Core] <Modal bodyPadding> prop now takes the same object and is passed to <ColumnView>.

Other changes

  • [Storybook] Examples for <SplitView> is refactored so they can be reused.

螢幕快照 2019-09-02 上午11 49 26

@zhusee2 zhusee2 changed the title Feature/refactor modal Refactor <Modal> Aug 30, 2019
@zhusee2 zhusee2 self-assigned this Aug 30, 2019
@zhusee2 zhusee2 added this to the v4 milestone Aug 30, 2019
@zhusee2 zhusee2 changed the title Refactor <Modal> Refactor <ColumnView> and <Modal> Aug 30, 2019
@zhusee2 zhusee2 force-pushed the feature/refactor_modal branch from f46619d to 0093dcc Compare September 2, 2019 03:46
@zhusee2 zhusee2 requested a review from tz5514 September 2, 2019 03:49
};

ColumnView.defaultProps = {
header: undefined,
footer: undefined,
bottomPadding: undefined,
flexBody: false,
bodyPadding: { bottom: 24 },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other padding should has default value 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't provide it, it should be undefined and thus it will not be written to CSS.
And thus it would be initial, which happens to equal 0 here.

I think it's fine though.

Copy link
Contributor

@tz5514 tz5514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhusee2 zhusee2 merged commit a26660e into develop Sep 2, 2019
@zhusee2 zhusee2 deleted the feature/refactor_modal branch September 2, 2019 07:58
@zhusee2 zhusee2 mentioned this pull request Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants