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

breaking changes for 1.0.0 #36

Closed
st-h opened this issue Nov 25, 2017 · 6 comments · Fixed by #46
Closed

breaking changes for 1.0.0 #36

st-h opened this issue Nov 25, 2017 · 6 comments · Fixed by #46

Comments

@st-h
Copy link
Owner

st-h commented Nov 25, 2017

As already introduced in the readme, the 1.0.0 release will remove any currently deprecated apis. In addition to that I am considering removing the html support which is enabled by setting type to html. The reasons behind this are as following:

  • according to the readme the main scope of this addon seems to be to provide a flexible alternative to an input field. (I am putting it this weird, as this has been what I expected from this addon when I started using it, and I just recently took over ownership over this addon)
  • html support currently seems to contain several bugs that are not easily fixed
  • it is not very clear what type html should actually be doing and what people expect and are actually using it for. By setting contenteditable on an element, there are quite a lot things that become possible to do. For instance it is possible to build a whole wysiwyg editor. I recently closed a few issues regarding html rendering because they either were too old and/or were not clear to me what the actual expectations were.
  • personally I don't have a use case for the html feature nor do I currently have the time to support a feature which appears to be broken. Unless we can find somebody who is willing to put time and effort into fixing and probably help maintain that feature it looks like this feature will remain in a state where some things just unexpectedly fail or break, which will just cause frustration.

In the end, there are a lot of things that can be build by setting contenteditable on an element, which are rather hard to support by a very general addon. By putting a clear focus on being a flexible replacement for input and textarea elements I think we will be able to ship a much more stable addon, which works the way people are expecting it to work. I think anything that previously relied on the html type will find a much better place in dedicated addons than with one that tries to do it all.

Please raise your concerns, as I don't want to break this addon for a lot of people just because I wasn't able to think about that one use case that totally makes sense.

@iNaD
Copy link

iNaD commented Jan 11, 2018

We are using ember-content-editable in some places as "input replacement". This enables us to have suffixes like currency symbols directly after the entered value.

As you mentioned the html mode would end in something like a WYSIWG Editor, which is an overkill. If there is no other voice I think dropping the html support will be the right thing to do. There are so many well done WYSIWG solutions.

@st-h st-h changed the title breaking changes for 1.0.0 [type: html] breaking changes for 1.0.0 Jan 15, 2018
@st-h
Copy link
Owner Author

st-h commented Jan 15, 2018

@iNaD thank you for the feedback.

We just released 1.0.0-alpha.1, which makes the following changes to the addon:

  • removes jquery dependencies
  • removes IE9 and IE10 support
  • no observers and computed properties were harmed
  • only supports type text and therefore removes the type property completely
  • removes stringInterpolator functionality

This enables us to significantly reduce the complexity of this addon as we now are able to rely on the browser to handle the modification of the dom and we only need to make sure to keep the binding of the provided property in sync. This should eliminate any potential bugs resulting from earlier custom implementations of key and copy-paste handlers as well as modifying the caret position.
We already have a number-editable implementation ready within this branch. However, as the previous implementation, this has some drawbacks: currently when an illegal character is entered the character might flash shortly before it is removed. Probably we can improve this, but we would like to check if anyone is actually using such a feature before we add any unnecessary code.

We encourage anybody to test the prerelease and let us know about any findings here.

Demo page of the current alpha.1 release is available here

@st-h
Copy link
Owner Author

st-h commented Jan 16, 2018

1.0.0-alpha.2 brings back surely missed enter and escape-press event handlers together with a few minor fixes regarding maxlength.

@bdiz
Copy link

bdiz commented Jan 18, 2018

key-press/key-up event handlers seemingly not functioning on 1.0.0-alpha.2.

@st-h
Copy link
Owner Author

st-h commented Jan 18, 2018

@bdiz sorry. That meant to go into 1.0.0-alpha.3, which I obviously didn't publish. Should be fixed now. Demo page now also shows those key events.

This was referenced Mar 15, 2018
@st-h
Copy link
Owner Author

st-h commented Mar 15, 2018

I think this has been in a pre-release state long enough for now and any critical issues should be resolved by now. Finally releasing 1.0.0.

@st-h st-h closed this as completed in #46 Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants