this post was submitted on 12 Jan 2023
5 points (85.7% liked)

Asklemmy

43810 readers
1229 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS
 

There have been some requests to make it possible for Mastodon users to create threads on Lemmy. At the moment this is not possible because Mastodon cant set the title field which is mandatory in Lemmy. The same problem affects other projects like Pleroma or Friendica (where title is optional).

It is unlikely that Mastodon would make any change in this regard, so a workaround in Lemmy would be necessary. I implemented such a workaround which makes the title optional when receiving a federated post, and uses the first line of the content instead. This workaround could also be made configurable per instance or per community.

But to be honest I am not sure the workaround is a good idea in general, as it could result in bad titles, and generally more low-quality posts. Thats why I want to know what the community thinks about it.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] nutomic@lemmy.ml 1 points 2 years ago (3 children)

Posts without title would completely break post listings in Lemmy.

The mockup below by @0x1C3B00DA@lemmy.ml looks pretty close to how I was envisioning it. It definitely looks off, and that's why my preferred implementation is that Mastodon (and the other microblog services) add title support. Since they won't or aren't, I would rather that non-local content is preserved how it was, without too significant guesswork to fill in each platforms' fields. Titleless, but preserving the post and not having a poor title is preferable to me than an awkward title that anyone on mastodon doesn't see and doesn't know about.

Allowing for people on lemmy to submit titleless posts can be allowed, since the tech would already be in the front-end to display it. Doesn't have to be allowed, though.

[โ€“] 0x1C3B00DA@lemmy.ml 1 points 2 years ago (1 children)

But that's just a UI issue, right? Post listings in Lemmy is essentially the same as a feed reader and I've used feed readers that display posts with/without titles.

[โ€“] nutomic@lemmy.ml 1 points 2 years ago (1 children)

Could you show an example screenshot how that looks like? I cant really imagine it working in Lemmy.

[โ€“] 0x1C3B00DA@lemmy.ml 1 points 2 years ago* (last edited 2 years ago) (1 children)

Sure I'll try mocking something up in the browser devtools. On mobile, lemmy displays body text for posts (p.s. I'd like that on desktop too). What I'm talking about is just showing that in the position the title would be, still in an anchor tag so it links to the post but with body text styling instead of in a header.

EDIT: Here's a quick mockup.

The first and third posts are title-less posts and, to me, look good interspersed with titled posts. To get this, I replaced the entire h5 element that serves as the post title with <a class="preview-lines" href="{{post.link}}">{{made up body text}}</a> The preview-lines CSS class applies a visual truncation so even if the text we render is too much it won't overflow.

I don't know how to write Inferno templates but in Vue this would be

<!-- this is the current markup -->
<h5 v-if="post.title">
    <a class="text-body" title="Comments" :href="post.link">
        {{ post.title }}
    </a>
    <button class="btn btn-link text-monospace text-muted small d-inline-block ml-2" data-tippy-content="Expand here">
        <svg class="icon icon-inline">
            <use xlink:href="#icon-plus-square"></use>
            <div class="sr-only"><title>plus-square</title></div>
        </svg>
    </button>
</h5>
<!-- this is new markup i'm suggesting -->
<a v-else class="preview-lines" :href="post.link">
    {{ post.content.substring(0, 250) }}
</a>
[โ€“] nutomic@lemmy.ml 1 points 2 years ago

So you have the same approach of generating a title from the post body. Only you do it on the frontend and not the backend. In Lemmy that might be a bit complicated because the body is already optional, and we would have to somehow encode that either title or body must be set (or both).

[โ€“] jakob@lemmy.schuerz.at 1 points 2 years ago

Lemmy is a little bit the modern Child of good old Usenet... ๐Ÿ˜Š๐Ÿ˜Š