Skip to content

Conversation

emperorofmars
Copy link

Changelog

  • Adapted the toot headers responsive behavior. It should no longer overlay the user and date over each other. This is done with a flex layout, just like in vanilla Mastodon.
  • Adapted the boosting user to look a little closer to vanilla Mastodon. The color is darker and the boost-icon was changed from '♺' to '🔁'.
  • Added the option to exclude self-replies. The Mastodon API will return replies on the same user despite the exclude_replies argument being set to true. This will not be changed on Mastodon's side.
  • Changed how the date is formatted. The users' locale is used by default, and the date is formatted like in vanilla Mastodon. The full date is present in the title attribute.
  • Added the options to override the default locale with the data-locale attribute and the date format options with the data-ts_format attribute.

I understand some of these changes are only stylistic and subject to personal taste, feel free to revert them as you wish. I generally tried to get this to look closer to vanilla Mastodon.

…erlay the user and date over each other. This is done with a flex layout, just like in vanilla Mastodon.

Adapted the boosting user to look a little closer to vanilla Mastodon. The color is darker and the boost-icon was changed from '♺' to '�'.
Added the option to exclude self-replies. The Mastodon API will return replies on the same user despite the exclude_replies argument being set to true. This will not be changed on Mastodon's side.
Changed how the date is formatted. The users locale is used by default and the date is formatted like in vanilla Mastodon. The full date is present in the title attribute.
Added the options override the default locale with the  attribute and the date format options with the  attribute.
Copy link
Owner

@sampsyo sampsyo left a comment

Choose a reason for hiding this comment

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

Hi there; thanks for putting this together, and so sorry it took me so long to take a detailed look! I have honestly been having a little trouble pulling apart the various pieces, so I'm not sure I'll be able to merge this as is… you're absolutely right about the problem with the date overlapping at small sizes, though, and I'd love to fix it. A bunch of my various flexbox experiments have failed, but maybe I can try again someday!

el.dataset.excludeReplies === "true",
el.dataset.excludeReblogs === "true",
);
)).filter(t => el.dataset.excludeSelfReplies === "true" && t.in_reply_to_account_id != null ? false : true );
Copy link
Owner

Choose a reason for hiding this comment

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

I'm not quite sure I understand this: the main expression is,

t.in_reply_to_account_id != null ? false : true

Which I think is equivalent to:

t.in_reply_to_account_id === null

First, I just wanted to check that the above equivalence is true. Does it look that way to you? Second, it seems like this excludes all replies—which is sensible, but if so, maybe we should document it. (That is, this option skips all replies including self-replies.)

Copy link
Author

Choose a reason for hiding this comment

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

Unfortunately, the filter would not work correctly anymore, the condition before the and matters as well.

This does work:

el.dataset.excludeSelfReplies !== "true" || t.in_reply_to_account_id === null

I did document this functionality and the reason for it in readme.md at line 29. My wording may be a bit wonky.

}

.toot .boost:before {
content: "🔁"; /* changed from "♺" */
Copy link
Owner

Choose a reason for hiding this comment

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

TBH I wish there were a non-emoji character that looked more like this… as it stands, I'm worried this stands out a little too much?

@emperorofmars
Copy link
Author

If the space becomes too small for the name and date to be side by side, the date will be pushed above the name, still aligned to the right.

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