aeternity / aepp-components

deprecated: aepp-components to be used in all aepps.
ISC License
41 stars 14 forks source link

Add AePlainInput component #167

Closed etharner closed 6 years ago

etharner commented 6 years ago

Use this component instead of ae-text in contenteditable mode.

sadiqevani commented 6 years ago

Hey @etharner

Can you give me an overview to what where the reasons you think having a plain-input component would be better than contenteditable property?

In the standard design guide there are not plain inputs, and the only usage of the plain input is in the card component.

from what I know contenteditable behaves the same as if its an input when its enabled, and also provides less hassle and less components.

etharner commented 6 years ago

Hey @sadiqevani As I see: 1) you use contenteditablenot only in ae-card, but in ae-backdrop and ae-flip. 2) it behave not quite as enabled input, because it allows to use many shortcuts, which can change text pretty much (for example, ctrl-b, ctrl-i for bold, italic, etc.). So you need to disable it somehow. It's overkill for the component that needs to be simple.
3) you can't receive value from your ae-text component (it's not accessible with v-model and you are not implementing input event handling).

etharner commented 6 years ago

@sadiqevani I've changed stuff. Ready to merge?

sadiqevani commented 6 years ago

@etharner

Here is all the steps that you need to update your component for me to merge it: