Skip to main content


!Friendica Support

I'm considering changing the engagement details below posts and comments now that Bookface shows icons for them. The current appearance is a vertical list, which can leave a lot of unused space to the right of it, plus all the explanatory text feels redundant and visually cluttering to me:

Current Bookface engagement counts in vertical list with descriptions.


So I'm considering eliminating the explanatory text and going with a horizontal list of just names (for single interactions) and counts (that trigger the pop-over list) like this:

Proposed engagement list with mix of names and counts in horizontal list.


But that got me to an option with just icons and counts, which is similar to how Facebook and Misskey/Sharkey show reactions/engagements:

Proposed engagement with icons and counts in horizontal list



Which is what I'd prefer as it looks the cleanest and most consistent.

Thoughts on this proposed change? (I really wish Friendica had polls for this sort of thing!)

#Bookface #Friendica #proposal
@Pygoscelis Papua .. I like that you do something for friendica.. Maybe a real theme / template would be even better.. because when Frio changes.. you have to adapt again.. I think
Yeah, definitely! I really would love to have it in the core.
@xy..
I've just started looking into making a theme with something like #Bookface styling. I was just going to fork the "Frio" theme but the more I look at it the less I like that idea, because of all the jQuery, Bootstrap, and other framework stuff and how over-coded the templates feel. I'm now looking at using the "Vier" theme since it already has none of that . I don't want anything in my theme apart from HTML5, CSS3, and vanilla JS.

But that means I'll need to re-do ALL my stying work with Vier as the base. But it wouldn't be my styles on top of Vier like the Bookface scheme is for Frio, it will be replacing Vier's styles with mine. Plus I'll be able to change the actual page structure. I believe recreating my styling on top of Vier will still be less work than trying to strip/replace framework code in Frio. The end product will probably be similar to Bookface, but not identical.

I have no idea how long it will take me to make it though. Friendica has a lot of "moving parts" to consider!
@Pygoscelis Papua yes, sounds good . Vier seems to be more slim. Although I don't understand it, yet. Tried to fix it yesterday (looks broken on my instance), but wondered why there is so much position:fixed, etc.. Don't know if that is needed..
@Pygoscelis Papua You mean, there are many places where Javascript is needed? Maybe something like Vue.js or riot.js could be good?.. but thats totally new for me. Never tried.. 😡
I don't know if I'll need JS until I get into it. I don't think Vier uses *any* JS itself. But if I thought I needed to add some I'd write some vanilla code to do just that thing. No frameworks or libraries. I don't want to create additional dependencies and load a bunch of code if I don't have to. That said I believe there is some jQuery that gets loaded with the core templates. There's nothing I can really do about that.

CSS can do a lot of stuff these days you used to need JS for and it is often needed to polyfill things for older browsers. But I have no intention of supporting legacy browsers nobody should be using anymore.
@Pygoscelis Papua Agree. I also don't have any JS library on my websites. Only some Vanilla JS where absolutely needed. Guess I thought of the modals, but thats Frio.. okay..
@xy.. It's technically possible to do modals with just HTML and CSS though it's kind of clunky. However to make them accessible you still need to use a little JS, and if you're going to do that you may as well just use it for controlling the modal too. But you certainly don't need a framework for it. Minimal JS could probably be inline on the element itself.

I think some of the modals, like the permissions one, are made with jQuery as part of the Friendica core not the theme. If that's already going to load regardless it would make sense to just use that.

I do like Frio's "Compose" modal. In the end my theme will probably be a combination of Vier and Frio elements.
@Pygoscelis Papua The proposed change looks good.
Yes, this would not affect what normally pops up when you mouse over them.
Good suggestion, and thank you for taking the time to improve the UI on Friendica!
The last option looks really nice πŸ‘β€οΈ
I'm wondering a bit whether (likes, dislikes, reshares) and those related to attending should be separated somewhat in the UI? By spacing, a box or something?
Not for design reasons but more UX.

Here's a quick mockup based on yours:
I just realized there is potential problem with this on mobile. If one of the engagement counts is on the right-hand side the pop-over box will be partly off-screen causing horizontal scrolling and breaking the rest of the mobile layout. But there is no way to be certain any given engagement count will be on either the left or right.

In my example it shows all possible engagements. But it's possible a post might only have Likes or only Reshares, in which case it would be on the left. But if it has all of them the Reshares might be on the right. Same problem with the attendance. If all you have are Maybes it would be on the left, if you have some of all possible RSVPs then Maybe would be on the right.

There's no way to anticipate if there will be a pop-over list and no way to know if it will be on the left, center, or right. Normally something like that would be repositioned with JS to prevent it appearing partly off-screen. I can't think of any CSS-only means of controlling it here. It's not as much of a problem for the desktop layout, but horizontal won't work on mobile.

As least as a vertical list I know the pop-over will always be to the left-hand side and no part of it will be off-screen.

I'll need to play with this more on my dev server.

BTW, I'm not seeing any comments on friendica.world from anyone other than @xy.. - I do see that there are other comments on this post on @Friendica Support but can't reply to them from my instance.
This entry was edited (1 month ago)
Spent some time revisiting this. Not sure now whether to implement it at all frankly.

After initially trying to arrange it as suggested by @marcus suggested I gave up trying to do it with flex or grid and ultimately I still wound up never knowing if an element would end up on the right or left to adjust the pop-over positioning. Part of this is because the containers exist whether they have anything in them or not and even :empty pseudo-class wasn't helping. I ended up just using old-school floats, because then I could at least be assured the Event responses would always be to the right to adjust the pop-over positioning. The downside is that the attendence counts are in the reverse order of the buttons because of float: right;:

Floated Horizontal List splitting Event Responses from other Responses

It was also problematic to put the "Reactions and Reshares" and "Attendance" labels because all the engagement counts are in a single .wall-item-responses container, and that isn't the only place that class name is used.

But I don't think this floated horizontal list will work on mobile really at all. It looks pretty messy if you keep the one set of responses floated left and the other still float right:

Horizontal List on Mobile is a Mess

Which still does not fix the issue with the pop-over not having enough room and potentially breaking the mobile layout if the expanding element is positioned too far to the right, with no way of knowing if that particular button is ever toward the left or right:

Pop-Over Alignment Problem with Horizontal List on Mobile

Because you never know how many of these responses will be populated. That "Reshares" button might be the only one, in which case it's to the left, or there may be "Likes" and "Dislikes" (as shown here) that push it too far to the right to properly display its pop-over.

I can't use :nth-of-type() or anything to target containers too far to the right because they collapse and even if I use the :empty pseudo-class to display: none; the ones with nothing in them they still exist regarding the count. I'd have to add checks for empty siblings for every possible combination of any, some, or all of the containers being populated or unpopulated. Oh, and there's a hidden, unused ".wall-item-comment" container in there too to deal with.

But, simply shifting this list back to a vertical one on mobile looks even worse than how it currently looks because it creates even MORE blank space to the right of the list:

Non-Verbose Vertical List on Mobile

So if I have to leave things as they are for the mobile layout is there any real advantage to changing to the horizontal layout for the desktop layout?

Another factor is that there is no way of ever knowing how many characters the actual count will be on any one of these response items. I looked at the Friendica code and there does not appear to be any limitation. The ONLY limitation appears to be on the pop-over list, where it is limited to showing 75 entries total (actually 74 + "and xxxx more" text).

Granted, I've never seen more than thousands of reshares on any post and that was something from a celebrity account on Mastodon, but there also doesn't appear to be anything in Friendica's code to truncate the number if it is large. For example on Facebook if it's 1,280 Likes it will truncate it to "1.2K" or if it's 26,568 Shares it will be truncate it to "26K" - there doesn't appear to be anything in Friendica's code to do that. Probably because that level of engagement is generally unlikely in the Fediverse, but still there is no way to know if the engagement count on any given response item will be one character or six or more.

This change may not be worth doing?

@xy.. @Michael πŸ‡ΊπŸ‡¦ @Jesper Ross Stocholm @Friendica Support
Would it help with writing the handling logic if "reactions and reshares" and "attendance" were instead on two rows, which would still bring it down from six to just two rows, and only one row for content that isn't events? At least then there's no left/right logic necessary I hope?

I need a proper development environment setup to experiment more with UI changes myself. Preferably a Docker/Podman setup that isn't vscode/microsoft-specific (devcontainer). While vagrant does support docker the friendica vagrant setup is currently only written for libvirt and virtualbox.
The left/right logic isn't a problem on desktop, it's more of a problem on mobile because the screen is so narrow if three items are shown in a row and the last one has a pop-over the position of the pop-over needs to be right: 0px; or it will partly be off-screen, which breaks the mobile layout.

I haven't given up, but it's going to need a lot more CSS logic than just a float or flex layout offer. Probably some "nth" sibling element checking for :empty or something.

I'd really like to get it working for mobile since the entire reason I started messing with this was to compact that information for the mobile layout.
I've mostly been thinking about and using the desktop layout and I think any of your suggestions would be a good improvement there as well!

I'm familiar with CSS too but I have a hard time fully visualizing the problem to come up with good suggestions. Once I have a dev setup I can hopefully help a bit more with things like this.
Ok I think I've got it! The trick was to use GRID layout not floats or flex. By using grid I can always be assured of the left/center/right placement of a response container so I can adjust the position of the pop-over if it has one.

So here's what a normal post/comment would look like on desktop:
Responses normal post desktop view

and here is what an Event post would look like:
Responses Event post desktop view

And a regular post/comment on a phone in portrait:
Responses normal post phone view

And an Event post on a phone in portrait:
Responses Event post phone view

And added bonus of the icon-above, centered layout for phones is it separates the touch target areas from each other making it easier to tap only the one you intend to.

I also checked to see what would happen with absurdly large engagement numbers, since Friendica doesn't appear to filter/truncate the numbers. Not that anyone will ever get this kind of engagement but I wanted to see if too many characters would break the layout:
Absurd number of responses phone view

There are some slight issues with older browsers that don't understand the :has() pseudo-class, but they are minor. On desktop the full boat of responses on an Event post aligns the "shares" and "maybe" to the right, so the icons might not line up, and the grid reserves space below for Event buttons even on regular posts and comments because I'm using :has() to get the count of items in the .wall-item-responses container to adjust the adjust the space reserved for grid-template-rows. But we'll soon be moving past the point where anyone should be using browsers that don't understand that pseudo-class or grid level 1 layout. I'm not going to worry too much about accommodating outdated browsers. Though I should probably look at this with my ancient iPad Mini and see how screwed up it is.
⇧