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

Posts without title need a link to post detail page #23

Closed
rjmackay opened this issue Dec 1, 2015 · 7 comments
Closed

Posts without title need a link to post detail page #23

rjmackay opened this issue Dec 1, 2015 · 7 comments
Assignees

Comments

@rjmackay
Copy link
Contributor

rjmackay commented Dec 1, 2015

  • Not all posts have a title (unstructure SMS for example)
  • These posts still need a link to the post detail page
@sethburtonhall
Copy link

<div class="post-text">
    <a href="">
        <h3>This post has an image</h3>
    </a>
    <p>
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempolabore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exerclaboris nisi ut aliquip ex ea commodo consequat.
    </p>
    <p>
        <a href="">10 comments</a>
    </p>
</div>

My original thought for this was to wrap the .post-text div, but HTML does not support an anchor around a block level element. My second thought was to wrap an anchor around the <p> but ...

@brandonrosage and I were talking and he made a great point. Can posts be assigned a dynamic title? something like "SMS 1029, with unknown form". That way we don't have to mess with an anchor wrap and every post has a clickable title that links to post-detail.

@sethburtonhall
Copy link

ping @rjmackay ^

@ushbot
Copy link

ushbot commented Feb 24, 2016

I think we did something like this for M-Sheria - title just used a shortened version of the message text.
I'll do that again

@sethburtonhall
Copy link

👍

@rjmackay rjmackay assigned rjmackay and unassigned sethburtonhall Feb 26, 2016
@rjmackay rjmackay removed their assignment Mar 22, 2016
@rjmackay rjmackay added this to the Sprint April 4th milestone Mar 22, 2016
@rjmackay
Copy link
Contributor Author

@middle8media can you have a go at doing this in the client itself?
https://github.com/ushahidi/platform-client-mSheria/blob/master/server/www/templates/posts/preview.html#L22 is how we did this for msheria

sethburtonhall pushed a commit to ushahidi/platform-client that referenced this issue Apr 4, 2016
* Posts without a title now link to post detail.

if no post title is entered the post content is displayed as the title, with a 50 character maximum and an elipsis to avoid awkward mid word/sentence break.
@sethburtonhall
Copy link

fixed via ushahidi/platform-client@5633626

sethburtonhall pushed a commit to ushahidi/platform-client that referenced this issue Apr 4, 2016
fixes ushahidi/platform-pattern-library#23

* Posts without a title now link to post detail.

if no post title is entered the post content is displayed as the title, with a 50 character maximum and an elipsis to avoid awkward mid word/sentence break.
@rjmackay rjmackay assigned rjmackay and unassigned sethburtonhall Apr 5, 2016
@rjmackay rjmackay reopened this Apr 5, 2016
@rjmackay
Copy link
Contributor Author

rjmackay commented Apr 5, 2016

Don't close this out till the PR lands :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants