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

Events Fixes #163

Merged
merged 46 commits into from
Mar 26, 2018
Merged

Events Fixes #163

merged 46 commits into from
Mar 26, 2018

Conversation

martypowell
Copy link
Contributor

  • Reworked how events work by storing the state in an object
  • Adjusted filter-helper service to take in arrays rather than single key, values
  • Fixed broken tests

IsOngoingVisible: model.IsOngoingVisible || true,
IsSpacesReservationVisible: model.IsSpacesReservationVisible || false,
Limit: model.limit || CONSTANTS.requestChunkSize,
EventsTypes: eventTypes, // HACK: API Needs this
Copy link
Contributor

Choose a reason for hiding this comment

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

Not going ot block, but curious why this isn't model.eventTypes || [].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point, when i did that, i had an alias property. let me roll that back.

@martypowell
Copy link
Contributor Author

martypowell commented Mar 22, 2018

@mxsnyder this is ready for another look

  • Added default date into the ui
  • Only toggle the filters on page load
  • Remove flickr from filter checkboxes when filters are updated
  • Fixed bug that was clearing out end date

@coveralls
Copy link

coveralls commented Mar 22, 2018

Coverage Status

Coverage decreased (-0.6%) to 47.18% when pulling 8f1af22 on events-url-deep-linking-part2 into 5b1d415 on integration.

Copy link

@ascire ascire left a comment

Choose a reason for hiding this comment

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

This is a pretty big commit and my eyes glazed over after a while. I'm not explicitly approving, but what I looked at so far looks good, and @mxsnyder already approved, so...

};

/* ** Private ** */

// GOOD
Copy link

Choose a reason for hiding this comment

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

GOOD.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ascire i need to remove these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

// GOOD
const isSameDay = (day1Date, day2Date) => day1Date && day2Date ?
$window.moment(day1Date).isSame(day2Date, 'day') :
false;
Copy link

Choose a reason for hiding this comment

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

Beautiful refactor. Because this already spans multiple lines, I might help clarify that this is a function by separating the inputs from the expression.

const isSameDay = (day1Date, day2Date) =>
  day1Date && day2Date ?
    $window.moment(day1Date).isSame(day2Date, 'day') :
    false;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ascire i don't think this code was actually modified, just moved, wasn't a case for a refactor.

Copy link

Choose a reason for hiding this comment

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

It's the exact same function as on the left, just converted to a lambda expression, which is good since it has no side effects in the first place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ascire I get the update, I'm just saying that function wasn't touched as part of "Events Fixes" as described above, I think it's showing in green because it was moved or copied in.

@martypowell
Copy link
Contributor Author

@mxsnyder ready for another look, a lot has changed

karma.conf.js Outdated
@@ -98,7 +98,7 @@ module.exports = function(config) {

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Firefox'],
browsers: ['Chrome'],
Copy link
Contributor

Choose a reason for hiding this comment

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

This will cause a problem for Coveralls, won't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mxsnyder yea crap, sorry forgot to roll this back when i was debugging.

@martypowell
Copy link
Contributor Author

@mxsnyder karma configured to use firefox

@martypowell martypowell merged commit 56dd8bc into integration Mar 26, 2018
@martypowell martypowell deleted the events-url-deep-linking-part2 branch March 26, 2018 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants