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

Add a dummy event to left-align results in slider #67

Merged
merged 6 commits into from
Nov 5, 2014

Conversation

mailbackwards
Copy link
Collaborator

No description provided.

@mailbackwards
Copy link
Collaborator Author

This is my attempt to fix the centered-image issue with bxSlider. We talked about adding a dummy event with a blank image whenever there is only one result, so that the result will left-align. This code does that by adding a dummy event to the database that can be used anywhere by calling Event.dummy. I did this so that we wouldn't have to work around the Rails serializers and related conventions. But:

  • I'm not sure how to avoid it being an active link...it has to have a URL which will then be clickable.
  • For the "my favorites" call, I don't think there's an easy way to determine the context of the call (i.e. whether /favorites is being called to get events for the bottom bar or for the "my favorites" page-- If it's the latter, we definitely don't want a dummy event).
  • The centered-event problem (and these two issues above) could also theoretically happen on the "near you" and venue pages too. I haven't done anything with those endpoints yet, in part because of these issues.

I'm now wondering whether it might be better practice to append the dummy on the frontend. This would avoid muddying backend logic and a need for a dummy event in the db. I realize it would add to the work for Clearbold but I think it would be feasible for them to do it...and given the issues I raised above, they'd probably need to do some altering of their code anyway to account for these conditionals. @jamiefolsom let's discuss sometime soon.

@mailbackwards
Copy link
Collaborator Author

I just saw this #69. To be continued...

@heymarkreeves
Copy link
Collaborator

If it helps, I think we'll initially just force an extra 3 items in every rendering on Staging so that we can evaluate the formatting stuff first, holding off on basing that on dummy API items or conditional logic. Based on where we're at and the items to wrap up, I think I'm as wary of tackling additional conditional logic as you are loading up the API with these until we sort out the interface :)

@mailbackwards
Copy link
Collaborator Author

Updated to address #68 and #69 -- see those issues for discussion of each.

@mailbackwards mailbackwards merged commit e080b4a into master Nov 5, 2014
@mailbackwards mailbackwards deleted the la-dummy-event branch November 26, 2014 21:19
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.

2 participants