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

Align with Ember's HistoryLocation router #40

Merged
merged 1 commit into from
Jan 25, 2017

Conversation

briangonzalez
Copy link
Contributor

Now that emberjs/ember.js#14011 has landed
it would be best to align this library with the new implementation in
anticipation of deprecating the RouterScroll for Ember 2.13 and
eventually removing it in Ember 3.0.

@briangonzalez
Copy link
Contributor Author

@bcardarella These look like real failures now.

@briangonzalez
Copy link
Contributor Author

@bcardarella Ok, there was an actual bug in 1.13 which I had to modify a test to fix.

const key = get(this, 'key') || '-1';
set(this, 'key', stateUuid);
let key = getWithDefault(this, 'key', '-1');
console.log(key);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be removed

@@ -3,7 +3,7 @@ import { moduleFor, test } from 'ember-qunit';

const {
get,
set
set,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you intend to leave the trailing comma?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, our lint rules enforce it.

@briangonzalez briangonzalez force-pushed the features/bc/align-with-ember-history-location branch from 0b4a460 to b5aa167 Compare January 24, 2017 16:04
@@ -1,25 +1,27 @@
import Ember from 'ember';

const uuid = () => {
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this implementation of the uuid function doesn't work. It needs to return the result of this replace function. Otherwise it will always be undefined and the scrollMap will not be populated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linting snafoo, i'll fix.

@briangonzalez briangonzalez force-pushed the features/bc/align-with-ember-history-location branch from 8cf1202 to 605d9ea Compare January 25, 2017 01:36
@briangonzalez briangonzalez merged commit 1afc436 into master Jan 25, 2017
@briangonzalez briangonzalez deleted the features/bc/align-with-ember-history-location branch January 25, 2017 04:53
dmuneras pushed a commit to dmuneras/ember-router-scroll that referenced this pull request Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants