ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Does ng-grid has rtl support?

Open saifrumi opened this issue 13 years ago • 25 comments

If yes then how can i configure that or when you have to plan to implement it?

saifrumi avatar Sep 07 '13 19:09 saifrumi

+1. really desperate to see this.

msepahvand avatar Dec 12 '13 09:12 msepahvand

Same here...

internetbird avatar Dec 25 '13 13:12 internetbird

I've been looking at this... One of the things that's going to make this difficult is that different browsers have a different coordinate system in RTL. There are also some bugs in chrome regarding scrollLeft and scrollIntoView when in RTL.

https://code.google.com/p/chromium/issues/detail?id=128500 http://plnkr.co/edit/UZvnlq?p=info (in chrome the top left content is hidden by the scroll bar) viewed in Canary (Version 34.0.1809.0 canary) this bug appears fixed bad news: scrollIntoView is still broke. https://code.google.com/p/chromium/issues/detail?id=339562

ghost avatar Jan 30 '14 21:01 ghost

Any pull requests for this feature are of course welcome, but I encourage the changes and research to be made against the 3.0 branch. Scrolling is very different in 3.0 and any efforts there in 2.0 would be wasteful.

Thanks.

swalters avatar Jan 30 '14 22:01 swalters

+1 we also need this feature fast!

novice3030 avatar Feb 16 '14 15:02 novice3030

check out my version of rtl-ng-grid https://github.com/novice3030/rtl-ng-grid it has some known issues but i promise i will fix all of them soon feel free to comment and tell me what you think also post issues\bugs you have\found and i will try to fix them soon

novice3030 avatar Feb 19 '14 22:02 novice3030

@novice3030 I am not a lawyer - I do think your repo is in violation of MIT.

daniel-white avatar Feb 20 '14 14:02 daniel-white

@daniel-white Indeed I believe it is. Just replace the LICENSE with ours and it's OK though (I think).

c0bra avatar Feb 20 '14 15:02 c0bra

@novice3030 Really, the best thing to do would be to fork the existing repo and create a branch to do this work. Or even just work on Plunker. While you can probably get the feature working in a repo like the one you've shared, the way you've structured it, you're going to have to do more work later to share it with the rest of the world.

roblarsen avatar Feb 20 '14 15:02 roblarsen

@novice3030 , to add to Rob's comment, it would best for the project as a whole if you added this to 3.0 branch instead of 2.x. 3.0 is a complete rewrite of the application so you won't be able to merge your changes into that branch.

swalters avatar Feb 20 '14 15:02 swalters

Yeah, +1 on that. The 3.0 branch is the best starting point,

roblarsen avatar Feb 20 '14 15:02 roblarsen

  1. i will change license so i won't get sued
  2. i know that 3.0 would have been a better starting point for that but i had no time to do it and had to find a solution fast, i might try and do it for 3.0 if i'll have the time

novice3030 avatar Feb 20 '14 16:02 novice3030

@novice3030 ha, no worries. I don't think AngularUI can afford a lunch out, much less litigation (nor would it be interested in it I imagine).

Can we get a good, solid definition of what the grid needs to do when it comes to RTL? Do columns need to render from right to left? Does the scrollbar need to switch sides? Unfortunately because browser calculations are based on top and left that's how everything in the grid operates. It will be a pretty big change in 3.0 to make it variable.

c0bra avatar Feb 20 '14 16:02 c0bra

c0bra here is what RTL means:

  1. scroll bars are RTL
  2. columns should be rendered from right to left
  3. pinned columns should be pinned to the right not to the left
  4. column position changes (drag) should still work

i agree it's very hard to support both with the same branch but it's doable if you have time

novice3030 avatar Feb 20 '14 16:02 novice3030

i deleted to te repo. you can use plunker if needed http://plnkr.co/edit/bo2OHvlK4jlrpZPWAJv6?p=preview

novice3030 avatar Feb 20 '14 16:02 novice3030

we have considered adding support for the dir attribute to autodetect it.

daniel-white avatar Feb 20 '14 17:02 daniel-white

Dropping this here as I mess around with it

http://plnkr.co/edit/w23nDDcAoa1qDrNtGmHw?p=preview

roblarsen avatar Feb 20 '14 21:02 roblarsen

@roblarsen looks like we'd need a css class that switches the vertical bar to show up on last-child and not first-child if dir="rtl"

c0bra avatar Feb 20 '14 21:02 c0bra

Yeah, I want to see what we can do with CSS alone. I'll continue to mess with it from that perspective.

roblarsen avatar Feb 20 '14 22:02 roblarsen

It forced me to fork. Weird. Anyway.This is just with the dir attribute and with some CSS based on the attribute selector.

http://plnkr.co/edit/YDuUrIko6DCTke48ypbG?p=preview

roblarsen avatar Feb 21 '14 00:02 roblarsen