(arguably) improved layouting of user profile page #403

Open
Riedler wants to merge 14 commits from Riedler/akkoma-fe:user-profile-changes into develop
Contributor

Note that right-aligning the bio would make akkoma fall in line with most other fedi software (besides pleroma ofc), so formatting would transfer correctly. This will also probably make a lot of people unhappy so if you want me to make this an optional feature, I can 100% do that 😅

before after with #402 (more space makes it look better)
image image image

part of changes in DNS#1

Note that right-aligning the bio would make akkoma fall in line with most other fedi software (besides pleroma ofc), so formatting would transfer correctly. This will also probably make a lot of people unhappy so if you want me to make this an optional feature, I can 100% do that 😅 | before | after | with #402 (more space makes it look better) | | --- | --- | --- | | ![image](/attachments/89579fb6-f224-43ac-99fd-f1804d6ab5a4) | ![image](/attachments/372ee3b8-2256-4e72-94f0-0a29de2e73b8) | ![image](/attachments/8d0975cd-107f-4ca0-b41f-5339e92ccbd8) | part of changes in [DNS#1](https://git.sakamoto.pl/domi/akkoma-fe/pulls/1)
287 KiB
373 KiB
291 KiB
Riedler added 6 commits 2024-06-16 16:16:51 +00:00
Member

This will also probably make a lot of people unhappy so if you want me to make this an optional feature, I can 100% do that 😅

i personally prefer centre alignment for the bio, so a toggle would be welcome ^^

Unrelated to an alignment toggle:

The commit message says it makes it left aligned but the actual change sets text-align: start which afaik means it willbe aligned according to the base direction. Currently akkoma-fe does indeed always assume LTR though i have an unfinished branch to make user-generated content follow Unicode BiDi autodetection.
Am i understanding correctly this will indeed follow base-direction after this change or is there something else in here enforcing left alignment i missed?

I must admit i like personally like stats (post, follow(ers|ing)) on their own line like before more but i guess i could get used to it if the new design is generally preferred by most and (at least for me) not worth the complexity of making this toggleable.
Apart from personal preference though it creates some issues in narrow/mobile layouts. “Posts per day” no gets squished int the user handle and “Followers” can slip beneath the “edit profile” button in localisations with a sufficiently long text.

> This will also probably make a lot of people unhappy so if you want me to make this an optional feature, I can 100% do that 😅 i personally prefer centre alignment for the bio, so a toggle would be welcome ^^ Unrelated to an alignment toggle: The commit message says it makes it *left* aligned but the actual change sets `text-align: start` which afaik means it willbe aligned according to the base direction. Currently akkoma-fe does indeed always assume LTR though i have an unfinished branch to make user-generated content follow Unicode BiDi autodetection. Am i understanding correctly this will indeed follow base-direction after this change or is there something else in here enforcing left alignment i missed? I must admit i like personally like stats *(post, follow(ers|ing))* on their own line like before more but i guess i could get used to it if the new design is generally preferred by most and (at least for me) not worth the complexity of making this toggleable. Apart from personal preference though it creates some issues in narrow/mobile layouts. “Posts per day” no gets squished int the user handle and “Followers” can slip beneath the “edit profile” button in localisations with a sufficiently long text.
Author
Contributor

I can make both toggleable - I've changed the underlaying layouting to be more malleable if needed, so this shouldn't really introduce much code complexity. Same for mobile layouts - I can simply move the stats down if mobile is detected.

as for text direction - uhhh… no idea, honestly. I have zero experience with rtl languages. I'll go test what it does with rtl stuff 🤷 we'll see.

I can make both toggleable - I've changed the underlaying layouting to be more malleable if needed, so this shouldn't really introduce much code complexity. Same for mobile layouts - I can simply move the stats down if mobile is detected. as for text direction - uhhh… no idea, honestly. I have zero experience with rtl languages. I'll go test what it does with rtl stuff 🤷 we'll see.

there was an old PF for RtL but consider is "unsupported" for now and you'll be fine

i quite like the right-alignment so i'll probably use that personally

there was an old PF for RtL but consider is "unsupported" for now and you'll be fine i quite like the right-alignment so i'll probably use that personally
Member

as for text direction - uhhh… no idea, honestly. I have zero experience with rtl languages

As long as you didn't hard-code directions anywhere things should be fine; start should adapt to the base direction.

Digressing a bit for more details on the bidi situation:

Currently akkoma-fe always defaults to LTR base direction; i’m not sure why everyt documentation i found indicates “auto” ought to be the default for HTML5, but unless told otherwise it always ends up as LTR. In result LTR or mixed-content posts display subtly to utterly garbled in akkoma-fe.

Here’s a commit which explicitly marks all user-generated content to follow Unicode BiDi “auto” and prevent bidi user content from messing up non-user-generated adjacent elements: https://akkoma.dev/Oneric/akkoma-fe/commits/branch/bidi
Functionality is mostly complete, but it stalled because i wasn’t sure what to do with hashtags or advanced MFM and because using <bidi> HTML elements instead of the CSS unicode-bidi: isolate property would be cleaner. (And i still don’t know why it even needs explicit opt-in into Unicode BiDi)

The other even older bidi PR #258 also adjusted the whole layout to flip in RTL mode, but that’s way more work and not needed to display posts, bios, names, etc correctly

> as for text direction - uhhh… no idea, honestly. I have zero experience with rtl languages As long as you didn't hard-code directions anywhere things should be fine; `start` *should* adapt to the base direction. Digressing a bit for more details on the bidi situation: Currently akkoma-fe always defaults to LTR base direction; i’m not sure why everyt documentation i found indicates “auto” ought to be the default for HTML5, but unless told otherwise it always ends up as LTR. In result LTR or mixed-content posts display subtly to utterly garbled in akkoma-fe. Here’s a commit which explicitly marks all user-generated content to follow Unicode BiDi “auto” and prevent bidi user content from messing up non-user-generated adjacent elements: https://akkoma.dev/Oneric/akkoma-fe/commits/branch/bidi Functionality is mostly complete, but it stalled because i wasn’t sure what to do with hashtags or advanced MFM and because using `<bidi>` HTML elements instead of the CSS `unicode-bidi: isolate` property would be cleaner. *(And i still don’t know why it even needs explicit opt-in into Unicode BiDi)* The other even older bidi PR #258 also adjusted the whole layout to flip in RTL mode, but that’s way more work and not needed to display posts, bios, names, etc correctly
Riedler added 2 commits 2024-06-26 16:09:29 +00:00
Author
Contributor

everything is optional and toggleable now. Here's the on/off states ↓

left-align center-align
expanded image image
compact image image

I hope I didn't miss any layouting oddities.

everything is optional and toggleable now. Here's the on/off states ↓ | | left-align | center-align | | --- | --- | --- | | expanded | ![image](/attachments/6390f0ac-5449-4e08-ad5b-2b3f78c0d80f) | ![image](/attachments/ead947ab-85b3-499d-a3c5-c84fa3ed04d1) | | compact | ![image](/attachments/8653f536-e2e5-4164-bfe9-430b7fbd0f05) | ![image](/attachments/51f53ef0-2b39-4f24-befe-7ee9a6178c03) | I hope I didn't miss any layouting oddities.
Member

Same for mobile layouts - I can simply move the stats down if mobile is detected.

Did you intentionally omit this? I can still produce overlaps of the handle with the “post per day” counter and sometimes even the other users stats in mobile layout; try viewing e.g. remote profiles from a longish domain.

The way other elements detect mobile layout is via .app-layout.-mobile #selector-for-element-to-adapt

> Same for mobile layouts - I can simply move the stats down if mobile is detected. Did you intentionally omit this? I can still produce overlaps of the handle with the “post per day” counter and sometimes even the other users stats in mobile layout; try viewing e.g. remote profiles from a longish domain. The way other elements detect mobile layout is via `.app-layout.-mobile #selector-for-element-to-adapt`
Author
Contributor

Did you intentionally omit this?

nope, I simply forgot 💀

I originally wanted to wait with that part until I figure out how mobile detection works in akkoma, but then, but then… I just didn't. idunno 🤷 happens ig

I can still produce overlaps

I'll look into that after the mobile thing - shouldn't be possible, so I must've overlooked something…

The way other elements detect mobile layout

hmm well I'd prefer something detectable with js, so things can rely on the .-compact class always representing the actual state of the layout. I'll try to find out what sets the .-mobile class and try to read from that if possible.

> Did you intentionally omit this? nope, I simply forgot 💀 I originally wanted to wait with that part until I figure out how mobile detection works in akkoma, but then, but then… I just didn't. idunno 🤷 happens ig > I can still produce overlaps I'll look into that after the mobile thing - shouldn't be possible, so I must've overlooked something… > The way other elements detect mobile layout hmm well I'd prefer something detectable with js, so things can rely on the `.-compact` class always representing the actual state of the layout. I'll try to find out what sets the `.-mobile` class and try to read from that if possible.
Riedler added 2 commits 2024-07-03 15:36:40 +00:00
Riedler added 1 commit 2024-07-03 15:46:05 +00:00
stopped user handle from overflowing from its boundaries in user card
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
a74a631793
Author
Contributor

both should be fixed now

both should be fixed now
Riedler added 1 commit 2024-07-03 16:31:23 +00:00
fixed stuff overflowing in user popup e.g. in notifs
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
c39d9fa64b
Riedler added 1 commit 2024-07-03 16:59:13 +00:00
oops, unfucked username placement
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
e955eb4503
Member

I’m not sure about hiding the setting completely in "mobile" narrow-width layout since it means opening enough windows alongside your browser prevents changing the setting even if normally the browser is wide enough to not use the "mobile" layout. Maybe it’s better to adjust the setting text to clarify it only works if there’s enough horizontal space

Otherwise everything seems to work fine now at least in my testing, thanks!

I’m not sure about hiding the setting completely in "mobile" narrow-width layout since it means opening enough windows alongside your browser prevents changing the setting even if normally the browser is wide enough to not use the "mobile" layout. Maybe it’s better to adjust the setting text to clarify it only works if there’s enough horizontal space Otherwise everything seems to work fine now at least in my testing, thanks!
Author
Contributor

…good point

…good point
Riedler added 1 commit 2024-07-06 12:55:55 +00:00
reverted 2e83ccefdc and clarified that compact user info is only used with enough room
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
94ed0991bc
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u user-profile-changes:Riedler-user-profile-changes
git checkout Riedler-user-profile-changes
Sign in to join this conversation.
No description provided.