The discussion revolves around an issue with the RTL (right-to-left) interface in Discourse, where some popup boxes appear in the wrong position. enigmaty shares images to illustrate the problem, specifically with the “topic admin actions” and “share a link to this post” popups.
Initial responses from riking and riking suggest that the positioning might be correct, but then acknowledge that it’s actually a bug. enigmaty clarifies that the issue is with the button at the end of each topic, not beside the posts.
simon investigates the issue and shares images from his own forum with the Persian locale selected. He asks about the Discourse version and custom CSS, and later provides a custom CSS solution to fix the problem.
simon explains that the issue is challenging to fix without changing a lot of code but provides a temporary solution using custom CSS. He also mentions that the share-link popup can be fixed with a code change to check for RTL locales.
enigmaty confirms that the custom CSS solution works and expresses gratitude. They also ask about customizing the admin interface, pointing out the lack of an admin_rtl.scss file. simon responds that saving custom styles is disabled for admin pages but suggests using a plugin to add custom styles.
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.
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.
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.
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.
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.
I just want to ask you something. Do you have a problem when you customize your admin interface? You see there is noadmin_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.