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

Shared block displays incorrectly with RTL display names #10469

Closed
MrPetovan opened this issue Jul 4, 2021 · 10 comments · Fixed by #10479
Closed

Shared block displays incorrectly with RTL display names #10469

MrPetovan opened this issue Jul 4, 2021 · 10 comments · Fixed by #10479
Assignees
Labels

Comments

@MrPetovan
Copy link
Collaborator

MrPetovan commented Jul 4, 2021

Originally posted by @AlfredSK in #8262 (comment)

Ha! Found one. :-)

grafik

Username and date of post are inserted on the right side. But it should be on the left side.

Steps to reproduce:

  1. Import this post on your node https://venera.social/display/67851619-983298e32d387710-a32197cb
  2. Or use the original https://persadon.com/@danialbehzadi/106521529502265000
  3. Click on 'Quote Share'
  4. Look at the preview

I only used the preview function to reproduce the issue. But the same happens with the submitted share.

@MrPetovan
Copy link
Collaborator Author

Thank you, this is perfect.

@ahangarha, what would be the expected display in this case?

@MrPetovan MrPetovan self-assigned this Jul 4, 2021
@ahangarha
Copy link

This is how it should look I think:

image

All I did was to change css properies from left|right to relevant bidi values like start|end. If this is fine, then let me know. I will send PR.

(absolute positioning)
left -> inset-inline-start
right -> inset-inline-end

float: left -> float: inline-start

margin-right -> margin-inline-end

@MrPetovan
Copy link
Collaborator Author

Thank you, I have no other source of truth than you in this matter, so I'll go forward with your display through your suggested values.

@ahangarha
Copy link

Does that mean you apply the style or I should do it?

@MrPetovan
Copy link
Collaborator Author

If you don't submit a PR yourself, I will based on your suggestion in the coming week.

@MrPetovan
Copy link
Collaborator Author

Unfortunately the float: inline-start value is only supported by Firefox, so the display name will not be aligned with the profile picture on any other browser.

See display on Chrome-based browser:
friendica-share-block-bidi

I wonder if we can achieve the same look with flex blocks.

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Jul 9, 2021

It works with flex boxes!
friendica-share-block-bidi-flex

I took advantage of this change to increase the avatar size to match the height of the share block header.

Onwards to the other themes!

@ahangarha
Copy link

I took advantage of this change to increase the avatar size to match the height of the share block header.

Actually it is a good improvement. Just I have a suggestion. If you are changing this, then it should also change in timeline as well. Logically the preview here should be as identical as possible to what would be shown in timeline.

I also assume UX also should be considered in this case. If one have mixed content in timeline, then would it be good to have some posts' header right to left and some others left to right? Not sure. I think we can try it and see the result in action.

@AlfredSK
Copy link

AlfredSK commented Jul 9, 2021

I would suggest the same display as we use for normal, top-level posts. The avatar on the left. The user name on the left - as we do it with LTR posts. But the content of the post on the right side.

Other ways would be too confusing. But that's only my point of view. Sorry that I'm German. 😋

@ahangarha
Copy link

I would agree to follow same layout for better UX.

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

Successfully merging a pull request may close this issue.

3 participants