typed-text icon indicating copy to clipboard operation
typed-text copied to clipboard

add initialWait, removeCursor and hideCursorDuringInitialWait

Open toarm opened this issue 7 years ago • 4 comments

Just checkout the demo and let me know what you think about the new attributes.

I'm thinking about a string attribute that takes just a simple string and sets the strings array accordingly. This might come in handy if you just want to use one string but it will probably mess up the api a bit...

Maybe I messed up code style a bit somwhere x/ sorry for that ;)

toarm avatar Feb 06 '18 23:02 toarm

If you want me to squash the commits just let me know....

toarm avatar Feb 07 '18 09:02 toarm

Thanks for the PR! I am gonna check the features when I find some time and reply back, they look cool at a glance!

sespiros avatar Feb 11 '18 10:02 sespiros

Hi @toarm,

I checked your PR and I made a few changes here:

  1. revert commit 16d9228 because a margin is not needed/breaks the layout of the demo in the webcomponents page.
  2. changed removeCursor to hideCursor. Since you 've already put an id to cursor and use it for hiding, I thought it was cleaner.

Could you also squash the commits where you added and then removed the _firstTyping attribute?

Thanks!

P.S.

I'm thinking about a string attribute that takes just a simple string and sets the strings array accordingly.

I didn't understand what you meant by this

sespiros avatar Feb 22 '18 23:02 sespiros

Hi @sespiros , thanks for coming back. I'm quite busy this week x/ I'll do the changes next week (probably at the weekend).

I didn't understand what you meant by this

This is what it looks like if I want to use the element with just a plain string (not an string array):

<typed-text cursor="▍" noretype="" remove-cursor blink
                                    strings="[[someStringArray]]"></typed-text>
<script>
//some polymer element:
...
someStringArray: {
   type: Array,
   computed: "_computeStringArray(someString)"
},
someString: {
   type: String
}
...

_computeStringArray(someString) {
   return [someString];
}
</script>

Maybe now it makes more sense to you or am I missing something?

toarm avatar Feb 27 '18 17:02 toarm