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
post-detail page #93
post-detail page #93
Conversation
I think the best way to handle this might be to do HTML/CSS updates on their own branch. The rest of the time just wire things in and don't worry too much if the CSS isn't perfect on the feature branches. Also - when you update the CSS - grab scss/ files from the UI repo and run |
@@ -1,9 +1,11 @@ | |||
define(['App', 'backbone', 'marionette', | |||
'views/AppLayout', 'views/HomeLayout', 'views/HeaderView', 'views/FooterView', 'views/WorkspacePanelView', 'views/SearchBarView', 'views/MapView', | |||
'views/PostListView', 'views/PostDetailView','collections/PostCollection','collections/TagCollection','collections/FormCollection'], | |||
'views/PostListView', | |||
'views/PostDetailView','collections/PostCollection','collections/TagCollection','collections/FormCollection','views/PostDetailLayout', 'views/RelatedPostsView'], |
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.
Can you break this up and try and avoid the really long line? I've been doing something like
a line of layouts, then views, the collections.. etc
little pedantic I know.. but just thinking readability
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.
whoah, so moving around this as per the suggestion breaks the whole app, not sure I'm getting it right but put all layouts on one line, views on another and collections on one line. Breaks whole UI.
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.
You have to match the ordering to the function params below.. as long as ordering matches you should be fine.
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.
done and works
And I ended up creating more problems to myself logs off 1am commits are not the best |
@rjmackay - for the css I think it can wait till its updated, running away from revert madness :-). |
Some git madness will revert it: or slightly simpler
which basically diff's the commit with css against the previous one (reverse order so you get a reversed diff), filters it to just the css directory.. and then pipes it into |
Done! On Thu, Aug 22, 2013 at 2:35 AM, Robbie MacKay notifications@github.comwrote:
Too brief? Here's why! http://emailcharter.org |
@kamaulynder Git-fu: +1 |
hahahaha |
* Remove wrapping elements from templates (provided by layout) * Update some HTML from UI repo * Fix indenting
* Make sure model gets loaded even if its not in the collection * Don't keep postDetailLayout around after we go somewhere else * Fix ID of postDetailRegion * Fix camelCase on postDetailLayout regions *
* Move post tags mapping code to post model * Copy PostItemView.serializeData() to PostDetailView * Replace dummy html with real data * Only add color style if needed (postDetailView and postItemView)
This is a rough hack for when the page renders before its model is loaded
I've merged some UI updates into this branch, synced up the post-detail UI with the latest, fixed some CSS glitches, and wired up a few more fields with real data. Outstanding things
|
Conflicts: modules/UshahidiUI/media/js/app/controllers/Controller.js modules/UshahidiUI/media/js/app/models/PostModel.js modules/UshahidiUI/media/js/app/views/PostDetailView.js
* Use deferreds to ensure post, user and form models all load before we render post details * Store form and user models attached to the post * Fix template logic to show user * Fix accessor names on PostModel: getTags isPublished()
* Split out RelatedPostItem template * Update RelatedPostsView to use PostItemView as item view. Use custom options to change the template and class name, but same view code. * Make item container a <ul> and update CSS to remove left margin
Go related posts working (with dummy post models. However I think the HTML itself needs some work.. theres nothing standard between the main listing and side lists.. which will be a bit rough for the themers. |
* Grabbing first location we find - since no primary location * Currently just lat/lon since locations don't have a name
@kamaulynder I've built a lot on this - it should be pretty much done excluding the post images which are still placeholders. Care to give this a quick review? |
Also: started writing up a code review checklist: https://wiki.ushahidi.com/display/WIKI/Code+review+checklist |
reviewing, thanks. On Mon, Sep 23, 2013 at 4:08 AM, Robbie MacKay notifications@github.comwrote:
Too brief? Here's why! http://emailcharter.org |
Ping @middle8media I've made a few changes to the UI during implementing..
|
No longer needed no we're used deferreds to ensure the model is loaded
random thought: should there be a delete button on post details page? I think yes.. |
Yes, I think it should be there. An admin might be going through posts and
|
ok, those changes look good. Except for the paragraph styling and the buttons (they need to be float to line up on the right edge.) Yes to delete button. I guess, I just need to jump into the application repo |
Thanks Seth - not sure what's going on with the paragraph styling.. might be an issue with how I'm formatting the text (I just did a quick new line to br script, until I had time to build in markdown) |
@middle8media am I right that the Post title should also sit in-line with the photo below it? |
* Fix column sizes on post title and actions now that category icon is hidden * Wrap post content in paragraph
Added the delete and unpublish buttons.. but it doesn't leave a lot of space for the post title now. Maybe these would be better moved down, just above the post text? or a 2nd 'action bar'? Screenshot: https://dl.dropboxusercontent.com/u/123897/Screen%20Shot%202013-09-27%20at%2010.33.22%20AM.png |
I'm going to go ahead an merge this in now anyway. I'll handle further iterations on a new branch. For now it'd like to move on to post search or create |
I will pull in changes and take a look at this. A 2nd action bar may be our best choice. |
* badges for filters location
@rjmackay pushed the post-detail stuff, need help with css before I can do anything else. Added the latest global.css file from the UI repo and that affected the post-listing too, argghhhh!!