-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Delete deprecated old propagation model #511
Delete deprecated old propagation model #511
Conversation
@@ -6,15 +6,26 @@ module.exports = { | |||
config(environment, appConfig) { | |||
const addonConfig = appConfig['emberKeyboard'] || {}; | |||
|
|||
if ('disableInputsInitializer' in addonConfig && !this.deprecationPrinted) { | |||
if ('disableInputsInitializer' in addonConfig && !this.disableInputsInitializerDeprecationPrinted) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not super nice (sooo long) but does it's job.
// See tests/dummy/app/services/keyboard.js which extends addon service with old code. | ||
// See tests/dummy/app/templates/priority.hbs when property is set usage. | ||
if (this.oldPropagationModel) { | ||
this.keyboard.isPropagationEnabled = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows us to keep documentation and interactive widgets/examples for 6.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see tests/dummy/app/services/keyboard.js
for the usage
@@ -0,0 +1,5 @@ | |||
/* eslint-disable ember/no-mixins */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a new docs page as old one "priority" does not have any sense for 7.x, however I don't want to delete it and would really like to keep for 6.x users not yet ready for 7.x migration
@@ -0,0 +1,86 @@ | |||
import { action } from '@ember/object'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows us to keep documentation and interactive widgets/examples for 6.x
Basically deprecated/removed functionality for old propagation model/priority based responders moved from add-on code to dummy app for the purpose of interactive docs only.
@@ -2,7 +2,8 @@ | |||
<nav class="menu"> | |||
<LinkTo @route='index'>Overview</LinkTo> | |||
<LinkTo @route='usage'>Usage</LinkTo> | |||
<LinkTo @route='priority'>Priority</LinkTo> | |||
<LinkTo @route='event-propagation'>Event propagation</LinkTo> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new docs page added to navigation
@@ -0,0 +1,17 @@ | |||
{{format-markdown " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New docs page is very similar to the existing "Priority" but without things removed in 7.x
|
||
@action | ||
_respond(event) { | ||
if (this.isPropagationEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the switch for "old code path" which may be initiated from tests/dummy/app/mixins/enterable.js
@@ -2,7 +2,8 @@ | |||
<nav class="menu"> | |||
<LinkTo @route='index'>Overview</LinkTo> | |||
<LinkTo @route='usage'>Usage</LinkTo> | |||
<LinkTo @route='priority'>Priority</LinkTo> | |||
<LinkTo @route='event-propagation'>Event propagation</LinkTo> | |||
<LinkTo @route='priority'>Priority (<= 6.x)</LinkTo> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicitly marked for which version it's focused on.
@@ -1,5 +1,5 @@ | |||
{{format-markdown " | |||
## Priority | |||
## Priority (6.x and below) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kept this page with documentation and interactive widgets/examples for 6.x
Basically deprecated/removed functionality for old propagation model/priority based responders moved from add-on code to dummy app for the purpose of interactive docs only.
@@ -26,4 +26,16 @@ and required the use of `code` identifiers, like `KeyT`, `Digit1`, etc. Be sure | |||
[docs regarding `key` vs. `code` properties](usage) and be sure you are specifying the key | |||
combo consistent with your intended behavior. You will likely find that you want to update some key | |||
combos to the `key` equivalent. e.g. replace `ctrl+KeyT` with `ctrl+t`. | |||
|
|||
### Upgrading from ember-keyboard 6.x to 7.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Started new section. Does not seem we need to be much more explicit for this specific removal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work! 🙌
…/release-prep Prep for Release (v5, Major)
Part of #116.
Follow up to #499.