RTL interface has wrong position for some of popup boxes


#1

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_Cossar?


Why is RTL class user dependent instead of locale?
(Kane York) #2

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.


#3

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.


(Kane York) #4

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


#5

Please, can someone help me with this.

Thanks


(Simon Cossar) #6

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.


#7

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.


(Simon Cossar) #8

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


#9

Thank you :grinning:


(Simon Cossar) #10

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.


#11

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.


(Simon Cossar) #12

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.