RTL interface has wrong position for some of popup boxes

I have RTL interface. When I click on “topic admin actions” the popup box shows on the opposite side.

This is also happens when I click on the created at link (which triggers the share link). Also with “share a link to this post”

Thanks

Can you help me with this @simon?

1 Like

That’s, uh, technically the correct position for it to be in. It’s supposed to be in the gutter alongside the post stream.

It’s a little far away though, innit? But this is not a RTL layout bug, no.

1 Like

Maybe the image is not clear. the button is in right of the page (the ranch icon under the topic) and when you click it the box shoes up on the left side. This not what happens on LTR layout. The box shows on the same side of the button.

The Admin box shows on top of the post.

2 Likes

Aah, I thought you were clicking the corner wrench (in the upper-right). Yeah, that’s wrong.

3 Likes

Please, can someone help me with this.

Thanks

This is how it looks on my forum when Persian is selected as the locale. Does this seem correct?

What version of Discourse are you using? Do you have any custom css?

The share-link box has the wrong position.

1 Like

I am talking about the button right before the end of each topic, not the one that is beside the the posts. It should be right before the ‘Bookmark’ button.

I just setup the latest docker image form the repo, and I do not use any custom css.

Right :slight_smile: I see the problem now. I can try to fix it tomorrow.

4 Likes

Thank you :grinning:

For the topic-admin-popup-menu, without changing a lot of code, I don’t see a good way to change the widget code to get it to work for rtl for both the time-line container (on the upper part of the page) and for the topic-footer-main-buttons.

I think you can use this custom css to get it to work for you. There may be an issue with setting #main-outlet to position relative, but I think it will be ok.

.rtl {
    
    #main-outlet {
        position: relative;
    }

    #topic-footer-main-buttons .topic-admin-popup-menu[style] {
        left: auto !important;
       right: 8px !important;
    }

    .timeline-container .topic-admin-popup-menu[style] {
       left: auto !important;
       right: 40px !important;
    }
}

The share-link popup can be fixed for rtl. It just needs a switch in the code to check if the current locale is rtl. I’ll do that soon if no one else does it first.

3 Likes

Thank you. It worked for me. Even the ‘Share link’ is now better than before (It is closer to the button).
I really appropriate your help. :slight_smile:

I just want to ask you something. Do you have a problem when you customize your admin interface? You see there is no admin_rtl.scss in the code base (there is for desktop and mobile). So when I try to customize any thing in my admin interface, It only works if I am browsing the interface coming from my desktop interface. I mean, if you refresh the page the customization is gone. If you go directly to the admin interface, the customization is gone.

I have a category on my forum for learning Persian (not much it happening with it now, but hopefully soon.) Other than that I don’t use the rtl layout.

I think saving custom styles is disabled for the admin pages. Adding them through a plugin should work.

2 Likes