Yoast / yoast-components

Accessible React components by Yoast
GNU General Public License v3.0
21 stars 6 forks source link

Slug field unresponsive when typing #589

Open afercia opened 6 years ago

afercia commented 6 years ago

Switch to the feature/react-snippet-editor branch

In the screenshot below: using Chrome on maOS I've typed hello-my-post-title and here's what I get:

screen shot 2018-06-08 at 12 30 21
boblinthorst commented 6 years ago

I tested it in both the standalone and in wordpress-seo context.

On the standalone it is an awful experience. but for some reason, it does work fine in wordpress-seo context. This is high on the priority list, but not as high as some other issues.

afercia commented 6 years ago

Hm right. I see the standalone example uses a different callback for onChange:

this.onChangedData = debounce( this.onChangedData.bind( this ), 150 );

which is completely different from the actual one used in the plugin. It's also debounced, hence the mess while typing. We should really keep the standalone example as close as possible to the real usage, to avoid this kind of misunderstanding (and wasted debugging time).

afercia commented 6 years ago

Just noticed with Safari the slow response is noticeable also in the wordpress-seo context, not so slow as in the standalone version, but still noticeable.