### Description
This is my attempt to create a pull request for the changes I suggested in 
#5785. It should add the `dir="auto"` HTML property to user-generated 
content (such as changeset comments) that uses the classes in 
`lib/rich_text.rb`.

I can only hope this would apply to all or most of the user-generated content, 
thus providing a solution for #3428, but only someone intimately familiar with 
this repository would be able to say. I also hope this applies *only* to 
user-generated content and not other parts of the website - however, it 
probably wouldn't cause any harm even if applied to other elements.

I never user Ruby before (and technically, I still haven't... see "How 
has this been tested?"), so this change is entirely based on the 
documentation found 
[here](https://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-simple_format).
 I hope I've understood it correctly.

**This PR is still incomplete:** it needs the CSS declaration `text-align: 
start;`, but I don't know which rule it would be best to apply it to (or 
even where CSS files are in this repository). Ideally it should affect any and 
all HTML elements on the website that contain user-written content. Advice on 
where to add that would be appreciated.

That said, merging it even in this state without the CSS should still provide 
some benefit and no harm, assuming it works as I imagine. This is why I'm 
not marking it as draft.

### How has this been tested?
**This has not been tested at all. For all I know, it might even contain syntax 
errors.** I don't currently have the means to clone and run this 
repository. I know this is bad form to put it mildly, but with a change this 
small and focused I am hoping you can forgive and review it nonetheless, and 
run any tests in your already-set-up environment.

If this is totally unacceptable, let me know.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5835

-- Commit Summary --

  * add dir="auto" to paragraphs of formatted text

-- File Changes --

    M lib/rich_text.rb (4)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5835.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5835.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5835
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to